ClientUtils.Check.JourneyCoverage (client_utils v0.7.0)
View SourceBasics
This check is disabled by default.
Learn how to enable it via .credo.exs.
This check has a base priority of high and works with any version of Elixir.
Explanation
A journey is covered when its walk tests every stage, in order.
Each .code_my_spec/journeys/<slug>.yml has one test file under
test/journeys/ that says which journey it walks:
@moduletag journey: "<slug>"and one test per stage, tagged with the stage's id: and in the YAML's
order, since a stage starts where the one before it ended:
@tag stage: "signs-in"
test "the newcomer registers and lands signed in", ctx doA journey with no test file is planned, and is left alone, unless it is
enforced: the server's signed list names it
(ClientUtils.EnforcedJourneys). Flagged: an enforced journey with no
test file, a stage with no test before the
last one under test (the ones after it are not built yet), a tag naming
no stage of the journey, a stage out of order, a journey file that
names no journey, and a stage's stories: id that no
.code_my_spec/stories/*.yml has. A stage no walk can test is removed from the YAML.
Check-Specific Parameters
Use the following parameters to configure this check:
:journeys
The glob of the journey files.
This parameter defaults to ".code_my_spec/journeys/*.yml".
:stories
The glob of the story files; none found, no story is checked.
This parameter defaults to ".code_my_spec/stories/*.yml".
General Parameters
Like with all checks, general params can be applied.
Parameters can be configured via the .credo.exs config file.