Skip to content

Commit

Permalink
AG-1213 add AMP-PD explorer link
Browse files Browse the repository at this point in the history
  • Loading branch information
sagely1 committed Dec 4, 2023
1 parent eda4649 commit f37dcb4
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ <h2 id="target-enabling-resources-header">Target Enabling Resources</h2>
<div class="container-sm">
<h2>Additional Resources</h2>
<p>
These external sites provide useful AD-specific or general information
for exploring targets.
These external sites provide additional useful information for exploring AD targets.
</p>
<div
*ngFor="let r of additionalResources; let i = index"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ export class GeneResourcesComponent implements OnInit {
linkText: 'Visit Ensembl',
link: `https://www.ensembl.org/Homo_sapiens/Gene/Pathway?g=${this.gene?.ensembl_gene_id}`,
},
{
title: 'AMP-PD Target Explorer',
description: 'View this gene in the AMP-PD Target Explorer, a resource that hosts evidence about whether genes are associated with Parkinson\'s Disease.',
linkText: 'Visit AMP-PD',
link: `https://target-explorer.amp-pd.org/genes/target-search?gene=${this.gene?.ensembl_gene_id}`
}
];
}
}
24 changes: 24 additions & 0 deletions tests/gene-resources.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { test, expect } from '@playwright/test';

test.describe('specific viewport block', () => {
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');
});
});

0 comments on commit f37dcb4

Please sign in to comment.