Skip to content

Commit

Permalink
update spinner test
Browse files Browse the repository at this point in the history
  • Loading branch information
sagely1 authored Dec 11, 2023
1 parent 64e5769 commit e5b6ebd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/gene-resources.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,20 @@ test.describe('specific viewport block', () => {
test('has title', async ({ page }) => {
await page.goto('/genes/ENSG00000178209/resources');

// wait for page to load (i.e. spinner to disappear)
await expect(page.locator('div:nth-child(4) > div > .spinner'))
.not.toBeVisible({ timeout: 30000});

// 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');

// wait for page to load (i.e. spinner to disappear)
await expect(page.locator('div:nth-child(4) > div > .spinner'))
.not.toBeVisible({ timeout: 30000});

// expect link named 'Visit AMP-PD'
const link = page.getByRole('link', { name: 'Visit AMP-PD' });
Expand All @@ -20,4 +28,4 @@ test.describe('specific viewport block', () => {
// expect url to have ensembleid
await expect(link).toHaveAttribute('href', 'https://target-explorer.amp-pd.org/genes/target-search?gene=ENSG00000178209');
});
});
});

0 comments on commit e5b6ebd

Please sign in to comment.