-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IRIS-963 Add selective-diffing to visual docs (#2773)
* IRIS-963 Add selective-diffing to visual docs * Apply suggestions from code review --------- Co-authored-by: Benjamin Karran <[email protected]>
- Loading branch information
Showing
2 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
id: selective-diffing | ||
title: Sauce Labs Visual Testing | ||
--- | ||
|
||
import Tabs from '@theme/Tabs'; | ||
import TabItem from '@theme/TabItem'; | ||
import useBaseUrl from '@docusaurus/useBaseUrl'; | ||
|
||
## Selective Diffing | ||
|
||
Sauce Visual allows you to ignore only certain types of changes. | ||
We support the following change types: | ||
- **Content:** The text, image or other content changes. | ||
- **Dimensions:** When the size of an element changes. | ||
- **Position:** When the position (top left corner) of an element changes. | ||
- **Structure:** When an element or attribute was added, deleted or moved. | ||
- **Style:** When CSS was changed. | ||
- **Visual:** When something visually changed that cannot be categorized. | ||
|
||
> Note: To benefit from selective diffing, you need | ||
> - A baseline with a DOM capture | ||
> - A snapshot with a DOM capture | ||
> - To request the BALANCED diffing method during the visual check | ||
For each snapshot, you can specify which types of changes should be detected or ignored. | ||
|
||
In addition to setting the types of changes on a snapshot level, you can also define *regions* | ||
based on selectors / elements in your testing framework. | ||
For each region, you can again opt in or opt out of change types. | ||
The regional setting overrides all settings that you may have done on a snapshot level. | ||
|
||
> Please note that overlapping regions with competing diffing settings will result in undefined behavior. |