11import { test , expect } from '@playwright/test' ;
22
3- async function check_red_blue ( page ) {
4- const locatr = await page . locator ( 'body' ) . first ( ) ;
5- await expect ( locatr ) . toHaveClass ( 'fullcontent quarto-dark' ) ;
6- await expect ( locatr ) . toHaveCSS ( 'background-color' , 'rgb(66, 7, 11)' ) ;
7- await page . locator ( "a.quarto-color-scheme-toggle" ) . click ( ) ;
8- const locatr2 = await page . locator ( 'body' ) . first ( ) ;
9- await expect ( locatr2 ) . toHaveCSS ( 'background-color' , 'rgb(204, 221, 255)' ) ;
10- }
11-
123async function check_theme_overrides ( page ) {
134 const locatr = await page . locator ( 'body' ) . first ( ) ;
145 await expect ( locatr ) . toHaveClass ( 'fullcontent quarto-light' ) ;
@@ -19,12 +10,6 @@ async function check_theme_overrides(page) {
1910}
2011// themes used in these documents have background colors
2112
22- test ( 'Dark and light brand after user themes' , async ( { page } ) => {
23- // brand overrides theme background color
24- await page . goto ( './html/dark-brand/brand-after-theme.html' ) ;
25- await check_red_blue ( page ) ;
26- } ) ;
27-
2813test ( 'Dark and light brand before user themes' , async ( { page } ) => {
2914 // theme will override brand
3015 await page . goto ( './html/dark-brand/brand-before-theme.html' ) ;
@@ -33,11 +18,6 @@ test('Dark and light brand before user themes', async ({ page }) => {
3318
3419// project tests
3520
36- test ( 'Project specifies dark and light brands' , async ( { page } ) => {
37- await page . goto ( './html/dark-brand/project-light-dark/simple.html' ) ;
38- await check_red_blue ( page ) ;
39- } ) ;
40-
4121test ( 'Project brand before user themes' , async ( { page } ) => {
4222 // theme will override brand
4323 await page . goto ( './html/dark-brand/project-light-dark/brand-under-theme.html' ) ;
0 commit comments