Skip to content

Commit dc8b5ea

Browse files
split nojs tests
concurrency may explain failures
1 parent 1591f5b commit dc8b5ea

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { test, expect } from '@playwright/test';
2+
3+
test.use({ javaScriptEnabled: false });
4+
5+
test('Dark brand default, no JS', async ({ page }) => {
6+
// This document use a custom theme file that change the background color of the title banner
7+
// Same user defined color should be used in both dark and light theme
8+
await page.goto('./html/dark-brand/brand-after-theme.html');
9+
const locatr = await page.locator('body').first();
10+
await expect(locatr).toHaveClass('fullcontent quarto-dark');
11+
await expect(locatr).toHaveCSS('background-color', 'rgb(66, 7, 11)');
12+
});
13+
14+
15+
test('Light brand default, no JS', async ({ page }) => {
16+
// This document use a custom theme file that change the background color of the title banner
17+
// Same user defined color should be used in both dark and light theme
18+
await page.goto('./html/dark-brand/brand-before-theme.html');
19+
const locatr = await page.locator('body').first();
20+
await expect(locatr).toHaveClass('fullcontent quarto-light');
21+
await expect(locatr).toHaveCSS('background-color', 'rgb(252, 252, 252)');
22+
});
Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { test, expect } from '@playwright/test';
2-
import { asRGB, checkBorderProperties, checkColor, getCSSProperty } from '../src/utils';
32

43
test('Dark and light brand after user themes', async ({ page }) => {
54
// This document use a custom theme file that change the background color of the title banner
@@ -25,24 +24,3 @@ test('Dark and light brand before user themes', async ({ page }) => {
2524
const locatr2 = await page.locator('body').first();
2625
await expect(locatr2).toHaveCSS('background-color', 'rgb(6, 6, 6)');
2726
});
28-
29-
test.use({ javaScriptEnabled: false });
30-
31-
test('Dark brand default, no JS', async ({ page }) => {
32-
// This document use a custom theme file that change the background color of the title banner
33-
// Same user defined color should be used in both dark and light theme
34-
await page.goto('./html/dark-brand/brand-after-theme.html');
35-
const locatr = await page.locator('body').first();
36-
await expect(locatr).toHaveClass('fullcontent quarto-dark');
37-
await expect(locatr).toHaveCSS('background-color', 'rgb(66, 7, 11)');
38-
});
39-
40-
41-
test('Light brand default, no JS', async ({ page }) => {
42-
// This document use a custom theme file that change the background color of the title banner
43-
// Same user defined color should be used in both dark and light theme
44-
await page.goto('./html/dark-brand/brand-before-theme.html');
45-
const locatr = await page.locator('body').first();
46-
await expect(locatr).toHaveClass('fullcontent quarto-light');
47-
await expect(locatr).toHaveCSS('background-color', 'rgb(252, 252, 252)');
48-
});

0 commit comments

Comments
 (0)