Then create diffy comparison

This step creates a Diffy visual comparison (a "Diff") from the first two snapshot IDs that were uploaded during the current scenario. It posts to the Diffy API and stores the resulting comparison ID internally so that wait for diffy comparison to complete can poll it. No name is given to this comparison - Diffy will label it automatically. If you want a descriptive label, use create diffy comparison with name "value" instead.

You must have uploaded at least two separate named snapshots with send screenshots to diffy with name before calling this step, otherwise the step throws an error. Both DIFFY_API_KEY and DIFFY_PROJECT_ID must be configured. The comparison runs asynchronously inside Diffy - call wait for diffy comparison to complete after this step if the scenario needs to confirm the diff has finished before asserting results.

Accepted phrasings

Then I create diffy comparison
Then we create diffy comparison
Then create diffy comparison
And I create diffy comparison
And we create diffy comparison
And create diffy comparison
But I create diffy comparison

Examples

Then create diffy comparison
Then I create diffy comparison
And create diffy comparison
And we create diffy comparison

In a real scenario

Scenario: Compare homepage snapshots after a hotfix deployment
  Given I am on "https://example.org"
  Then I take screenshots for all breakpoints
  Then send screenshots to diffy with name "pre-hotfix"
  Given I am on "https://staging.example.org"
  Then I take screenshots for all breakpoints
  Then send screenshots to diffy with name "post-hotfix"
  Then create diffy comparison
  Then wait for diffy comparison to complete

Related steps

Back to Diffy Step Definitions