Skip to content

Commit c9f37fc

Browse files
committed
AG-1435: improve test naming
1 parent 1444410 commit c9f37fc

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

tests/gene-comparison-tool-pinning-ui.spc.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,17 @@ test.describe('GCT: Pinning Genes via UI', () => {
3737
});
3838
});
3939

40-
test('genes can be pinned from quick filters', async ({ page }) => {
40+
test('only 50 genes are pinned when pinning all genes matched by a quick filter', async ({
41+
page,
42+
}) => {
4143
await page.goto(URL_GCT);
4244
await expectGctPageLoaded(
4345
page,
4446
GCT_CATEGORIES.RNA,
4547
GCT_RNA_SUBCATEGORIES.AD
4648
);
4749

48-
await test.step('only 50 genes are pinned when pinning all genes matched by a quick filter', async () => {
50+
await test.step('apply a quick filter', async () => {
4951
await page.getByRole('button', { name: 'Filter Genes' }).click();
5052
await page.getByRole('button', { name: 'Quick Filters' }).click();
5153
await page.getByText('All Nominated targets').click();

tests/gene-comparison-tool-pinning-url.spec.ts

+11-11
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import {
2626
} from './helpers/gct-pinning';
2727

2828
test.describe('GCT: Pinning Genes from URL', () => {
29-
test('when rna differential expression url does not include pinned genes, no genes are pinned', async ({
29+
test('when RNA url does not include pinned genes, no genes are pinned', async ({
3030
page,
3131
}) => {
3232
await page.goto(URL_GCT);
@@ -41,7 +41,7 @@ test.describe('GCT: Pinning Genes from URL', () => {
4141
await confirmPinnedItemsCount(page, 0);
4242
});
4343

44-
test('when protein differential expression url does not include pinned genes, no genes are pinned', async ({
44+
test('when Protein url does not include pinned genes, no genes are pinned', async ({
4545
page,
4646
}) => {
4747
await page.goto(URL_GCT_PROTEIN);
@@ -56,7 +56,7 @@ test.describe('GCT: Pinning Genes from URL', () => {
5656
await confirmPinnedItemsCount(page, 0);
5757
});
5858

59-
test('when rna differential expression url includes 50 pinned genes, all genes are pinned', async ({
59+
test('when RNA url includes 50 pinned genes, all genes are pinned', async ({
6060
page,
6161
}) => {
6262
const url = `${URL_GCT}?${formatPinnedGenesQueryParam(fiftyGenes)}`;
@@ -82,7 +82,7 @@ test.describe('GCT: Pinning Genes from URL', () => {
8282
});
8383
});
8484

85-
test('when rna differential expression url includes >50 pinned genes, only 50 genes are pinned and toast is displayed', async ({
85+
test('when RNA url includes >50 pinned genes, only 50 genes are pinned and toast is displayed', async ({
8686
page,
8787
}) => {
8888
const url = `${URL_GCT}?${formatPinnedGenesQueryParam(fiftyOneGenes)}`;
@@ -108,7 +108,7 @@ test.describe('GCT: Pinning Genes from URL', () => {
108108
});
109109
});
110110

111-
test('when rna differential expression url includes invalid gene, that gene is dropped from the url', async ({
111+
test('when RNA url includes invalid gene, that gene is dropped from the url', async ({
112112
page,
113113
}) => {
114114
const validGeneId = geneWithMultipleProteinsTMT.ensemblId;
@@ -141,7 +141,7 @@ test.describe('GCT: Pinning Genes from URL', () => {
141141
});
142142
});
143143

144-
test('when rna differential expression url includes proteins, the related gene is pinned', async ({
144+
test('when RNA url includes proteins, the related gene is pinned', async ({
145145
page,
146146
}) => {
147147
const geneProteins = geneWithMultipleProteinsTMT.uniProtIds.map(
@@ -166,7 +166,7 @@ test.describe('GCT: Pinning Genes from URL', () => {
166166
});
167167

168168
test.fail(
169-
'when protein differential expression url includes a gene, all related proteins are pinned',
169+
'when Protein url includes a gene, all related proteins are pinned',
170170
async ({ page }) => {
171171
const url = `${URL_GCT_PROTEIN_TMT}&${formatPinnedGenesQueryParam([
172172
geneWithMultipleProteinsTMT.ensemblId,
@@ -194,7 +194,7 @@ test.describe('GCT: Pinning Genes from URL', () => {
194194
);
195195

196196
test.fail(
197-
'when protein differential expression url includes 50 proteins from 50 unique genes, all proteins are pinned',
197+
'when Protein url includes 50 proteins from 50 unique genes, all proteins are pinned',
198198
async ({ page }) => {
199199
const url = `${URL_GCT_PROTEIN_TMT}&${formatPinnedGenesQueryParam(
200200
fiftyProteinsToFiftyUniqueGenesTMT
@@ -216,7 +216,7 @@ test.describe('GCT: Pinning Genes from URL', () => {
216216
);
217217

218218
test.fail(
219-
'when protein differential expression url includes >50 proteins from 50 unique genes, all proteins are pinned',
219+
'when Protein url includes >50 proteins from 50 unique genes, all proteins are pinned',
220220
async ({ page }) => {
221221
const fortyNineProteinsToUniqueGenes =
222222
fiftyProteinsToFiftyUniqueGenesTMT.slice(0, -1);
@@ -261,7 +261,7 @@ test.describe('GCT: Pinning Genes from URL', () => {
261261
);
262262

263263
test.fail(
264-
'when protein differential expression url includes proteins from 51 unique genes, only proteins from 50 genes are pinned',
264+
'when Protein url includes proteins from 51 unique genes, only proteins from 50 genes are pinned',
265265
async ({ page }) => {
266266
const oneGeneWithManyProteins =
267267
geneWithMultipleProteinsTMT.uniProtIds.map(
@@ -304,7 +304,7 @@ test.describe('GCT: Pinning Genes from URL', () => {
304304
);
305305

306306
test.fail(
307-
'when protein differential expression url includes invalid protein, that protein is dropped from the url',
307+
'when Protein url includes invalid protein, that protein is dropped from the url',
308308
async ({ page }) => {
309309
const validGeneProtein = fiftyProteinsToFiftyUniqueGenesTMT[1];
310310
const url = `${URL_GCT_PROTEIN_TMT}&${formatPinnedGenesQueryParam([

0 commit comments

Comments
 (0)