Skip to content

Commit

Permalink
chore: fix post-deployment e2e tests (#3751)
Browse files Browse the repository at this point in the history
* update e2e tests

* empty

* remove only

Co-authored-by: atarashansky <atarashansky@CZIMACOS3990.hsd1.ma.comcast.net>
  • Loading branch information
atarashansky and atarashansky authored Dec 14, 2022
1 parent f8e1383 commit 1784dfb
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions frontend/tests/features/wheresMyGene.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ describe("Where's My Gene", () => {
await expect(page).toHaveSelector(getText("STEP 3"));
await expect(page).toHaveSelector(getText("Explore Gene Expression"));

// Beta callout
await expect(page).toHaveSelector(getText("This feature is in beta"));

// Filters Panel
// (thuang): `*` is for intermediate match
// https://playwright.dev/docs/selectors#intermediate-matches
Expand Down Expand Up @@ -241,6 +238,8 @@ describe("Where's My Gene", () => {
const GENE_COUNT = 3;

await clickUntilOptionsShowUp(getTissueSelectorButton, page);
const texts = await page.getByRole("menuitem").allTextContents()
const tissueName = texts[0].replace(/\s+/g, "-");
await selectFirstNOptions(TISSUE_COUNT, page);

await clickUntilOptionsShowUp(getGeneSelectorButton, page);
Expand All @@ -252,7 +251,7 @@ describe("Where's My Gene", () => {
);

const beforeCellTypeNames = await getNames(
`${getTestID(CELL_TYPE_LABELS_ID)} text`,
`${getTestID(`${CELL_TYPE_LABELS_ID}-${tissueName}`)} text`,
page
);

Expand Down Expand Up @@ -280,7 +279,7 @@ describe("Where's My Gene", () => {
);

const afterCellTypeNames = await getNames(
`${getTestID(CELL_TYPE_LABELS_ID)} text`,
`${getTestID(`${CELL_TYPE_LABELS_ID}-${tissueName}`)} text`,
page
);

Expand Down Expand Up @@ -308,11 +307,13 @@ describe("Where's My Gene", () => {
}

await clickUntilOptionsShowUp(getTissueSelectorButton, page);
const texts = await page.getByRole("menuitem").allTextContents()
const tissueName = texts[0].replace(/\s+/g, "-");
await selectFirstNOptions(1, page);

await clickUntilOptionsShowUp(getGeneSelectorButton, page);
await selectFirstNOptions(3, page);

await tryUntil(
async () => {
const canvases = await page.$$("canvas");
Expand All @@ -326,7 +327,7 @@ describe("Where's My Gene", () => {
page
);
const beforeCellTypeNames = await getNames(
`${getTestID(CELL_TYPE_LABELS_ID)} text`,
`${getTestID(`${CELL_TYPE_LABELS_ID}-${tissueName}`)} text`,
page
);

Expand All @@ -343,7 +344,7 @@ describe("Where's My Gene", () => {
page
);
const afterCellTypeNames = await getNames(
`${getTestID(CELL_TYPE_LABELS_ID)} text`,
`${getTestID(`${CELL_TYPE_LABELS_ID}-${tissueName}`)} text`,
page
);

Expand Down Expand Up @@ -383,7 +384,7 @@ describe("Where's My Gene", () => {
await tryUntil(
async () => {
const afterCellTypeNames = await getNames(
`${getTestID(CELL_TYPE_LABELS_ID)} text`,
`${getTestID(`${CELL_TYPE_LABELS_ID}-${tissueName}`)} text`,
page
);

Expand Down

0 comments on commit 1784dfb

Please sign in to comment.