Skip to content

Commit

Permalink
Sleep after click, not after locator
Browse files Browse the repository at this point in the history
  • Loading branch information
xbtmatt committed Nov 4, 2024
1 parent cc0f162 commit 4e4f996
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/typescript/frontend/tests/e2e/market-order.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ test("check sorting order", async ({ page }) => {

// Sort by bump order.
await bumpOrder.click();
await sleep(2000);

// Expect the markets to be in bump order.
marketGridItems = page.locator("#emoji-grid a").getByTitle(/RAT,/, { exact: true });
await sleep(2000);
expect(marketGridItems).toHaveText(patterns.reverse());

Check failure on line 82 in src/typescript/frontend/tests/e2e/market-order.spec.ts

View workflow job for this annotation

GitHub Actions / playwright-tests

[firefox] › market-order.spec.ts:6:5 › check sorting order

1) [firefox] › market-order.spec.ts:6:5 › check sorting order ──────────────────────────────────── Error: expect(locator).toHaveText(expected) Locator: locator('#emoji-grid a').getByTitle(/RAT,/) Expected: [/rat,sauropod/, /rat,eagle/, /rat,dog/, /rat,cat/] Received: undefined Call log: - expect.toHaveText with timeout 5000ms - waiting for locator('#emoji-grid a').getByTitle(/RAT,/) 80 | // Expect the markets to be in bump order. 81 | marketGridItems = page.locator("#emoji-grid a").getByTitle(/RAT,/, { exact: true }); > 82 | expect(marketGridItems).toHaveText(patterns.reverse()); | ^ 83 | }); 84 | at /home/runner/work/emojicoin-dot-fun/emojicoin-dot-fun/src/typescript/frontend/tests/e2e/market-order.spec.ts:82:27
});

0 comments on commit 4e4f996

Please sign in to comment.