Skip to content

Commit

Permalink
Merge branch 'main' into fix-cross-constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Jun 8, 2023
2 parents 246a974 + 965e1cb commit 4edde1c
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion ui/tests/preferences.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { test } from '@playwright/test';
import { expect, test } from '@playwright/test';

test.beforeEach(async ({ page }) => {
await page.goto('/');
Expand All @@ -15,3 +15,22 @@ test('can change timezone preferences', async ({ page }) => {
})
.click();
});

test('can change theme preferences', async ({ page }) => {
await page.getByRole('link', { name: 'Settings' }).click();
await page.getByRole('link', { name: 'General' }).click();
await page.getByRole('heading', { name: 'Preferences' }).click();
await page.getByRole('combobox', { name: 'Theme' }).selectOption('dark');
await expect(page.getByRole('combobox', { name: 'Theme' })).toHaveValue(
'dark'
);
await page.getByRole('combobox', { name: 'Theme' }).selectOption('system');
await page.getByRole('combobox', { name: 'Theme' }).selectOption('light');
await expect(page.getByRole('combobox', { name: 'Theme' })).toHaveValue(
'light'
);
await page.getByRole('combobox', { name: 'Theme' }).selectOption('dark');
await expect(page.getByRole('combobox', { name: 'Theme' })).toHaveValue(
'dark'
);
});

0 comments on commit 4edde1c

Please sign in to comment.