Then wait for diffy comparison to complete

Polls the most recently created Diffy comparison every 10 seconds until it reaches a terminal state (completed, zero changes, failed, or reviewed). Use it right after any step that starts a comparison: create diffy comparison, create diffy comparison with name "value", or compare diffy "ENV1" with "ENV2". If no comparison has been created in the scenario yet, the step fails immediately.

The polling timeout is DIFFY_MAX_WAIT seconds (or worldParameters.diffy.maxWait), defaulting to 1200 seconds (20 minutes). If the comparison is still processing when the timeout is reached, the step fails with the comparison id in the error message. The step registers its own Cucumber timeout of one hour, so it is not cut short by the global step timeout in cucumber.js.

Accepted phrasings

Then wait for diffy comparison to complete
Then I wait for diffy comparison to complete
Then we wait for diffy comparison to complete
And wait for diffy comparison to complete

Examples

Then wait for diffy comparison to complete
Then I wait for diffy comparison to complete
And we wait for diffy comparison to complete
And wait for diffy comparison to complete

In a real scenario

@diffy
Feature: Visual regression
  Scenario: Compare two pages across breakpoints
    Given I am on "/"
    Then I take screenshots for all breakpoints
    Given I am on "/about-us"
    Then I take screenshots for all breakpoints
    Then send screenshots to diffy with name "baseline"
    Given I am on "/"
    When I resize window to "1200"
    Then I take screenshot
    Then send screenshots to diffy with name "feature-branch"
    Then create diffy comparison with name "PR-42"
    And wait for diffy comparison to complete

Related steps

Back to Diffy Step Definitions