Skip to content

feat(integration-tests): add tests for uncovered UI features#5995

Draft
theosanderson-agent wants to merge 1 commit intomainfrom
feat/add-integration-tests-for-uncovered-features
Draft

feat(integration-tests): add tests for uncovered UI features#5995
theosanderson-agent wants to merge 1 commit intomainfrom
feat/add-integration-tests-for-uncovered-features

Conversation

@theosanderson-agent
Copy link
Collaborator

@theosanderson-agent theosanderson-agent commented Feb 17, 2026

Summary

  • Add 9 new integration test files with 23 test cases covering previously untested website features
  • Features were discovered by exploring the live site at localhost:3000 with browser automation and comparing against existing test coverage
  • All new tests pass against the local k3d deployment and follow existing project patterns (fixtures, page objects, console-warnings)

New test coverage areas:

Test File Tests Feature
api-documentation-page.spec.ts 2 API docs page sections, links, LAPIS docs per organism
error-pages.spec.ts 2 404 page for invalid routes and non-existent sequences
landing-page-statistics.spec.ts 3 Organism card sequence counts, recent stats, card-to-search navigation
footer-links.spec.ts 2 Footer Docs/API docs link visibility and navigation
header-accession-search.dependent.spec.ts 2 Nav search icon opens accession search box, navigates to detail page
sequence-detail-metadata.dependent.spec.ts 5 Sample details, submission details, data use terms, mutations, version/download
search/table-sorting.dependent.spec.ts 2 Column header click sorting, URL param sync
search/tools-link-out.dependent.spec.ts 2 Tools dropdown shows Nextclade, count updates with filters
search/advanced-options.dependent.spec.ts 2 Advanced options modal with version status/revocation filters

Test plan

  • All 23 new tests pass with BROWSER=chromium npx playwright test against local k3d
  • Existing tests unaffected (spot-checked landing-page, navigation, search-filtering)
  • Linting and formatting pass (npm run format)
  • CI pipeline should run the full test suite

🤖 Generated with Claude Code

🚀 Preview: Add preview label to enable

…atures

Add integration tests for features discovered through browser exploration
that had no existing test coverage: API documentation page, 404 error pages,
landing page organism statistics, footer navigation links, header accession
quick-search, sequence detail page metadata sections, search table column
sorting, Tools/link-out menu, and advanced search options modal.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@claude claude bot added e2e E2E test related tests Test related issues website Tasks related to the web application labels Feb 17, 2026
@claude
Copy link
Contributor

claude bot commented Feb 17, 2026

This PR adds 23 new integration tests covering previously untested UI features. The following open issues appear related to the work here and may be worth referencing or considering:

None of these issues appear to be directly resolved by this PR, but they represent related work in the integration test area.

import { test } from '../../../fixtures/console-warnings.fixture';
import { SearchPage } from '../../../pages/search.page';

test.describe('Search table sorting', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this could be flaky - can we wait for there to be multiple sequences? also potentially the first sequence will by chance be the earliest, maybe we should actually compare the date?

await searchPage.ebolaSudan();

const rows = searchPage.getSequenceRows();
await rows.first().waitFor();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess also here, should we ensure there are multiple sequences?

@theosanderson theosanderson marked this pull request as draft February 24, 2026 19:15
Comment on lines +20 to +21
.or(page.getByText(/does not exist/i))
.or(page.getByText(/error/i))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.or(page.getByText(/does not exist/i))
.or(page.getByText(/error/i))

test('should display error for non-existent sequence accession', async ({ page }) => {
await page.goto('/seq/LOC_NONEXISTENT.1');

// The page may render with 200 but show an error message
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the page should render with 200 and the message:

Image

test('should display error for non-existent sequence accession', async ({ page }) => {
await page.goto('/seq/LOC_NONEXISTENT.1');

// The page may render with 200 but show an error message
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// The page may render with 200 but show an error message
// The page should render with 200 but show an error message

await detailPage.goto(accessionVersion);

await expect(page.getByText('Sample details')).toBeVisible();
await expect(page.getByText('Collection date')).toBeVisible();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this might also flake as certain INSDC sequences do not have a collection date

Copy link
Contributor

@anna-parker anna-parker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good! I added a couple comments of where I think the tests could get flaky and should be modified but I have still approved as I think this is an overall improvement :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e2e E2E test related tests Test related issues website Tasks related to the web application

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants