Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
theosanderson committed Feb 26, 2025
1 parent 3b00135 commit d5da727
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions website/tests/pages/search/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,18 @@ test.describe('The search page', () => {
});

test('should add selected sequence to URL when clicking a sequence', async ({ searchPage, page }) => {
// Go to search page and click a sequence
// Go to search page
await searchPage.goto();
const firstAccessionLink = page.locator('tr').nth(1).locator('a').first();
const accessionId = await firstAccessionLink.textContent();

// Get accessions using the helper method that returns a Promise
const accessions = await searchPage.getAccessions(1);
const accessionId = accessions[0];

// Find the link with the accession ID
const accessionLink = page.getByRole('link', { name: accessionId });

// Click to show the sequence preview modal
await firstAccessionLink.click();
await accessionLink.click();

// Wait for the modal to appear
await expect(page.getByText('Amino acid mutations')).toBeVisible({ timeout: 30000 });
Expand Down

0 comments on commit d5da727

Please sign in to comment.