1+ import { test , expect } from '@playwright/test' ;
2+
3+ test ( 'Markdown tables are styled correct' , async ( { page } ) => {
4+ await 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' )
11+ await expect ( page . locator ( 'a.quarto-xref[href="#tbl-letters"]' ) ) . toContainText ( 'Table 1' ) ;
12+
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 / )
20+
21+ } ) ;
0 commit comments