From c9f37fce59a1f3001db6c84ed6c323b11bfa5e7a Mon Sep 17 00:00:00 2001 From: Hallie Swan <26949006+hallieswan@users.noreply.github.com> Date: Thu, 2 May 2024 14:30:01 -0700 Subject: [PATCH] AG-1435: improve test naming --- tests/gene-comparison-tool-pinning-ui.spc.ts | 6 +++-- .../gene-comparison-tool-pinning-url.spec.ts | 22 +++++++++---------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/tests/gene-comparison-tool-pinning-ui.spc.ts b/tests/gene-comparison-tool-pinning-ui.spc.ts index 94918ac5..134b49d9 100644 --- a/tests/gene-comparison-tool-pinning-ui.spc.ts +++ b/tests/gene-comparison-tool-pinning-ui.spc.ts @@ -37,7 +37,9 @@ test.describe('GCT: Pinning Genes via UI', () => { }); }); - test('genes can be pinned from quick filters', async ({ page }) => { + test('only 50 genes are pinned when pinning all genes matched by a quick filter', async ({ + page, + }) => { await page.goto(URL_GCT); await expectGctPageLoaded( page, @@ -45,7 +47,7 @@ test.describe('GCT: Pinning Genes via UI', () => { GCT_RNA_SUBCATEGORIES.AD ); - await test.step('only 50 genes are pinned when pinning all genes matched by a quick filter', async () => { + await test.step('apply a quick filter', async () => { await page.getByRole('button', { name: 'Filter Genes' }).click(); await page.getByRole('button', { name: 'Quick Filters' }).click(); await page.getByText('All Nominated targets').click(); diff --git a/tests/gene-comparison-tool-pinning-url.spec.ts b/tests/gene-comparison-tool-pinning-url.spec.ts index 3295e657..aed0d92b 100644 --- a/tests/gene-comparison-tool-pinning-url.spec.ts +++ b/tests/gene-comparison-tool-pinning-url.spec.ts @@ -26,7 +26,7 @@ import { } from './helpers/gct-pinning'; test.describe('GCT: Pinning Genes from URL', () => { - test('when rna differential expression url does not include pinned genes, no genes are pinned', async ({ + test('when RNA url does not include pinned genes, no genes are pinned', async ({ page, }) => { await page.goto(URL_GCT); @@ -41,7 +41,7 @@ test.describe('GCT: Pinning Genes from URL', () => { await confirmPinnedItemsCount(page, 0); }); - test('when protein differential expression url does not include pinned genes, no genes are pinned', async ({ + test('when Protein url does not include pinned genes, no genes are pinned', async ({ page, }) => { await page.goto(URL_GCT_PROTEIN); @@ -56,7 +56,7 @@ test.describe('GCT: Pinning Genes from URL', () => { await confirmPinnedItemsCount(page, 0); }); - test('when rna differential expression url includes 50 pinned genes, all genes are pinned', async ({ + test('when RNA url includes 50 pinned genes, all genes are pinned', async ({ page, }) => { const url = `${URL_GCT}?${formatPinnedGenesQueryParam(fiftyGenes)}`; @@ -82,7 +82,7 @@ test.describe('GCT: Pinning Genes from URL', () => { }); }); - test('when rna differential expression url includes >50 pinned genes, only 50 genes are pinned and toast is displayed', async ({ + test('when RNA url includes >50 pinned genes, only 50 genes are pinned and toast is displayed', async ({ page, }) => { const url = `${URL_GCT}?${formatPinnedGenesQueryParam(fiftyOneGenes)}`; @@ -108,7 +108,7 @@ test.describe('GCT: Pinning Genes from URL', () => { }); }); - test('when rna differential expression url includes invalid gene, that gene is dropped from the url', async ({ + test('when RNA url includes invalid gene, that gene is dropped from the url', async ({ page, }) => { const validGeneId = geneWithMultipleProteinsTMT.ensemblId; @@ -141,7 +141,7 @@ test.describe('GCT: Pinning Genes from URL', () => { }); }); - test('when rna differential expression url includes proteins, the related gene is pinned', async ({ + test('when RNA url includes proteins, the related gene is pinned', async ({ page, }) => { const geneProteins = geneWithMultipleProteinsTMT.uniProtIds.map( @@ -166,7 +166,7 @@ test.describe('GCT: Pinning Genes from URL', () => { }); test.fail( - 'when protein differential expression url includes a gene, all related proteins are pinned', + 'when Protein url includes a gene, all related proteins are pinned', async ({ page }) => { const url = `${URL_GCT_PROTEIN_TMT}&${formatPinnedGenesQueryParam([ geneWithMultipleProteinsTMT.ensemblId, @@ -194,7 +194,7 @@ test.describe('GCT: Pinning Genes from URL', () => { ); test.fail( - 'when protein differential expression url includes 50 proteins from 50 unique genes, all proteins are pinned', + 'when Protein url includes 50 proteins from 50 unique genes, all proteins are pinned', async ({ page }) => { const url = `${URL_GCT_PROTEIN_TMT}&${formatPinnedGenesQueryParam( fiftyProteinsToFiftyUniqueGenesTMT @@ -216,7 +216,7 @@ test.describe('GCT: Pinning Genes from URL', () => { ); test.fail( - 'when protein differential expression url includes >50 proteins from 50 unique genes, all proteins are pinned', + 'when Protein url includes >50 proteins from 50 unique genes, all proteins are pinned', async ({ page }) => { const fortyNineProteinsToUniqueGenes = fiftyProteinsToFiftyUniqueGenesTMT.slice(0, -1); @@ -261,7 +261,7 @@ test.describe('GCT: Pinning Genes from URL', () => { ); test.fail( - 'when protein differential expression url includes proteins from 51 unique genes, only proteins from 50 genes are pinned', + 'when Protein url includes proteins from 51 unique genes, only proteins from 50 genes are pinned', async ({ page }) => { const oneGeneWithManyProteins = geneWithMultipleProteinsTMT.uniProtIds.map( @@ -304,7 +304,7 @@ test.describe('GCT: Pinning Genes from URL', () => { ); test.fail( - 'when protein differential expression url includes invalid protein, that protein is dropped from the url', + 'when Protein url includes invalid protein, that protein is dropped from the url', async ({ page }) => { const validGeneProtein = fiftyProteinsToFiftyUniqueGenesTMT[1]; const url = `${URL_GCT_PROTEIN_TMT}&${formatPinnedGenesQueryParam([