From f37dcb437e8eb35b35607bfd578956e02faa9157 Mon Sep 17 00:00:00 2001 From: sagely1 <114952739+sagely1@users.noreply.github.com> Date: Mon, 4 Dec 2023 00:12:49 -0800 Subject: [PATCH] AG-1213 add AMP-PD explorer link --- .../gene-resources.component.html | 3 +-- .../gene-resources.component.ts | 6 +++++ tests/gene-resources.spec.ts | 24 +++++++++++++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 tests/gene-resources.spec.ts diff --git a/src/app/features/genes/components/gene-resources/gene-resources.component.html b/src/app/features/genes/components/gene-resources/gene-resources.component.html index 8321000a..a3b06208 100644 --- a/src/app/features/genes/components/gene-resources/gene-resources.component.html +++ b/src/app/features/genes/components/gene-resources/gene-resources.component.html @@ -63,8 +63,7 @@

Target Enabling Resources

Additional Resources

- These external sites provide useful AD-specific or general information - for exploring targets. + These external sites provide additional useful information for exploring AD targets.

{ + test.use({ viewport: { width: 1600, height: 1200 } }); + + test('has title', async ({ page }) => { + await page.goto('/genes/ENSG00000178209/resources'); + + // Expect a title "to contain" a substring. + await expect(page).toHaveTitle('Agora'); + }); + + test('AMP-PD explorer link to go to gene', async ({ page }) => { + await page.goto('/genes/ENSG00000178209/resources'); + + // expect link named 'Visit AMP-PD' + const link = page.getByRole('link', { name: 'Visit AMP-PD' }); + expect(await link.innerText()).toBe('Visit AMP-PD'); + + // expect url to have ensembleid + const url = await link.getAttribute('href'); + expect(url).toBe('https://target-explorer.amp-pd.org/genes/target-search?gene=ENSG00000178209'); + }); +}); \ No newline at end of file