Asks Diffy to capture a snapshot remotely from one of the environments configured on your Diffy project. Unlike send screenshots to diffy with name "value", no local browser screenshots are involved: the capture happens on Diffy's side against the environment URL stored in the project settings. The resulting snapshot id is stored in the scenario state so it can be used later by create diffy comparison.
The environment name accepts both short and long forms: prod or production, stage or staging, dev or development, plus custom. Any other value fails the step with a clear error listing the allowed names. The step requires DIFFY_API_KEY and DIFFY_PROJECT_ID (or the equivalent worldParameters.diffy keys in cucumber.js) to be set.
Accepted phrasings
Then create diffy screenshot from "ENVIRONMENT" environment
Then I create diffy screenshot from "ENVIRONMENT" environment
Then we create diffy screenshot from "ENVIRONMENT" environment
And create diffy screenshot from "ENVIRONMENT" environment
Examples
Then create diffy screenshot from "production" environment
Then create diffy screenshot from "staging" environment
Then I create diffy screenshot from "dev" environment
Then we create diffy screenshot from "custom" environment
In a real scenario
@diffy
Feature: Visual regression before a release
Scenario: Snapshot production and staging, then compare
Then create diffy screenshot from "production" environment
And create diffy screenshot from "staging" environment
Then create diffy comparison with name "release-2.0"
And wait for diffy comparison to complete