Skip to content

Commit

Permalink
Merge pull request #19290 from timvandermeij/integration-tests-use-wa…
Browse files Browse the repository at this point in the history
…itforunselectededitor

Use the `waitForUnselectedEditor` integration test helper function more
  • Loading branch information
timvandermeij authored Jan 5, 2025
2 parents 4d4e1be + 5126210 commit 26b0d4f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions test/integration/highlight_editor_spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import {
waitForSelectedEditor,
waitForSerialized,
waitForTimeout,
waitForUnselectedEditor,
} from "./test_utils.mjs";
import { fileURLToPath } from "url";
import fs from "fs";
Expand Down Expand Up @@ -1044,9 +1045,7 @@ describe("Highlight Editor", () => {
await page.mouse.click(x, y, { count: 2, delay: 100 });
await page.waitForSelector(`${getEditorSelector(0)}`);
await page.keyboard.press("Escape");
await page.waitForSelector(
`${getEditorSelector(0)}:not(.selectedEditor)`
);
await waitForUnselectedEditor(page, getEditorSelector(0));

await setCaretAt(
page,
Expand Down Expand Up @@ -1797,7 +1796,7 @@ describe("Highlight Editor", () => {
await page.waitForSelector(editorSelector);
await waitForSerialized(page, 1);
await page.keyboard.press("Escape");
await page.waitForSelector(`${editorSelector}:not(.selectedEditor)`);
await waitForUnselectedEditor(page, editorSelector);

const clickHandle = await waitForPointerUp(page);
y = rect.y - rect.height;
Expand Down Expand Up @@ -1868,7 +1867,7 @@ describe("Highlight Editor", () => {
await page.waitForSelector(editorSelector);
await waitForSerialized(page, 1);
await page.keyboard.press("Escape");
await page.waitForSelector(`${editorSelector}:not(.selectedEditor)`);
await waitForUnselectedEditor(page, editorSelector);

const clickHandle = await waitForPointerUp(page);
y = rect.y - 3 * rect.height;
Expand Down

0 comments on commit 26b0d4f

Please sign in to comment.