Using AND¶
And continues the same step type as the line above it (Given, When, or
Then).
Scenario: Production tokens must be protected and masked
Given I have any project ci variable defined
When its key matches "^(AWS_|DATABASE_|API_KEY)"
Then its protected must be true
And its masked must be true
This is equivalent to:
Then its protected must be true
Then its masked must be true
Rules¶
AndafterWhenis still a filter — all conditions must be satisfiable by the same entity through sequential filtering, or use a singleWhenwith a regex.AndafterThenadds another assertion on the same stash; every entity must pass allThen/Andassertions.- Do not use
Andto switch fromGivento a different entity type; use anotherGivenor a new scenario.
See Overview of Scenario Flow for stash behavior.