Visual E2E Options Reference

Options for "sauce:visual" capability

KeyTypeRequiredDescriptionDefault
projectNameStringYesProject name.
apiKeyStringYesAPI Key for user's Screener account.
viewportSizeStringNo

A <width>x<height> representation of desired viewport size.

Example: "1024x768".

"1024x768"
branchStringNo

Branch or environment name.

Example: "main"

baseBranchStringNo

Branch name of project's base branch. Used for baseline branching and merging.

Example: "main"

diffOptionsObjectNo

Visual diff options to control validations.

Options available:

  • structure: enable or disable structural changes. Defaults to true.
  • layout: enable or disable layout changes. Defaults to true.
  • style: enable or disable style changes. Defaults to true.
  • content: enable or disable content changes. Defaults to true.
  • minLayoutPosition: Optional threshold for Layout position changes (in css pixels).
  • minLayoutDimension: Optional threshold for Layout dimension changes (in css pixels).
  • minShiftGraphic: Optional threshold for pixel shifts in graphics (in css pixels).
{
  structure: true,
  layout: true,
  style: true,
  content: true,
  minLayoutPosition: 4,
  minLayoutDimension: 10
  minShiftGraphic: 2
}
ignoreStringNo

A comma-delimited list of css selectors to ignore when performing visual diffs.

Example: "#some-id, .some-selector"

failOnNewStatesBooleanNo

Option to set build to failure when new states are found, and to disable using new states as a baseline.

This option defaults to true, and can be set to false if user wants new states to automatically be the visual baseline without needing to review and accept them.

true
alwaysAcceptBaseBranchBooleanNoOption to automatically accept new and changed states in base branch. Assumes base branch should always be correct.
false
disableBranchBaselineBooleanNoOption to disable independent baseline for each feature branch, and only use base branch as baseline. Must be used with "baseBranch" option.
false
scrollAndStitchScreenshotsBooleanNoOption to capture a full-page screenshot using a scrolling and stitching strategy instead of using native browser full-page screenshot capabilities.
false
disableCORSBooleanNoOption to disable adding CORS headers. By default, CORS headers are set for all cross-origin requests.
false

iframes

This is a Beta feature and may be unstable.
BooleanNoOption to enable the capturing and comparing of iframes content.
false

iframesOptions

This is a Beta feature and may be unstable.
ObjectNoOptions to control the capturing and comparing of iframes content.
{
  maxFrames: Infinity
}