11import { test , expect } from '@playwright/test' ;
22
3- test ( 'Markdown tables are styled correct ' , async ( { page } ) => {
3+ test ( 'Markdown tables are styled correctly ' , async ( { page } ) => {
44await page . goto ( 'html/markdown-tables.html' ) ;
5- await expect ( page . getByRole ( 'figure' , { name : 'Table 1: My Caption' } ) ) . toBeVisible ( ) ;
6- await expect ( page . getByRole ( 'figure' , { name : 'Table 1: My Caption' } ) . locator ( 'table' ) ) . toHaveCSS ( 'border-top-style' , 'solid' )
7- await expect ( page . getByRole ( 'figure' , { name : 'Table 1: My Caption' } ) . locator ( 'table' ) ) . toHaveCSS ( 'border-top-width' , '1px' )
8- await expect ( page . getByRole ( 'figure' , { name : 'Table 1: My Caption' } ) . locator ( 'table' ) ) . toHaveCSS ( 'border-bottom-style' , 'solid' )
9- await expect ( page . getByRole ( 'figure' , { name : 'Table 1: My Caption' } ) . locator ( 'table' ) ) . toHaveCSS ( 'border-bottom-width' , '1px' )
10- await expect ( page . getByRole ( 'figure' , { name : 'Table 1: My Caption' } ) . locator ( 'table tr' ) . nth ( 1 ) ) . toHaveCSS ( 'border-style' , 'solid' )
5+ await expect ( page . getByRole ( 'figure' , { name : 'Table 1: My Caption' } ) . locator ( 'table' ) ) . toHaveScreenshot ( )
116await expect ( page . locator ( 'a.quarto-xref[href="#tbl-letters"]' ) ) . toContainText ( 'Table 1' ) ;
127
13- await expect ( page . locator ( '#computational-table table' ) ) . toBeVisible ( ) ;
14- await expect ( page . locator ( '#computational-table table' ) ) . toHaveCSS ( 'border-top-style' , 'solid' )
15- await expect ( page . locator ( '#computational-table table' ) ) . toHaveCSS ( 'border-top-width' , '1px' )
16- await expect ( page . locator ( '#computational-table table' ) ) . toHaveCSS ( 'border-bottom-style' , 'solid' )
17- await expect ( page . locator ( '#computational-table table' ) ) . toHaveCSS ( 'border-bottom-width' , '1px' )
18- await expect ( page . locator ( '#computational-table table' ) ) . toHaveCSS ( 'border-style' , / s o l i d / )
19- await expect ( page . locator ( '#computational-table table' ) . locator ( 'td' ) . nth ( 1 ) ) . toHaveCSS ( 'box-shadow' , / r g b a \( 0 , 0 , 0 , 0 \. 0 5 / )
8+ await expect ( page . locator ( '#computational-table table' ) ) . toHaveScreenshot ( )
209
2110} ) ;
0 commit comments