Skip to content

Commit 6306a46

Browse files
mrtopsytjpaten
authored and
jpaten
committed
fix: refactored locators and cleaned up typos in tests (#4078)
1 parent e01b338 commit 6306a46

File tree

2 files changed

+10
-21
lines changed

2 files changed

+10
-21
lines changed

Diff for: explorer/e2e/anvil-catalog/anvilcatalog-tabs-buttons.spec.ts

+3-9
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,17 @@ import { anvilcatalogTabs } from "./anvilcatalog-tabs";
55
test("Expect clicking the consortia tab to go to the correct url and to show all of the relevant columns when selected", async ({
66
page,
77
}) => {
8-
const tab = anvilcatalogTabs.consortia;
9-
await page.goto(anvilcatalogTabs.studies.url);
10-
await testTab(page, tab);
8+
await testTab(page, anvilcatalogTabs.studies, anvilcatalogTabs.consortia);
119
});
1210

1311
test("Expect clicking the studies tab to go to the correct url and to show all of the relevant columns when selected", async ({
1412
page,
1513
}) => {
16-
const tab = anvilcatalogTabs.studies;
17-
await page.goto(anvilcatalogTabs.workspaces.url);
18-
await testTab(page, tab);
14+
await testTab(page, anvilcatalogTabs.workspaces, anvilcatalogTabs.studies);
1915
});
2016

2117
test("Expect clicking the workspaces tab to go to the correct url and to show all of the relevant columns when selected", async ({
2218
page,
2319
}) => {
24-
const tab = anvilcatalogTabs.workspaces;
25-
await page.goto(anvilcatalogTabs.consortia.url);
26-
await testTab(page, tab);
20+
await testTab(page, anvilcatalogTabs.consortia, anvilcatalogTabs.workspaces);
2721
});

Diff for: explorer/e2e/anvil/anvil-tabs-buttons.spec.ts

+7-12
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,32 @@ import { test } from "@playwright/test";
22
import { testTab } from "../testFunctions";
33
import { anvilTabs } from "./anvil-tabs";
44

5-
test("Expect clicking the datasets tab to go to the correct url and to show all of the relevant columns when selected", async ({
5+
test("Expect clicking the activities tab to go to the correct url and to show all of the relevant columns when selected", async ({
66
page,
77
}) => {
8-
await page.goto(anvilTabs.activities.url);
9-
await testTab(page, anvilTabs.datasets);
8+
await testTab(page, anvilTabs.datasets, anvilTabs.activities);
109
});
1110

12-
test("Expect clicking the activities tab to go to the correct url and to show all of the relevant columns when selected", async ({
11+
test("Expect clicking the datasets tab to go to the correct url and to show all of the relevant columns when selected", async ({
1312
page,
1413
}) => {
15-
await page.goto(anvilTabs.datasets.url);
16-
await testTab(page, anvilTabs.activities);
14+
await testTab(page, anvilTabs.activities, anvilTabs.datasets);
1715
});
1816

1917
test("Expect clicking the files tab to go to the correct url and to show all of the relevant columns when selected", async ({
2018
page,
2119
}) => {
22-
await page.goto(anvilTabs.datasets.url);
23-
await testTab(page, anvilTabs.files);
20+
await testTab(page, anvilTabs.datasets, anvilTabs.files);
2421
});
2522

2623
test("Expect clicking the donors tab to go to the correct url and to show all of the relevant columns when selected", async ({
2724
page,
2825
}) => {
29-
await page.goto(anvilTabs.datasets.url);
30-
await testTab(page, anvilTabs.donors);
26+
await testTab(page, anvilTabs.datasets, anvilTabs.donors);
3127
});
3228

3329
test("Expect clicking the biosamples tab to go to the correct url and to show all of the relevant columns when selected", async ({
3430
page,
3531
}) => {
36-
await page.goto(anvilTabs.datasets.url);
37-
await testTab(page, anvilTabs.biosamples);
32+
await testTab(page, anvilTabs.datasets, anvilTabs.biosamples);
3833
});

0 commit comments

Comments
 (0)