Skip to content

test(e2e): stats-* testids on Reflector dashboard, migrate 4 sites - #384

Merged
krisarmstrong merged 1 commit into
mainfrom
cleanup/stem-dashboard-stats-testid
May 30, 2026
Merged

test(e2e): stats-* testids on Reflector dashboard, migrate 4 sites#384
krisarmstrong merged 1 commit into
mainfrom
cleanup/stem-dashboard-stats-testid

Conversation

@krisarmstrong

Copy link
Copy Markdown
Collaborator

Brittleness fix #4 of the i18n-fragile-selector sweep.

stem/ui/e2e/dashboard.spec.ts:25-28 asserted four StatsCard
labels by regex: /packets received/i, /packets sent/i, /current
rate/i, /uptime/i. Every one of those labels is rendered by
the t() helper or hard-coded English that any i18n team will
translate next.

UI: added testId prop to the StatsCard component in ReflectorPage.
tsx (the only consumer; defined locally at line 82). Three of
the four call sites get stable testids: stats-packets-received,
stats-packets-sent, stats-current-rate. The Uptime card is
rendered inline as

rather than via
StatsCard; added data-testid="stats-uptime" directly.

Spec migration: four getByText regex assertions -> four getByTestId
assertions.

Net: -4 i18n-fragile assertion sites in stem dashboard.spec.ts.
Stem's text-regex count drops from 17 to 13.

Brittleness fix #4 of the i18n-fragile-selector sweep.

stem/ui/e2e/dashboard.spec.ts:25-28 asserted four StatsCard
labels by regex: /packets received/i, /packets sent/i, /current
rate/i, /uptime/i. Every one of those labels is rendered by
the t() helper or hard-coded English that any i18n team will
translate next.

UI: added testId prop to the StatsCard component in ReflectorPage.
tsx (the only consumer; defined locally at line 82). Three of
the four call sites get stable testids: stats-packets-received,
stats-packets-sent, stats-current-rate. The Uptime card is
rendered inline as <div className="card"> rather than via
StatsCard; added data-testid="stats-uptime" directly.

Spec migration: four getByText regex assertions -> four getByTestId
assertions.

Net: -4 i18n-fragile assertion sites in stem dashboard.spec.ts.
Stem's text-regex count drops from 17 to 13.
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@krisarmstrong
krisarmstrong enabled auto-merge (squash) May 30, 2026 19:59
@github-actions

Copy link
Copy Markdown
Contributor

License Compliance Report

All dependencies pass license compliance checks

Go Dependencies

  • Unknown: 31 package(s)
  • MIT: 26 package(s)
  • BSD-3-Clause: 16 package(s)
  • Apache-2.0: 11 package(s)
  • BSD-2-Clause: 1 package(s)

npm Dependencies

See full report in workflow artifacts

Allowed Licenses: MIT, Apache-2.0, BSD-*, ISC, CC0-1.0, MPL-2.0
Forbidden: GPL, AGPL, SSPL (strong copyleft)

@krisarmstrong
krisarmstrong merged commit dd8ba6a into main May 30, 2026
27 of 28 checks passed
@krisarmstrong
krisarmstrong deleted the cleanup/stem-dashboard-stats-testid branch May 30, 2026 20:02
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.

Add interface validation to handleSettings

1 participant