-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
8 changed files
with
227 additions
and
59 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
explorer/e2e/anvil-catalog/anvilcatalog-select-tabs.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { test } from "@playwright/test"; | ||
import { | ||
testPreSelectedColumns, | ||
testSelectableColumns, | ||
} from "../testFunctions"; | ||
import { anvilcatalogTabs } from "./anvilcatalog-tabs"; | ||
|
||
test("Expect the checkboxes in the 'Edit Columns' menu to add those columns to the tab in the Consortia tab", async ({ | ||
page, | ||
}) => { | ||
const tab = anvilcatalogTabs.consortia; | ||
await testSelectableColumns(page, tab); | ||
}); | ||
|
||
test("Expect the checkboxes for preselected columns in the 'Edit Columns' menu to be checked and disabled on the consortia tab", async ({ | ||
page, | ||
}) => { | ||
const tab = anvilcatalogTabs.consortia; | ||
await testPreSelectedColumns(page, tab); | ||
}); | ||
|
||
test("Expect the checkboxes for preselected columns in the 'Edit Columns' menu to be checked and disabled on the studies tab", async ({ | ||
page, | ||
}) => { | ||
const tab = anvilcatalogTabs.studies; | ||
await testPreSelectedColumns(page, tab); | ||
}); | ||
|
||
test("Expect the checkboxes for preselected columns in the 'Edit Columns' menu to be checked and disabled on the workspaces tab", async ({ | ||
page, | ||
}) => { | ||
const tab = anvilcatalogTabs.workspaces; | ||
await testPreSelectedColumns(page, tab); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { test } from "@playwright/test"; | ||
import { testSort } from "../testFunctions"; | ||
import { anvilcatalogTabs } from "./anvilcatalog-tabs"; | ||
|
||
test.describe.configure({ mode: "parallel" }); | ||
|
||
test("Expect clicking the column header to change the first displayed entry in each column on the consortia tab, except where all tabs have the same values", async ({ | ||
page, | ||
}) => { | ||
await testSort(page, anvilcatalogTabs.consortia); | ||
}); | ||
|
||
test.setTimeout(120000); | ||
test("Expect clicking the column header to change the first displayed entry in each column on the studies tab, except where all tabs have the same values", async ({ | ||
page, | ||
}) => { | ||
await testSort(page, anvilcatalogTabs.studies); | ||
}); | ||
|
||
test("Expect clicking the column header to change the first displayed entry in each column on the workspaces tab, except where all tabs have the same values", async ({ | ||
page, | ||
}) => { | ||
await testSort(page, anvilcatalogTabs.workspaces); | ||
}); |
27 changes: 27 additions & 0 deletions
27
explorer/e2e/anvil-catalog/anvilcatalog-tabs-buttons.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { test } from "@playwright/test"; | ||
import { testTab } from "../testFunctions"; | ||
import { anvilcatalogTabs } from "./anvilcatalog-tabs"; | ||
|
||
test("Expect clicking the consortia tab to go to the correct url and to show all of the relevant columns when selected", async ({ | ||
page, | ||
}) => { | ||
const tab = anvilcatalogTabs.consortia; | ||
await page.goto(anvilcatalogTabs.studies.url); | ||
await testTab(page, tab); | ||
}); | ||
|
||
test("Expect clicking the studies tab to go to the correct url and to show all of the relevant columns when selected", async ({ | ||
page, | ||
}) => { | ||
const tab = anvilcatalogTabs.studies; | ||
await page.goto(anvilcatalogTabs.consortia.url); | ||
await testTab(page, tab); | ||
}); | ||
|
||
test("Expect clicking the workspaces tab to go to the correct url and to show all of the relevant columns when selected", async ({ | ||
page, | ||
}) => { | ||
const tab = anvilcatalogTabs.workspaces; | ||
await page.goto(anvilcatalogTabs.workspaces.url); | ||
await testTab(page, tab); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/* eslint-disable sonarjs/no-duplicate-string -- ignoring duplicate strings here */ | ||
|
||
import { AnvilCatalogTabCollection, TabDescription } from "../testInterfaces"; | ||
|
||
export const anvilcatalogTabs: AnvilCatalogTabCollection = { | ||
consortia: { | ||
emptyFirstColumn: false, | ||
preselectedColumns: [ | ||
{ name: "Consortium", sortable: true }, | ||
{ name: "dbGap Id", sortable: true }, | ||
{ name: "Consent Codes", sortable: true }, | ||
{ name: "Disease (indication)", sortable: true }, | ||
{ name: "Data Type", sortable: true }, | ||
{ name: "Study Design", sortable: true }, | ||
{ name: "Participants", sortable: true }, | ||
{ name: "Size (TB)", sortable: true }, | ||
], | ||
selectableColumns: [ | ||
{ name: "Study", sortable: true }, | ||
{ name: "Workspaces", sortable: true }, | ||
], | ||
tabName: "Consortia", | ||
url: "/data/consortia", | ||
}, | ||
studies: { | ||
emptyFirstColumn: false, | ||
preselectedColumns: [ | ||
{ name: "Study", sortable: true }, | ||
{ name: "dbGap Id", sortable: true }, | ||
{ name: "Consortium", sortable: true }, | ||
{ name: "Consent Codes", sortable: true }, | ||
{ name: "Disease (indication)", sortable: true }, | ||
{ name: "Data Type", sortable: true }, | ||
{ name: "Study Design", sortable: true }, | ||
{ name: "Workspaces", sortable: true }, | ||
{ name: "Participants", sortable: true }, | ||
{ name: "Size (TB)", sortable: true }, | ||
], | ||
selectableColumns: [], | ||
tabName: "Studies", | ||
url: "/data/studies", | ||
}, | ||
workspaces: { | ||
emptyFirstColumn: false, | ||
preselectedColumns: [ | ||
{ name: "Consortium", sortable: true }, | ||
{ name: "Terra Workspace", sortable: true }, | ||
{ name: "Study", sortable: true }, | ||
{ name: "dbGap Id", sortable: true }, | ||
{ name: "Consent Code", sortable: true }, | ||
{ name: "Disease (indication)", sortable: true }, | ||
{ name: "Data Type", sortable: true }, | ||
{ name: "Study Design", sortable: true }, | ||
{ name: "Participants", sortable: true }, | ||
{ name: "Size (TB)", sortable: true }, | ||
], | ||
selectableColumns: [], | ||
tabName: "Workspaces", | ||
url: "/data/workspaces", | ||
}, | ||
}; | ||
|
||
export const anvilCatalogTabList: TabDescription[] = [ | ||
anvilcatalogTabs.consortia, | ||
anvilcatalogTabs.studies, | ||
anvilcatalogTabs.workspaces, | ||
]; | ||
|
||
/* eslint-enable sonarjs/no-duplicate-string -- Checking duplicate strings again*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,24 @@ | ||
import { expect, test } from "@playwright/test"; | ||
/* eslint-disable sonarjs/no-duplicate-string -- ignoring duplicate strings here */ | ||
import { test } from "@playwright/test"; | ||
import { testUrl } from "../testFunctions"; | ||
import { anvilCatalogTabList, anvilcatalogTabs } from "./anvilcatalog-tabs"; | ||
|
||
test("Expect workspaces url to go to workspaces tab", async ({ page }) => { | ||
await page.goto("/data/workspaces"); | ||
await expect( | ||
page.locator("_react=Tabs >> button >> text='Workspaces'") | ||
).toHaveAttribute("aria-selected", "true"); | ||
await expect( | ||
page.locator("text='Terra Workspace Name' >> nth=0") | ||
).toBeVisible(); | ||
test("Expect the consortia tab to appear as selected when the corresponding url is accessed", async ({ | ||
page, | ||
}) => { | ||
const tab = anvilcatalogTabs.consortia; | ||
await testUrl(page, tab, anvilCatalogTabList); | ||
}); | ||
|
||
test("Expect studies url to go to studies tab", async ({ page }) => { | ||
await page.goto("/data/studies"); | ||
await expect( | ||
page.locator("_react=Tabs >> button >> text='Studies'") | ||
).toHaveAttribute("aria-selected", "true"); | ||
await expect(page.locator("text='Study Design' >> nth=0")).toBeVisible(); | ||
test("Expect the studies tab to appear as selected when the corresponding url is accessedb", async ({ | ||
page, | ||
}) => { | ||
const tab = anvilcatalogTabs.studies; | ||
await testUrl(page, tab, anvilCatalogTabList); | ||
}); | ||
|
||
test("Expect consortia url to go to consortia tab", async ({ page }) => { | ||
await page.goto("/data/consortia"); | ||
await expect( | ||
page.locator("_react=Tabs >> button >> text='Consortia'") | ||
).toHaveAttribute("aria-selected", "true"); | ||
await expect(page.locator("text='Study Design' >> nth=0")).toBeVisible(); | ||
test("Expect the workspaces tab to appear as selected when the corresponding url is accessed", async ({ | ||
page, | ||
}) => { | ||
const tab = anvilcatalogTabs.workspaces; | ||
await testUrl(page, tab, anvilCatalogTabList); | ||
}); | ||
|
||
/* eslint-enable sonarjs/no-duplicate-string -- Checking duplicate strings again*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters