Repository navigation
fix(cli): end a test after its TEST/POST observers so a11y scan/save stay inside it - #384
Closed
kamal-kaur04 wants to merge 3 commits into
Closed
kamal-kaur04 wants to merge 3 commits into
kamal-kaur04 wants to merge 3 commits into
Conversation
On the CLI flow, test_ended_at was stamped before the TEST/POST observers ran, so the accessibility pre-save scan and save landed after the test's finish time. Restamp ended_at once the observers have run; for cucumber, hold the TestRunFinished send until then and release it from a finally block. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 7dd78e4) (cherry picked from commit 097625a)
Count the send right after releaseHeldFinish and before the worker-end flush, and make the observers' elapsed time explicit in the mocha ended_at test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 75499f5)
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
4 of 7 tasks
Collaborator
Author
|
Combined into #388 with the other 10.x CLI follow-ups, so they review and release together. The commits are unchanged (cherry-picked onto current |
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.
What is this about?
Port of #358 (
v9, released in 9.44.2) tomain, the 10.x line. It replaces #357, which was closed when the fix shipped onv9first.On the CLI (binary) flow, a test's
test_ended_atwas stamped intrackEvent(TEST, POST)before the TEST/POST observers ran. The accessibility module's pre-save scan and save run in those observers, so they landed after the test's reported finish time.On the non-CLI path the order was the other way round: the accessibility handler's
afterScenario/afterTest(scan + save) ran first, and the test finished after it. Anything that attributes accessibility scans to a test by its started/finished window drops them on the CLI flow. That is most visible when accessibility is scoped to tagged tests viaincludeTagsInTestingScope.Change (same as #358)
test_ended_atis restamped after the TEST/POST observers.TestHubModuleholds theTestRunFinishedsend while the framework runs the observers, and the framework releases it from afinallyblock, still within the sameafterScenario. If the release is ever skipped, the existing next-test / worker-end flush sends the held finish.TestRunFinishedsend is already deferred pastafterEachand read at send time, sotest_ended_atis just restamped after the observers.args, not in the instance data, so the event payload sent to the binary is unchanged. BEFORE_ALL cascade-skip rows are unaffected.Both
v9commits (097625a, and the test follow-up75499f5) cherry-picked onto currentmainwithout conflicts. Nothing in them depends on the WebdriverIO version.Verification
main+ the two commits):npm ci, build and lint pass, and the full package suite passes (58 files / 1,502 tests, including the 7 new ones).Related Jira task/s
Release (mandatory for every PR — required for the
ready-for-reviewlabel)Version bump: (required — tick exactly one)
Release notes type: (optional)
Release notes (customer-facing): (optional but encouraged)
Release notes (internal): (required — engineer-facing; what actually changed / why)
test_ended_atis now stamped after the TEST/POST observers, so the accessibility pre-save scan and save fall inside the test's window. Cucumber'sTestRunFinishedis held byTestHubModuleuntil the observers finish, then released in afinally.Checklist
PR Validations
Run Tests: Comment RUN_TESTS to trigger sanity tests.
🤖 Generated with Claude Code