Skip to content

Commit

Permalink
Ensure that we match the right completer and scroll to right place
Browse files Browse the repository at this point in the history
  • Loading branch information
krassowski committed Dec 25, 2022
1 parent 4f1ba3b commit b8a9ca4
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/scenarios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ export class CompleterScenario
this.editor!.querySelector('.CodeMirror-scroll')! ||
this.editor!.querySelector('.cm-scroller')!;
scrollArea.scrollBy({
top: 500,
top: 20 * this.options.setup.tokenCount,
left: 0,
behavior: 'smooth'
});
Expand Down Expand Up @@ -280,8 +280,12 @@ export class CompleterScenario
// need to query for a completer with programatically set styles (which are
// things like position (top/left/width/height) which are only present in the
// active completer
await page.waitForSelector('.jp-Completer[style]', { state: 'attached' });
await page.waitForSelector('.jp-Completer[style]', { state: 'visible' });
await page.waitForSelector('.jp-Completer.jp-HoverBox[style]', {
state: 'attached'
});
await page.waitForSelector('.jp-Completer.jp-HoverBox[style]', {
state: 'visible'
});
await layoutReady();
}

Expand Down

0 comments on commit b8a9ca4

Please sign in to comment.