Skip to content

Commit d544242

Browse files
committed
tests
1 parent e56fb9e commit d544242

File tree

2 files changed

+28
-17
lines changed

2 files changed

+28
-17
lines changed

frontend/src/lib/components/general/HeaderIcon.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
class="m-auto flex cursor-pointer items-center p-3 hover:bg-black-transparent"
1313
on:click
1414
use:tooltip={{ text: tooltipContent }}
15+
aria-label={pageName}
1516
>
1617
<div class="h-6 w-6 fill-grey">
1718
<Icon style="outline:none" tag="svg" viewBox="0 0 24 24">

frontend/tests/project.test.ts

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,34 @@ test('can see project header', async ({ page }) => {
1212
await expect(page.getByRole('heading', { name: 'GPT MT Benchmarks' })).toBeVisible();
1313
});
1414

15-
test('slice and tags are present', async ({ page }) => {
16-
await expect(page.getByRole('button', { name: 'All instances' })).toBeVisible();
17-
await expect(page.getByRole('button', { name: 'short latin' })).toBeVisible();
18-
await expect(page.getByRole('button', { name: 'random tag' })).toBeVisible();
15+
test('can see overview table', async ({ page }) => {
16+
await expect(page.getByRole('heading', { name: 'Overview Table' })).toBeVisible();
1917
});
2018

21-
test('can filter by slice', async ({ page }) => {
22-
await page.getByText('short latin').click();
23-
const grid = await page.locator('.grid').first();
24-
await expect(grid.getByRole('button').first()).toContainText(
25-
"That didn't seem to make sense to me; it certainly wasn't fair."
26-
);
27-
});
19+
test.describe('explore', () => {
20+
test.beforeEach(async ({ page }) => {
21+
await page.locator("button[aria-label='explore']").click();
22+
});
23+
24+
test('slice and tags are present', async ({ page }) => {
25+
await expect(page.getByRole('button', { name: 'All instances' })).toBeVisible();
26+
await expect(page.getByRole('button', { name: 'short latin' })).toBeVisible();
27+
await expect(page.getByRole('button', { name: 'random tag' })).toBeVisible();
28+
});
29+
30+
test('can filter by slice', async ({ page }) => {
31+
await page.getByText('short latin').click();
32+
const grid = await page.locator('.grid').first();
33+
await expect(grid.getByRole('button').first()).toContainText(
34+
"That didn't seem to make sense to me; it certainly wasn't fair."
35+
);
36+
});
2837

29-
test('can filter by tag', async ({ page }) => {
30-
await page.getByText('random tag').click();
31-
const grid = await page.locator('.grid').first();
32-
await expect(grid.getByRole('button').first()).toContainText(
33-
'All I say to people is you treat us the way we treat you.'
34-
);
38+
test('can filter by tag', async ({ page }) => {
39+
await page.getByText('random tag').click();
40+
const grid = await page.locator('.grid').first();
41+
await expect(grid.getByRole('button').first()).toContainText(
42+
'All I say to people is you treat us the way we treat you.'
43+
);
44+
});
3545
});

0 commit comments

Comments
 (0)