Skip to content

Commit

Permalink
try again
Browse files Browse the repository at this point in the history
  • Loading branch information
theosanderson committed Feb 27, 2025
1 parent f7c0bc8 commit 450102d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions integration-tests/tests/specs/features/download.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { approxMaxAcceptableUrlLength } from "../../../../website/src/routes/routes";
const { test, expect } = require('@playwright/test');

const fs = require('fs');

test('Download metadata and check number of cols', async ({ page }) => {
Expand Down Expand Up @@ -39,14 +38,15 @@ test('Download metadata with POST and check number of cols', async ({ page }) =>
await page.goto('/');
await page.getByRole('link', { name: 'Crimean-Congo Hemorrhagic Fever Virus' }).click();


const loculusId = await page.textContent(/LOC_[A-Z0-9]+\.[0-9]+/);
// Find loculus ID using a more reliable approach
const content = await page.content();
const loculusIdMatch = content.match(/LOC_[A-Z0-9]+\.[0-9]+/);
const loculusId = loculusIdMatch ? loculusIdMatch[0] : null;
expect(loculusId).toBeTruthy();
console.log(`Found loculus ID: ${loculusId}`);


const query = `${loculusId}\n${'A'.repeat(2000)}`;
await page.getByLabelText('Accession').type(query);


await page.getByRole('button', { name: 'Download all entries' }).click();
await page.getByLabel('I agree to the data use terms.').check();
Expand All @@ -65,4 +65,4 @@ test('Download metadata with POST and check number of cols', async ({ page }) =>

expect(fields).toHaveLength(8);
console.log(`Found ${fields.length} fields in the first line of the TSV`);
});
});

0 comments on commit 450102d

Please sign in to comment.