Skip to content

Commit

Permalink
Fix selectors for autoscroll tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jtpio committed Oct 3, 2022
1 parent 4ae8e8d commit 6ac4a95
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions ui-tests/test/notebook.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,18 @@ test.describe('Notebook', () => {
await page.goto(`notebooks/${tmpPath}/${notebook}`);

await waitForKernelReady(page);
// run the two cells
await runAndAdvance(page);

// execute the first cell
await runAndAdvance(page);
await page
.locator('.jp-mod-outputsScrolled')
.nth(0)
.waitFor({ state: 'visible' });

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

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

0 comments on commit 6ac4a95

Please sign in to comment.