test(e2e): scope role-gated content checks to visible matches - #349
Merged
Conversation
trafficgen-page failed on main with the same fragile pattern servicetest
had: the broad role/permission text regex also matches the page's nav
label, rendered in both the mobile aside (display:none at 1280px) and
the desktop aside. content.first() resolved to the hidden mobile node.
Applied the same `.locator('visible=true').first()` scope to all four
remaining page specs (certify, benchmark, measure, trafficgen) so they
assert on real on-screen content. servicetest already had it (passed
this run, confirming the approach). Prevents the flake across the set.
krisarmstrong
enabled auto-merge (squash)
May 28, 2026 16:25
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? |
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 |
The race-detector job (the only CGO+linux runner) failed with a nil
pointer panic in TestConfigureContextWithTestContext, surrounded by C
dataplane "trial failed: -22" (EINVAL) logs. Root cause: four tests use
dataplane.NewTestContext() and call Execute/Configure. Under the stub
build (CGO off) that returns ErrNotSupported — the path these tests are
written for ("valid but non-functional context"). Under CGO+linux it
hits the real C dataplane, which needs a NIC/privileges the runner
lacks; the trials fail -22 and the uninitialized context panics.
The race job runs `go test -short`, so gate these four on testing.Short()
via a shared skipRealDataplaneInShort helper:
- TestExecuteWithTestContext
- TestExecuteWithTestContextFrameSize
- TestExecuteWithTestContextDefaultBranch
- TestConfigureContextWithTestContext
The normal backend job (CGO off, no -short) still runs them in their
intended stub mode for coverage; production uses real hardware and is
unaffected. This is the correct purpose of -short (exclude tests needing
real hardware), not masking a production bug — the panic is only
reachable on the no-NIC path that -short exists to skip.
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.
Summary
trafficgen-page.spec.ts"should show role-gated content" failed on stem main — same fragile pattern as servicetest: the broad role/permission text regex also matches the page's nav label, rendered in both the mobile aside (display:noneat 1280px) and the desktop aside.content.first()resolved to the hidden mobile node →toBeVisible()failed.Applied
.locator('visible=true').first()to all four remaining page specs (certify, benchmark, measure, trafficgen). servicetest already had this (it passed this run, confirming the fix). Eliminates the flake across the whole set.Note: this confirms the Phase-2 CLS auth-gating change did not break the shell — every other page test passed; only the broad-regex role-gated checks needed the visible scope.
Test plan
npm run lint— clean🤖 Generated with Claude Code