Skip to content

Commit

Permalink
✅ Update search test
Browse files Browse the repository at this point in the history
  • Loading branch information
zivavu committed May 23, 2024
1 parent f904df9 commit c414cbd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/tests/algoliaSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ test('first search result contains user info and is clickable', async (t) => {
const searchInput = Selector('[data-testid="search-input"]');
const userResultsLinks = Selector('a[data-testid^="search-result-list-item-"]');

await t.expect(searchInput.exists).ok({ timeout: 2000 });

await t.typeText(searchInput, 'a');

const userResultsCount = await userResultsLinks.count;
await t.expect(userResultsCount).gte(1, { timeout: 2000 });
await t.expect(userResultsCount).gte(1, { timeout: 4000 });

const firstUserListItem = userResultsLinks.nth(0);

Expand Down

0 comments on commit c414cbd

Please sign in to comment.