Skip to content

Commit

Permalink
test: removed duplicate test, added missing tsdocs (#4124)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpaten committed Sep 18, 2024
1 parent dddee60 commit 6633bed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
10 changes: 0 additions & 10 deletions explorer/e2e/anvil/anvil-filters.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,16 +186,6 @@ test('Check that selecting filters through the "Search all Filters" textbox work
);
});

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,
}) => {
Expand Down
9 changes: 6 additions & 3 deletions explorer/e2e/testFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ export async function testSortCatalog(
const columnNameArray = (
await page.getByRole("columnheader").allInnerTexts()
).map((entry) => entry.trim());
console.log(columnNameArray);
const columnObjectArray = Array.from(Object.values(tab.preselectedColumns));
for (
let columnPosition = 0;
Expand Down Expand Up @@ -420,10 +419,14 @@ export const getFirstFilterOptionLocator = (page: Page): Locator => {
.first();
};

/**
* Gets the name of the filter option associated with a locator
* @param firstFilterOptionLocator - a Playwright locator to the filter option
* @returns the name of the filter option as a promise
*/
export const getFilterOptionName = async (
firstFilterOptionLocator: Locator
): Promise<string> => {
console.log(await firstFilterOptionLocator.innerText());
// Filter options display as "[text]\n[number]" , sometimes with extra whitespace, so we split on newlines and take the first non-empty string
return (
(await firstFilterOptionLocator.innerText())
Expand All @@ -434,7 +437,7 @@ export const getFilterOptionName = async (
};

/**
* Cheks that selecting a specified filter is persistent across the tabs in tabOrder
* Checks that selecting a specified filter is persistent across the tabs in tabOrder
* @param page - a Playwright page object
* @param testFilterName - the name of the filter to check
* @param tabOrder - the tabs to check, in order. The filter will be selected on the first tab.
Expand Down

0 comments on commit 6633bed

Please sign in to comment.