@@ -10,8 +10,8 @@ import { test, expect, type Locator } from '@playwright/test';
1010 * - the first Clone button and the first Active switch both lie wholly inside
1111 * the viewport AND inside the visible box of the table's scroller, with the
1212 * table not scrolled at all;
13- * - when the table is wider than its box, the box says so
14- * (`data-overflow-right`, which drives the seam shadow on the pinned cells ).
13+ * - when the table is wider than its box, the grid draws its seam shadow at
14+ * the pinned cells (objectstack#36897: the list is drawn by ObjectGrid ).
1515 *
1616 * The unit pins for the same page are in
1717 * `ResourceListPage.declaredSharingRules-12982.test.tsx`.
@@ -30,9 +30,10 @@ test.use({ viewport: { width: 1440, height: 1000 } });
3030
3131test ( 'at 1440 px, Clone and the Active switch are inside the viewport and the table box' , async ( { page } ) => {
3232 await page . goto ( LIST ) ;
33- // The table's own scroll box, found by structure rather than by a test id,
34- // so the measurement reads the same element before and after the fix.
35- const scroller = page . locator ( 'table' ) . first ( ) . locator ( 'xpath=..' ) ;
33+ // The table's own scroll box. objectstack#36897 — the list is drawn by
34+ // ObjectGrid, whose table box marks itself (`data-table-scroll-box`); the
35+ // table's parent is no longer the element that scrolls.
36+ const scroller = page . locator ( '[data-table-scroll-box]' ) . first ( ) ;
3637 await expect ( scroller ) . toBeVisible ( ) ;
3738 const clone = page . locator ( '[data-testid^="catalog-clone-"]' ) . first ( ) ;
3839 const active = page . locator ( '[data-testid^="catalog-active-"]' ) . first ( ) ;
@@ -50,9 +51,9 @@ test('at 1440 px, Clone and the Active switch are inside the viewport and the ta
5051 expect ( b . x + b . width , `${ what } ends inside the table box` ) . toBeLessThanOrEqual ( frame . x + frame . width + 0.5 ) ;
5152 }
5253
53- // The box reports its overflow, which is what draws the seam shadow.
54+ // While columns remain to the right, the grid draws its seam shadow.
5455 const widths = await scroller . evaluate ( ( el ) => ( { scroll : el . scrollWidth , client : el . clientWidth } ) ) ;
5556 if ( widths . scroll > widths . client + 1 ) {
56- await expect ( scroller ) . toHaveAttribute ( 'data-overflow- right' , 'true' ) ;
57+ await expect ( page . getByTestId ( 'data-table-scroll-shadow- right' ) . first ( ) ) . toBeVisible ( ) ;
5758 }
5859} ) ;
0 commit comments