Skip to content

Commit 6ac4a95

Browse files
committed
Fix selectors for autoscroll tests
1 parent 4ae8e8d commit 6ac4a95

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

ui-tests/test/notebook.spec.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,18 @@ test.describe('Notebook', () => {
7171
await page.goto(`notebooks/${tmpPath}/${notebook}`);
7272

7373
await waitForKernelReady(page);
74-
// run the two cells
75-
await runAndAdvance(page);
74+
75+
// execute the first cell
7676
await runAndAdvance(page);
77+
await page
78+
.locator('.jp-mod-outputsScrolled')
79+
.nth(0)
80+
.waitFor({ state: 'visible' });
7781

78-
await page.waitForSelector('.jp-Cell-outputArea pre');
82+
// execute the second cell
83+
await runAndAdvance(page);
84+
// the second cell should not be auto scrolled
85+
expect(page.locator('.jp-mod-outputsScrolled').nth(1)).toHaveCount(0);
7986

8087
const checkCell = async (n: number): Promise<boolean> => {
8188
const scrolled = await page.$eval(`.jp-Notebook-cell >> nth=${n}`, el =>

0 commit comments

Comments
 (0)