Skip to content

Commit

Permalink
Write test case for annotation search
Browse files Browse the repository at this point in the history
  • Loading branch information
Aman Kumar committed Apr 4, 2024
1 parent 81f0c81 commit 03acbae
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/html-reporter/src/headerView.spec.tsx
Expand Up @@ -27,7 +27,7 @@ test('should render counters', async ({ mount }) => {
flaky: 17,
skipped: 10,
ok: false,
}} filterText='' setFilterText={() => {}}></HeaderView>);
}} filterText='' setFilterText={() => { }}></HeaderView>);
await expect(component.locator('a', { hasText: 'All' }).locator('.counter')).toHaveText('100');
await expect(component.locator('a', { hasText: 'Passed' }).locator('.counter')).toHaveText('42');
await expect(component.locator('a', { hasText: 'Failed' }).locator('.counter')).toHaveText('31');
Expand Down Expand Up @@ -59,5 +59,6 @@ test('should toggle filters', async ({ page, mount }) => {
await expect(page).toHaveURL(/#\?q=s:flaky/);
await component.locator('a', { hasText: 'Skipped' }).click();
await expect(page).toHaveURL(/#\?q=s:skipped/);
expect(filters).toEqual(['', 's:passed', 's:failed', 's:flaky', 's:skipped']);
await component.getByRole('searchbox').fill('a:annotation type=annotation description');
expect(filters).toEqual(['', 's:passed', 's:failed', 's:flaky', 's:skipped', 'a:annotation type=annotation description']);
});

0 comments on commit 03acbae

Please sign in to comment.