Skip to content

Duplicate data-testid="subject-table" on two simultaneously-rendered elements #1475

Description

@joshunrau

Summary

Two different elements carry data-testid="subject-table", and both are in the DOM at once whenever the Table tab is active, so page.getByTestId('subject-table') is ambiguous.

Where

  • apps/web/src/routes/_app/datahub/$subjectId/route.tsx — the "Table" tab <Link>
  • apps/web/src/routes/_app/datahub/$subjectId/table/index.tsx — the <DataTable> itself

Suggested fix

Rename one of them — e.g. subject-table-tab for the link, leaving subject-table on the table.

Notes

Found while writing the Playwright suite (branch e2e-tests), which works around it with data-table-body / data-table-row and role-based tab links.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions