fix tests

This commit is contained in:
peterkogo
2025-04-16 17:36:05 +02:00
parent 13fdd15f59
commit 2474c8be14
7 changed files with 746 additions and 126 deletions
+6 -4
View File
@@ -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/);
});
});
});