fix tests
This commit is contained in:
@@ -6,17 +6,19 @@ test.describe('Props', () => {
|
||||
test.describe('colorMode', async () => {
|
||||
test('render default light color mode', async ({ page }) => {
|
||||
await page.goto('/examples/color-mode');
|
||||
const locator = page.locator(`.${FRAMEWORK}-flow`);
|
||||
|
||||
await expect(locator).not.toHaveClass(/dark/);
|
||||
await expect(page.locator(`.${FRAMEWORK}-flow__node`).first()).toHaveCSS('visibility', 'visible');
|
||||
|
||||
await expect(page.locator(`.${FRAMEWORK}-flow`)).not.toHaveClass(/dark/);
|
||||
});
|
||||
|
||||
test('render dark color mode', async ({ page }) => {
|
||||
await page.goto('/examples/color-mode');
|
||||
const locator = page.locator(`.${FRAMEWORK}-flow`);
|
||||
await expect(page.locator(`.${FRAMEWORK}-flow__node`).first()).toHaveCSS('visibility', 'visible');
|
||||
|
||||
await page.getByTestId('colormode-select').selectOption({ label: 'dark' });
|
||||
|
||||
await expect(locator).toHaveClass(/dark/);
|
||||
await expect(page.locator(`.${FRAMEWORK}-flow`)).toHaveClass(/dark/);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user