Assert the view transition went in a direction: Astro sets data-astro-transition on the document while it swaps, "forward" for a link and "back" for the back button.
Examples
Then the last transition should have gone "forward"
And the last transition should have gone "back"
Then last transition should have gone "forward"
And the last transition should have gone "forward"
Then the last transition should have gone "back"
Pattern
Then(/^(?:the )?last transition should have gone "(forward|back)"$/, …)
Part of @webship-js/astro-steps (github.com/webship/astro-steps), a step pack for Webship-js 2.0.x.