test(e2e): stats-* testids on Reflector dashboard, migrate 4 sites - #384
Merged
Conversation
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 reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
krisarmstrong
enabled auto-merge (squash)
May 30, 2026 19:59
Contributor
License Compliance ReportAll dependencies pass license compliance checksGo Dependencies
npm DependenciesSee full report in workflow artifacts Allowed Licenses: MIT, Apache-2.0, BSD-*, ISC, CC0-1.0, MPL-2.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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.