feat(core): silent and hidden activities for cleaner reports - #3394
Open
nbarrett wants to merge 1 commit into
Open
feat(core): silent and hidden activities for cleaner reports#3394nbarrett wants to merge 1 commit into
nbarrett wants to merge 1 commit into
Conversation
Ports the reporting markers from Serenity BDD (Java) so that control-flow and setup activities can opt out of reporting. - IsHidden: the activity's own step is omitted from the report, while the activities it performs are still reported. Check now implements IsHidden, matching Java's ConditionalPerformable, so a conditional no longer narrates its own "checks whether ..." step; only the branch it decides to perform is reported. - IsSilent: the activity's own step, and everything nested under it, are omitted from the report. Useful for setup or teardown activities whose reporting would only add noise. PerformActivities honours both markers at the single point where activity domain events are announced, so the behaviour is consistent across every reporter (console, Serenity BDD, and any custom crew). Related tickets: - serenity-bdd/serenity-core#669 (the Serenity BDD Java capability this mirrors) - serenity-js#161 - serenity-js#365 - serenity-js#155 - serenity-js#159
nbarrett
force-pushed
the
feat/hidden-and-silent-activities
branch
from
July 11, 2026 09:29
1f62bc1 to
bb357fe
Compare
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 this adds
Ports the reporting markers from Serenity BDD (Java) so that control-flow and setup activities can opt out of reporting:
IsHidden: an activity's own step is omitted from the report, while the activities it performs are still reported.Checknow implementsIsHidden(matching Java'sConditionalPerformable), so a conditional no longer narrates its own "checks whether ..." step; only the branch it decides to perform is reported.IsSilent: an activity's own step, and everything nested under it, are omitted from the report. Useful for setup or teardown activities whose reporting would only add noise. TheisSilent()method lets silence be decided dynamically, mirroring Java'sCanBeSilent.PerformActivitieshonours both markers at the single point where activity domain events are announced, so the behaviour is consistent across every reporter (console, Serenity BDD, and any custom crew).Motivation
Reports for scenarios that repeatedly dismiss cookie banners, or run instrumented setup/teardown, fill up with steps that add no value.
Checkin particular narrates a "checks whether ..." line for every conditional, even when the branch does nothing. In Serenity BDD (Java)ConditionalPerformableisIsHidden, so this brings the two products back in line.Behaviour note
Checkis hidden by default in this change, matching Java'sConditionalPerformable. That removes the conditional's own line from existing reports, leaving only the branch it performs. If you would rather keep currentCheckoutput and make hiding opt-in, I am happy to adjust so the markers ship without changingCheck's default.Tests
packages/core/spec/screenplay/reporting/reporting-markers.spec.ts: theisHidden/isSilentguards.packages/core/spec/screenplay/questions/Check.spec.ts: assertsCheckis hidden.Related discussion
ConditionalPerformablework that becameCheck.