Skip to content

Commit

Permalink
Fix cypress test following j2c (#10484)
Browse files Browse the repository at this point in the history
The current logic introduced a race condition in which the test would only pass if the expect() ran before the app determined that the highlighted line was in fact on the current point and re-rendered.
  • Loading branch information
ryanjduffy authored Apr 12, 2024
1 parent f4bddde commit 2323963
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/e2e-tests/tests/cypress-04_menu-commands.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ test("cypress-04: Test Step buttons and menu item", async ({

await waitForSelectedSource(page, "Link.js");
await waitFor(async () => {
const lineNumber = await getSelectedLineNumber(page, false);
const lineNumber = await getSelectedLineNumber(page, true);
expect(lineNumber).toBe(38);
});

Expand Down

0 comments on commit 2323963

Please sign in to comment.