import { test, expect } from '@playwright/test';
test('dashboard loads with correct charts', async ({ page }) => {
await page.goto('http://localhost:8088/superset/dashboard/1/');
// Login if required
await page.fill('[name="username"]', 'admin');
await page.fill('[name="password"]', 'admin');
await page.click('[type="submit"]');
// Verify dashboard elements
await expect(page.locator('.dashboard-header')).toBeVisible();
await expect(page.locator('.chart-container')).toHaveCount(4);
});
test('chart filters update data correctly', async ({ page }) => {
await page.goto('http://localhost:8088/explore/');
// Apply filter
await page.click('[data-test="adhoc-filter-edit"]');
await page.selectOption('[data-test="select-column"]', 'category');
await page.fill('[data-test="filter-value"]', 'Technology');
await page.click('[data-test="run-query"]');
// Verify filtered results
await expect(page.locator('.slice_container')).toContainText('Technology');
});