Skip to content

refactor(protocol-designer, e2e-testing): remove data-testid to implementation dependencies#21138

Open
koji wants to merge 2 commits intoedgefrom
refactor_remove-data-testid-in-pd
Open

refactor(protocol-designer, e2e-testing): remove data-testid to implementation dependencies#21138
koji wants to merge 2 commits intoedgefrom
refactor_remove-data-testid-in-pd

Conversation

@koji
Copy link
Copy Markdown
Contributor

@koji koji commented Mar 27, 2026

Overview

remove data-testid to improve implementation dependencies
edge in protocol-designer has 43 data-testid.
this will remove 41 data-testid

react-testing-library and similar tools recommend that, rather than adding more dedicated hooks like ‎data-testid just for testing, you should first identify elements using the same information that real users rely on. For example, roles, label text, placeholders, or visible text. Because these align closely with what accessibility APIs (such as screen readers) reference, the more tests you write this way, the more your accessibility will naturally improve as well.

the rest of work will be followed by another pr (need to re-review props)

  • ToggleButton
  • StepContainer

close AUTH-2843

Describe your PR at a high level. State acceptance criteria and how this PR fits into other work. Link issues, PRs, and other relevant resources.

Test Plan and Hands on Testing

  • make -C protocol-designer test
    no error
  • make -C e2e-testing test-pd-local
    no error

Describe your testing of the PR. Emphasize testing not reflected in the code. Attach protocols, logs, screenshots and any other assets that support your testing.

Changelog

  • remove data-testid
  • add aria-* for e2e test

Review requests

  • What do you need from reviewers to feel confident this PR is ready to merge?
  • Ask questions.

Risk assessment

low-mid

…ve implementation dependencies

remove data-testid to improve implementation dependencies

close AUTH-2843
@koji koji marked this pull request as ready for review March 27, 2026 22:50
@koji koji deployed to pd-non-prod March 27, 2026 22:58 — with GitHub Actions Active
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

❌ Patch coverage is 67.74194% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.47%. Comparing base (5cdb077) to head (59becea).
⚠️ Report is 17 commits behind head on edge.

Files with missing lines Patch % Lines
.../StepTools/ThermocyclerTools/ThermocyclerCycle.tsx 0.00% 6 Missing ⚠️
...ents/organisms/EditProtocolMetadataModal/index.tsx 40.00% 3 Missing ⚠️
...ts/molecules/CheckboxExpandStepFormField/index.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             edge   #21138      +/-   ##
==========================================
- Coverage   57.47%   57.47%   -0.01%     
==========================================
  Files        3920     3920              
  Lines      321146   321298     +152     
  Branches    46095    46180      +85     
==========================================
+ Hits       184594   184655      +61     
- Misses     136329   136420      +91     
  Partials      223      223              
Flag Coverage Δ
protocol-designer 19.95% <67.74%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ents/molecules/ConcurrentGroup/ConcurrentGroup.tsx 100.00% <100.00%> (ø)
...er/src/components/molecules/ExportButton/index.tsx 100.00% <100.00%> (ø)
...er/src/components/molecules/LiquidButton/index.tsx 86.53% <100.00%> (+0.82%) ⬆️
...r/src/components/molecules/StepContainer/index.tsx 96.77% <100.00%> (+0.02%) ⬆️
...ts/organisms/AssignLiquidsModal/LabwareToolbox.tsx 53.80% <ø> (-0.24%) ⬇️
.../src/components/organisms/DisabledScreen/index.tsx 100.00% <100.00%> (ø)
...isms/EditInstrumentsModal/PipetteConfiguration.tsx 7.35% <ø> (+0.03%) ⬆️
...c/components/organisms/EditNickNameModal/index.tsx 80.61% <ø> (-0.20%) ⬇️
...r/src/components/organisms/LabwareButton/index.tsx 74.41% <ø> (-1.14%) ⬇️
...ner/src/components/organisms/LabwareCard/index.tsx 95.65% <100.00%> (-0.04%) ⬇️
... and 17 more

... and 10 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant