MCPcopy Create free account
hub / github.com/coder/coder / expectLightThemeClasses

Function expectLightThemeClasses

site/e2e/tests/users/userSettings.spec.ts:15–28  ·  view source on GitHub ↗
(page: Page)

Source from the content-addressed store, hash-verified

13};
14
15const expectLightThemeClasses = async (page: Page) => {
16 await expect(async () => {
17 const classes = await rootClassNames(page);
18 const className = "light";
19
20 // Assert the light theme without rejecting unrelated root classes.
21 expect(classes).toContain(className);
22 for (const themeClassName of CONCRETE_THEMES.filter(
23 (it) => it !== className,
24 )) {
25 expect(classes).not.toContain(themeClassName);
26 }
27 }).toPass({ timeout: 10_000 });
28};
29
30test("adjust user theme preference", async ({ page }) => {
31 await login(page, users.member);

Callers 1

Calls 2

rootClassNamesFunction · 0.85
filterMethod · 0.80

Tested by

no test coverage detected