Skip to content

Commit

Permalink
Fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jesperengstrom committed Aug 29, 2024
1 parent fff497d commit 5502e80
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 6 additions & 3 deletions lxl-web/src/lib/utils/addDefaultSearchParams.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ describe('addDefaultSearchParams', () => {
['_q', '*'],
['_limit', '20'],
['_offset', '0'],
['_sort', '']
['_sort', ''],
['_spell', 'true']
])
);
});
Expand All @@ -18,7 +19,8 @@ describe('addDefaultSearchParams', () => {
['_q', 'test'],
['_limit', '20'],
['_offset', '0'],
['_sort', '']
['_sort', ''],
['_spell', 'true']
])
);
});
Expand All @@ -28,7 +30,8 @@ describe('addDefaultSearchParams', () => {
['_offset', '30'],
['_q', '*'],
['_limit', '20'],
['_sort', '']
['_sort', ''],
['_spell', 'true']
])
);
});
Expand Down
4 changes: 3 additions & 1 deletion lxl-web/tests/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,7 @@ test('url is populated with correct searchparams', async ({ page }) => {
await page.getByTestId('main-search').click();
await page.getByTestId('main-search').fill('somephrase');
await page.getByTestId('main-search').press('Enter');
await expect(page).toHaveURL(/_q=somephrase&_limit=20&_offset=0&_sort=&_i=somephrase/);
await expect(page).toHaveURL(
/_q=somephrase&_limit=20&_offset=0&_sort=&_spell=true&_i=somephrase/
);
});

0 comments on commit 5502e80

Please sign in to comment.