diff --git a/src/app/features/genes/components/gene-comparison-tool/gene-comparison-tool.component.html b/src/app/features/genes/components/gene-comparison-tool/gene-comparison-tool.component.html index b88f662c..e8ab193f 100644 --- a/src/app/features/genes/components/gene-comparison-tool/gene-comparison-tool.component.html +++ b/src/app/features/genes/components/gene-comparison-tool/gene-comparison-tool.component.html @@ -231,6 +231,7 @@

Gene Comparison Tool

{{ subCategoryLabel }}
{ + test.slow(); + test.use({ viewport: { width: 1600, height: 1200 } }); + + test('has title', async ({ page }) => { + await page.goto('/genes/comparison?category=Protein+-+Differential+Expression'); + + // wait for page to load (i.e. spinner to disappear) + await expect(page.locator('div:nth-child(4) > div > .spinner')) + .not.toBeVisible({ timeout: 250000}); + + // Expect a title "to contain" a substring. + await expect(page).toHaveTitle('Gene Comparison | Visual comparison tool for AD genes'); + }); + + test('sub-category is SRM by default', async ({ page }) => { + test.slow(); + // set category for Protein - Differential Expression + await page.goto('/genes/comparison?category=Protein+-+Differential+Expression'); + + // wait for page to load (i.e. spinner to disappear) + await expect(page.locator('div:nth-child(4) > div > .spinner')) + .not.toBeVisible({ timeout: 150000}); + + // expect sub-category dropdown to be SRM + const dropdown = await page.locator('#subCategory'); + await expect(dropdown).toHaveText('Targeted Selected Reaction Monitoring (SRM)'); + }); +});