This step iterates over every configured breakpoint, resizes the viewport to that width (plus 8 pixels of internal padding), and captures a full-page screenshot at each size - all in a single step. Breakpoints are read from the DIFFY_BREAKPOINTS environment variable as a comma-separated list of pixel widths, or from worldParameters.diffy.breakpoints. The default when neither is set is 1200. The viewport height at each breakpoint is controlled by DIFFY_WINDOW_HEIGHT (default: 2000).
Each screenshot is tagged with the current page URL and its breakpoint width, then added to the in-memory buffer exactly as if you had called I take screenshot individually after each resize. If the breakpoints list is empty the step throws an error. After the loop the screenshots are ready to be sent to Diffy with send screenshots to diffy with name.
Accepted phrasings
Then I take screenshots for all breakpoints
Then we take screenshots for all breakpoints
Then take screenshots for all breakpoints
And I take screenshots for all breakpoints
And we take screenshots for all breakpoints
And take screenshots for all breakpoints
Examples
Then I take screenshots for all breakpoints
Then we take screenshots for all breakpoints
And I take screenshots for all breakpoints
And take screenshots for all breakpoints
In a real scenario
Scenario: Capture the homepage at every configured breakpoint
Given I am on "https://example.org"
Then I take screenshots for all breakpoints
Then send screenshots to diffy with name "home-baseline"
Given I am on "https://example.org"
Then I take screenshots for all breakpoints
Then send screenshots to diffy with name "home-after-deploy"
Then create diffy comparison with name "home-regression"
Then wait for diffy comparison to complete