Skip to content

Commit

Permalink
test: added select filter tests to anvil-cmg (#4124)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpaten committed Sep 17, 2024
1 parent 6eb4259 commit 4d70158
Showing 1 changed file with 112 additions and 0 deletions.
112 changes: 112 additions & 0 deletions explorer/e2e/anvil/anvil-filters.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ import {
filterRegex,
getFirstRowNthColumnCellLocator,
testClearAll,
testDeselectFiltersThroughSearchBar,
testFilterCounts,
testFilterPersistence,
testFilterPresence,
testFilterTags,
testSelectFiltersThroughSearchBar,
} from "../testFunctions";
import {
ANVIL_FILTER_NAMES,
Expand Down Expand Up @@ -173,3 +175,113 @@ test("Check that the clear all button functions on the files tab", async ({
FILTER_INDEX_LIST_SHORT.map((x) => ANVIL_FILTER_NAMES[x])
);
});

test('Check that selecting filters through the "Search all Filters" textbox works correctly on the Datasets tab', async ({
page,
}) => {
await testSelectFiltersThroughSearchBar(
page,
ANVIL_TABS.DATASETS,
FILTER_INDEX_LIST_SHORT.map((x) => ANVIL_FILTER_NAMES[x])
);
});

test('Check that selecting filters through the "Search all Filters" textbox works correctly on the Datasets tab', async ({
page,
}) => {
await testSelectFiltersThroughSearchBar(
page,
ANVIL_TABS.DATASETS,
FILTER_INDEX_LIST_SHORT.map((x) => ANVIL_FILTER_NAMES[x])
);
});

test('Check that selecting filters through the "Search all Filters" textbox works correctly on the Donors tab', async ({
page,
}) => {
await testSelectFiltersThroughSearchBar(
page,
ANVIL_TABS.DONORS,
FILTER_INDEX_LIST_SHORT.map((x) => ANVIL_FILTER_NAMES[x])
);
});

test('Check that selecting filters through the "Search all Filters" textbox works correctly on the BioSamples tab', async ({
page,
}) => {
await testSelectFiltersThroughSearchBar(
page,
ANVIL_TABS.BIOSAMPLES,
FILTER_INDEX_LIST_SHORT.map((x) => ANVIL_FILTER_NAMES[x])
);
});

test('Check that selecting filters through the "Search all Filters" textbox works correctly on the Activities tab', async ({
page,
}) => {
await testSelectFiltersThroughSearchBar(
page,
ANVIL_TABS.ACTIVITIES,
FILTER_INDEX_LIST_SHORT.map((x) => ANVIL_FILTER_NAMES[x])
);
});

test('Check that selecting filters through the "Search all Filters" textbox works correctly on the Files tab', async ({
page,
}) => {
await testSelectFiltersThroughSearchBar(
page,
ANVIL_TABS.FILES,
FILTER_INDEX_LIST_SHORT.map((x) => ANVIL_FILTER_NAMES[x])
);
});

test('Check that deselecting filters through the "Search all Filters" textbox works correctly on the Datasets tab', async ({
page,
}) => {
await testDeselectFiltersThroughSearchBar(
page,
ANVIL_TABS.DATASETS,
FILTER_INDEX_LIST_SHORT.map((x) => ANVIL_FILTER_NAMES[x])
);
});

test('Check that deselecting filters through the "Search all Filters" textbox works correctly on the Donors tab', async ({
page,
}) => {
await testDeselectFiltersThroughSearchBar(
page,
ANVIL_TABS.DONORS,
FILTER_INDEX_LIST_SHORT.map((x) => ANVIL_FILTER_NAMES[x])
);
});

test('Check that deselecting filters through the "Search all Filters" textbox works correctly on the BioSamples tab', async ({
page,
}) => {
await testDeselectFiltersThroughSearchBar(
page,
ANVIL_TABS.BIOSAMPLES,
FILTER_INDEX_LIST_SHORT.map((x) => ANVIL_FILTER_NAMES[x])
);
});

test('Check that deselecting filters through the "Search all Filters" textbox works correctly on the Activities tab', async ({
page,
}) => {
await testDeselectFiltersThroughSearchBar(
page,
ANVIL_TABS.ACTIVITIES,
FILTER_INDEX_LIST_SHORT.map((x) => ANVIL_FILTER_NAMES[x])
);
});

test('Check that deselecting filters through the "Search all Filters" textbox works correctly on the Files tab', async ({
page,
}) => {
await testDeselectFiltersThroughSearchBar(
page,
ANVIL_TABS.FILES,
FILTER_INDEX_LIST_SHORT.map((x) => ANVIL_FILTER_NAMES[x])
);
});

0 comments on commit 4d70158

Please sign in to comment.