Skip to content

Commit

Permalink
Fix integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fcollonval committed Oct 15, 2023
1 parent f99a456 commit 016041f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ui-tests/tests/search.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ test('should get 5 matches', async ({ page, tmpPath }) => {

// Check the match is selected in the editor
await page.getByLabel('conftest.py').getByRole('textbox').waitFor();
expect(await page.evaluate(() => `${window.getSelection()}`)).toEqual(
'strange'
const selection = await page.waitForFunction(
() => `${window.getSelection()}`
);
expect(selection).toEqual('strange');

Check failure on line 57 in ui-tests/tests/search.spec.ts

View workflow job for this annotation

GitHub Actions / Integration tests

tests/search.spec.ts:14:5 › should get 5 matches

1) tests/search.spec.ts:14:5 › should get 5 matches ────────────────────────────────────────────── Error: expect(received).toEqual(expected) // deep equality Expected: "strange" Received: {"_guid": "handle@1e34cfc699a21b31e117144c5d906147", "_type": "JSHandle"} 55 | () => `${window.getSelection()}` 56 | ); > 57 | expect(selection).toEqual('strange'); | ^ 58 | }); 59 | 60 | test('should get no matches', async ({ page }) => { at /home/runner/work/search-replace/search-replace/ui-tests/tests/search.spec.ts:57:21
});

test('should get no matches', async ({ page }) => {
Expand Down Expand Up @@ -271,7 +272,7 @@ test('should replace results on replace-all button', async ({ page }) => {

await page
.getByRole('textbox', { name: 'Search Files for Text' })
.fill('hola');
.fill('hello');
await Promise.all([
page.waitForResponse(
response =>
Expand Down

0 comments on commit 016041f

Please sign in to comment.