@@ -1880,6 +1880,42 @@ async function exerciseTabletLandscapeMobileParity(page, queryApiStub) {
18801880 await expectMobileScrollLockReleased ( page , 'Tablet landscape export dialog' ) ;
18811881 await cleanupMobilePageScroll ( page ) ;
18821882
1883+ await page . locator ( '[data-mobile-table-action-target="table-expand-btn"]' ) . click ( ) ;
1884+ await page . waitForFunction ( ( ) => document . body . classList . contains ( 'table-expanded-open' ) , null , { timeout : 5000 } ) ;
1885+ await expectElementWithinViewport ( page , '#table-shell.table-shell-expanded' , 'Tablet landscape expanded table' ) ;
1886+ const tabletExpandedTableMetrics = await page . locator ( '#table-shell.table-shell-expanded' ) . evaluate ( shell => {
1887+ const topBar = shell . querySelector ( '#table-top-bar' ) ;
1888+ const container = shell . querySelector ( '#table-container' ) ;
1889+ const table = shell . querySelector ( '#example-table' ) ;
1890+ const topBarRect = topBar ?. getBoundingClientRect ( ) ;
1891+ const containerRect = container ?. getBoundingClientRect ( ) ;
1892+ const tableRect = table ?. getBoundingClientRect ( ) ;
1893+ const shellRect = shell . getBoundingClientRect ( ) ;
1894+ return {
1895+ containerHeight : containerRect ?. height || 0 ,
1896+ containerTop : containerRect ?. top || 0 ,
1897+ containerWidth : containerRect ?. width || 0 ,
1898+ shellBottomGap : Math . abs ( window . innerHeight - ( shellRect ?. bottom || 0 ) ) ,
1899+ shellTop : shellRect ?. top || 0 ,
1900+ tableWidth : tableRect ?. width || 0 ,
1901+ tableZoom : shell . style . getPropertyValue ( '--table-zoom' ) || '' ,
1902+ topBarHeight : topBarRect ?. height || 0 ,
1903+ viewportHeight : window . innerHeight
1904+ } ;
1905+ } ) ;
1906+ if (
1907+ tabletExpandedTableMetrics . tableZoom !== '1.00'
1908+ || tabletExpandedTableMetrics . topBarHeight > 70
1909+ || tabletExpandedTableMetrics . containerHeight < tabletExpandedTableMetrics . viewportHeight - 110
1910+ || tabletExpandedTableMetrics . tableWidth > tabletExpandedTableMetrics . containerWidth + 4
1911+ || tabletExpandedTableMetrics . shellTop > 10
1912+ || tabletExpandedTableMetrics . shellBottomGap > 10
1913+ ) {
1914+ throw new Error ( `Tablet landscape expanded table should keep mobile chrome while using full tablet table zoom: ${ JSON . stringify ( tabletExpandedTableMetrics ) } ` ) ;
1915+ }
1916+ await page . locator ( '#table-expand-btn' ) . click ( ) ;
1917+ await page . waitForFunction ( ( ) => ! document . body . classList . contains ( 'table-expanded-open' ) , null , { timeout : 5000 } ) ;
1918+
18831919 await page . locator ( '#mobile-builder-toggle' ) . click ( ) ;
18841920 await page . waitForFunction ( ( ) => document . querySelector ( '#mobile-builder-drawer' ) ?. classList . contains ( 'is-open' ) , null , { timeout : 5000 } ) ;
18851921 const builderMetrics = await page . evaluate ( ( ) => {
0 commit comments