From f9b62e0e49db6ee289a83d11878803f47fa55bbd Mon Sep 17 00:00:00 2001 From: Kerem Beygo Date: Thu, 25 Jul 2024 11:32:18 +0200 Subject: [PATCH 01/13] Sauce Visual API lifecycle init --- .../visual-testing/workflows/api-lifecycle.md | 165 ++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100644 docs/visual-testing/workflows/api-lifecycle.md diff --git a/docs/visual-testing/workflows/api-lifecycle.md b/docs/visual-testing/workflows/api-lifecycle.md new file mode 100644 index 0000000000..c364e397d9 --- /dev/null +++ b/docs/visual-testing/workflows/api-lifecycle.md @@ -0,0 +1,165 @@ +To help customers effectively integrate with our API, especially those not using the specific technologies we provide bindings for, we provide a comprehensive guide on the lifecycle of interacting with our system. Below is a basic documentation outline to guide users through the necessary steps. + +# API Lifecycle Documentation + +## Introduction + +This documentation provides a step-by-step guide on how to interact with our API. By following these steps, you'll be able to create builds, upload images, create snapshots, and finish builds. This guide is intended for users who wish to connect directly to the API or implement a binding on their own, including a link to our GraphQL API documentation for further reference. + +## What You'll Need + +- A Sauce Labs account ([Log in](https://accounts.saucelabs.com/am/XUI/#login/) or sign up for a [free trial license](https://saucelabs.com/sign-up)) +- Familiarity with GraphQL queries and mutations +- Tools like Postman or cURL for testing API calls + +## Lifecycle Steps + +### 1. Create a Build + +To start, you need to create a build. This initializes the process and prepares the environment for subsequent steps. + +**GraphQL Mutation:** + +```graphql +mutation { + createBuild(input: { name: "Your Build Name" }) { + id + name + status + url + } +} +``` + +**Expected Response:** + +```json +{ + "data": { + "createBuild": { + "id": "build-id-here", + "name": "Your Build Name", + "status": "RUNNING", + "url": "https://app.saucelabs.com/visual/builds/build-id-here" + } + } +} +``` + +- `status`: As a newly created build without any snapshots, this will be `RUNNING`. +- `url`: The URL that can be used any time to check the build on Sauce Labs. + +### 2. Upload Image + +Next, upload an image to the build. This is a two step process. + +First, get a placeholder URL for image upload using `createSnapshotUpload`. + +**GraphQL Mutation:** + +```graphql +mutation { + createSnapshotUpload(input: {buildId: "build-id-here"}) { + id + uploadUrl + } +} +``` + +- `buildId`: The ID of the build created in the previous step. + +**Expected Response:** + +```json +{ + "data": { + "createSnapshotUpload": { + "id": "upload-id-here", + "uploadUrl": "upload-url-here" + } + } +} +``` + +- `id`: Upload ID to use in the subsequent steps. +- `uploadUrl`: The URL to use in the next step. + +Next, send a `PUT` request to `uploadUrl` with image file in the body of the request. Only **PNG** files are supported. + +**cURL Representation:** + +```sh +curl --request PUT \ + --url 'upload-url-here' \ + --header 'Content-Type: image/png' \ + --data 'png-file-content' +``` + +### 3. Create Snapshot + +After uploading an image, create a snapshot to capture the current state of the build. + +**GraphQL Mutation:** + +```graphql +mutation { + createSnapshot( + input: {buildUuid: "build-id-here", uploadId: "upload-id-here", name: "Your snapshot name"} + ) { + id + uploadId + } +} +``` + +- `uploadId`: Upload ID acquired with `createSnapshotUpload` in the previous step. +- `buildUuid`: Build ID that was used in previous steps. + +**Expected Response:** + +```json +{ + "data": { + "createSnapshot": { + "id": "snapshot-id-here", + "uploadId": "upload-id-here" + } + } +} +``` + +- `id`: The ID of the snapshot that has been created. + +### 4. Finish Build + +Finally, finish the build process to mark it as complete. + +**GraphQL Mutation:** + +```graphql +mutation { + finishBuild(input: {uuid: "build-id-here"}) { + id + status + url + } +} +``` + +**Expected Response:** + +```json +{ + "data": { + "finishBuild": { + "id": "build-id-here", + "status": "UNAPPROVED", + "url": "https://app.saucelabs.com/visual/builds/build-id-here" + } + } +} +``` + +## Additional Information + +For more detailed information about the available queries and mutations, refer to our [GraphQL API documentation](https://api.us-west-1.saucelabs.com/v1/visual/graphql). From b6d787c359e6fd8d9149ea41cb55ab6146a53a75 Mon Sep 17 00:00:00 2001 From: Kerem Beygo Date: Thu, 25 Jul 2024 11:35:17 +0200 Subject: [PATCH 02/13] Sauce Visual API lifecycle init --- docs/visual-testing/workflows/api-lifecycle.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/visual-testing/workflows/api-lifecycle.md b/docs/visual-testing/workflows/api-lifecycle.md index c364e397d9..b2917280d5 100644 --- a/docs/visual-testing/workflows/api-lifecycle.md +++ b/docs/visual-testing/workflows/api-lifecycle.md @@ -1,5 +1,3 @@ -To help customers effectively integrate with our API, especially those not using the specific technologies we provide bindings for, we provide a comprehensive guide on the lifecycle of interacting with our system. Below is a basic documentation outline to guide users through the necessary steps. - # API Lifecycle Documentation ## Introduction From b8f8ff90f4a2dd3c4abdad3a7046c36af8231a28 Mon Sep 17 00:00:00 2001 From: Kerem Beygo Date: Thu, 25 Jul 2024 11:43:20 +0200 Subject: [PATCH 03/13] Sauce Visual API lifecycle - header --- docs/visual-testing/workflows/api-lifecycle.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/visual-testing/workflows/api-lifecycle.md b/docs/visual-testing/workflows/api-lifecycle.md index b2917280d5..e71ee9159d 100644 --- a/docs/visual-testing/workflows/api-lifecycle.md +++ b/docs/visual-testing/workflows/api-lifecycle.md @@ -1,4 +1,10 @@ -# API Lifecycle Documentation +--- +id: api-lifecycle +title: API Lifecycle +sidebar_label: API Lifecycle +--- + +# API Lifecycle ## Introduction From 0485643cdadcebc672f9404f7e81eeaf3c61b220 Mon Sep 17 00:00:00 2001 From: Kerem Beygo Date: Thu, 25 Jul 2024 11:44:42 +0200 Subject: [PATCH 04/13] Sauce Visual API lifecycle - intro --- docs/visual-testing/workflows/api-lifecycle.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/visual-testing/workflows/api-lifecycle.md b/docs/visual-testing/workflows/api-lifecycle.md index e71ee9159d..d204fd5304 100644 --- a/docs/visual-testing/workflows/api-lifecycle.md +++ b/docs/visual-testing/workflows/api-lifecycle.md @@ -8,7 +8,7 @@ sidebar_label: API Lifecycle ## Introduction -This documentation provides a step-by-step guide on how to interact with our API. By following these steps, you'll be able to create builds, upload images, create snapshots, and finish builds. This guide is intended for users who wish to connect directly to the API or implement a binding on their own, including a link to our GraphQL API documentation for further reference. +This documentation provides a step-by-step guide on how to interact with Sauce Visual API. By following these steps, you'll be able to create builds, upload images, create snapshots, and finish builds. This guide is intended for users who wish to connect directly to the API or implement a binding on their own, including a link to our GraphQL API documentation for further reference. ## What You'll Need From aba2ec4c435fd95687199943b66488c1e42a6c0c Mon Sep 17 00:00:00 2001 From: Kerem Beygo Date: Thu, 25 Jul 2024 11:45:48 +0200 Subject: [PATCH 05/13] Sauce Visual API lifecycle - upload image --- docs/visual-testing/workflows/api-lifecycle.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/visual-testing/workflows/api-lifecycle.md b/docs/visual-testing/workflows/api-lifecycle.md index d204fd5304..219c62ab2e 100644 --- a/docs/visual-testing/workflows/api-lifecycle.md +++ b/docs/visual-testing/workflows/api-lifecycle.md @@ -86,7 +86,7 @@ mutation { ``` - `id`: Upload ID to use in the subsequent steps. -- `uploadUrl`: The URL to use in the next step. +- `uploadUrl`: The URL to upload the image in the next step. Next, send a `PUT` request to `uploadUrl` with image file in the body of the request. Only **PNG** files are supported. From 20b46f534023db70cb29dac681d7a0259bb38451 Mon Sep 17 00:00:00 2001 From: Kerem Beygo Date: Thu, 25 Jul 2024 11:56:51 +0200 Subject: [PATCH 06/13] Sauce Visual API lifecycle - sidebar link --- docs/visual-testing/workflows/ci.md | 6 +++--- sidebars.js | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/visual-testing/workflows/ci.md b/docs/visual-testing/workflows/ci.md index d3bc530223..f2f2614d1d 100644 --- a/docs/visual-testing/workflows/ci.md +++ b/docs/visual-testing/workflows/ci.md @@ -8,14 +8,14 @@ import TabItem from '@theme/TabItem'; # Continuous Integration -To integrate Sauce Visual into your continuous integration workflow we recommend a two-step approach using the sauce visual cli. Sauce visual cli will work with all major CI systems (GitHub, Gitlab, Jenkins, CircleCI). +To integrate Sauce Visual into your continuous integration workflow we recommend a two-step approach using the [Sauce Visual CLI](../cli.md). Sauce Visual CLI will work with all major CI systems (GitHub, Gitlab, Jenkins, CircleCI). Branch Review Pipeline To implement a merge/pull request flow which blocks the given request from merging when visual diffs are detected and not approved do the following: -1. trigger test execution in your ci the way you do it locally. Make sure to pass a custom build id and do not fail your test when visual differences where detected. -2. in a dedicated build step use the sauce visual cli to fetch the current state of the sauce visual build using the custom build id from step one. It will fail in case visual changes have been detected. +1. trigger test execution in your CI the way you do it locally. Make sure to pass a custom build ID and do not fail your test when visual differences where detected. +2. in a dedicated build step use the Sauce Visual CLI to fetch the current state of the Sauce Visual build using the custom build ID from step one. It will fail in case visual changes have been detected. ``` # make sure nodejs and npx is available diff --git a/sidebars.js b/sidebars.js index b322a602e0..c081654843 100644 --- a/sidebars.js +++ b/sidebars.js @@ -1694,6 +1694,7 @@ module.exports = { 'visual-testing/workflows/test-execution', 'visual-testing/workflows/review', 'visual-testing/workflows/ci', + 'visual-testing/workflows/api-lifecycle' ], }, { From 2486c70d2a9b5be90020a339e903b8e7b0c1de0a Mon Sep 17 00:00:00 2001 From: Kerem Beygo Date: Thu, 25 Jul 2024 14:37:22 +0200 Subject: [PATCH 07/13] Sauce Visual API lifecycle - remove introduction title --- docs/visual-testing/workflows/api-lifecycle.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/visual-testing/workflows/api-lifecycle.md b/docs/visual-testing/workflows/api-lifecycle.md index 219c62ab2e..be7a82a68d 100644 --- a/docs/visual-testing/workflows/api-lifecycle.md +++ b/docs/visual-testing/workflows/api-lifecycle.md @@ -6,8 +6,6 @@ sidebar_label: API Lifecycle # API Lifecycle -## Introduction - This documentation provides a step-by-step guide on how to interact with Sauce Visual API. By following these steps, you'll be able to create builds, upload images, create snapshots, and finish builds. This guide is intended for users who wish to connect directly to the API or implement a binding on their own, including a link to our GraphQL API documentation for further reference. ## What You'll Need From 74085d42a47adcfa1ce001200a26e1d826bd6803 Mon Sep 17 00:00:00 2001 From: Kerem Date: Fri, 26 Jul 2024 09:46:21 +0000 Subject: [PATCH 08/13] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: FĂ©lix P. --- docs/visual-testing/workflows/api-lifecycle.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/visual-testing/workflows/api-lifecycle.md b/docs/visual-testing/workflows/api-lifecycle.md index be7a82a68d..a94751893b 100644 --- a/docs/visual-testing/workflows/api-lifecycle.md +++ b/docs/visual-testing/workflows/api-lifecycle.md @@ -55,7 +55,7 @@ mutation { Next, upload an image to the build. This is a two step process. -First, get a placeholder URL for image upload using `createSnapshotUpload`. +First, obtain a signed URL for uploading your image by using the `createSnapshotUpload` mutation. **GraphQL Mutation:** @@ -94,12 +94,12 @@ Next, send a `PUT` request to `uploadUrl` with image file in the body of the req curl --request PUT \ --url 'upload-url-here' \ --header 'Content-Type: image/png' \ - --data 'png-file-content' + --data '@my-screenshot.png' ``` ### 3. Create Snapshot -After uploading an image, create a snapshot to capture the current state of the build. +After uploading your image, add your snapshot and its metadata to your build. **GraphQL Mutation:** @@ -134,7 +134,7 @@ mutation { ### 4. Finish Build -Finally, finish the build process to mark it as complete. +Finally, finish the build to mark it as complete. **GraphQL Mutation:** From 7317c25afef52fc11345c2e58c6dc718808fdbbf Mon Sep 17 00:00:00 2001 From: Kerem Beygo Date: Fri, 26 Jul 2024 15:13:42 +0200 Subject: [PATCH 09/13] CR remarks --- .../visual-testing/workflows/api-lifecycle.md | 56 ++++++++++++++++--- 1 file changed, 48 insertions(+), 8 deletions(-) diff --git a/docs/visual-testing/workflows/api-lifecycle.md b/docs/visual-testing/workflows/api-lifecycle.md index a94751893b..f0145b5574 100644 --- a/docs/visual-testing/workflows/api-lifecycle.md +++ b/docs/visual-testing/workflows/api-lifecycle.md @@ -24,7 +24,7 @@ To start, you need to create a build. This initializes the process and prepares ```graphql mutation { - createBuild(input: { name: "Your Build Name" }) { + createBuild(input: { name: "Your Build Name", branch: "Branch name", project: "Project name" }) { id name status @@ -33,6 +33,9 @@ mutation { } ``` +- `branch`: Branch name to associate the build with. +- `project`: Label/project to associate the build with. + **Expected Response:** ```json @@ -64,6 +67,7 @@ mutation { createSnapshotUpload(input: {buildId: "build-id-here"}) { id uploadUrl + domUploadUrl } } ``` @@ -77,7 +81,8 @@ mutation { "data": { "createSnapshotUpload": { "id": "upload-id-here", - "uploadUrl": "upload-url-here" + "uploadUrl": "image-upload-url-here", + "domUploadUrl": "dom-upload-url-here" } } } @@ -85,37 +90,70 @@ mutation { - `id`: Upload ID to use in the subsequent steps. - `uploadUrl`: The URL to upload the image in the next step. +- `domUploadUrl`: The URL to upload the DOM to (if available and desired). Explained in optional step below. Next, send a `PUT` request to `uploadUrl` with image file in the body of the request. Only **PNG** files are supported. -**cURL Representation:** +**cURL:** ```sh curl --request PUT \ --url 'upload-url-here' \ + --header 'Content-MD5: base64-encoded-md5-hash' \ --header 'Content-Type: image/png' \ --data '@my-screenshot.png' ``` +- `Content-MD5` header: Base64 encoded MD5 hash of the file (`my-screenshot.png`). +- `Content-Type` header: Must be set to `image/png`. Not other extensions are supported. + +Optional: Upload DOM + +If desired (and available), DOM can be also uploaded to `domUploadUrl` obtained from `createSnapshotUpload` mutation. + +**cURL:** + +```sh +curl --request PUT \ + --url 'dom-upload-url-here' \ + --header 'Content-MD5: base64-encoded-md5-hash' \ + --header 'Content-Type: text/html' \ + --data '@my-dom.html' +``` + +- `Content-MD5` header: Base64 encoded MD5 hash of the file (`my-dom.html`). +- `Content-Type` header: Must be set to `text/html`. Not other extensions are supported. + ### 3. Create Snapshot -After uploading your image, add your snapshot and its metadata to your build. +After uploading your image, add your snapshot along with its metadata to your build. **GraphQL Mutation:** ```graphql mutation { createSnapshot( - input: {buildUuid: "build-id-here", uploadId: "upload-id-here", name: "Your snapshot name"} + input: { + buildUuid: "build-id-here", + uploadId: "upload-id-here", + name: "Your snapshot name", + operatingSystem: OS, + operatingSystemVersion: "os-version", + browser: BROWSER, + browserVersion: "browser-version" + } ) { id uploadId } } ``` - -- `uploadId`: Upload ID acquired with `createSnapshotUpload` in the previous step. - `buildUuid`: Build ID that was used in previous steps. +- `uploadId`: Upload ID acquired with `createSnapshotUpload` in the previous step. +- `operatingSystem`: The operating system used to take the snapshot. Strongly advised to be filled in. Available options: `ANDROID`, `IOS`, `LINUX`, `MACOS`, `WINDOWS`. +- `operatingSystemVersion`: The operating system version. e.g. "14.5" for `MACOS` or "11" for `WINDOWS`. +- `browser`: The browser used to take the snapshot. Strongly advised to be filled in (if available). Available options: `CHROME`, `EDGE`, `FIREFOX`, `PLAYWRIGHT_WEBKIT`, `SAFARI`. +- `browserVersion`: The browser version. e.g. "120.0.6099.318", "128.0.2". **Expected Response:** @@ -134,7 +172,9 @@ mutation { ### 4. Finish Build -Finally, finish the build to mark it as complete. +Finally, finish the build to mark it as complete. Keep in mind that this is a necessary step and the build cannot be reused after it's finished. + +It's also worth noting that unfinished builds will be automatically closed and set to `ERRORED` state after a certain period of time (default: 3 hours). **GraphQL Mutation:** From 9475bd7839f92200041b93ae46bc85ada5b5f8e2 Mon Sep 17 00:00:00 2001 From: Kerem Beygo Date: Fri, 26 Jul 2024 15:22:01 +0200 Subject: [PATCH 10/13] fixes --- docs/visual-testing/workflows/api-lifecycle.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/visual-testing/workflows/api-lifecycle.md b/docs/visual-testing/workflows/api-lifecycle.md index f0145b5574..b18aeccfa6 100644 --- a/docs/visual-testing/workflows/api-lifecycle.md +++ b/docs/visual-testing/workflows/api-lifecycle.md @@ -90,11 +90,11 @@ mutation { - `id`: Upload ID to use in the subsequent steps. - `uploadUrl`: The URL to upload the image in the next step. -- `domUploadUrl`: The URL to upload the DOM to (if available and desired). Explained in optional step below. +- `domUploadUrl`: The URL to upload the DOM to (if desired and available). Explained in the optional step below. Next, send a `PUT` request to `uploadUrl` with image file in the body of the request. Only **PNG** files are supported. -**cURL:** +**cURL Request:** ```sh curl --request PUT \ @@ -111,7 +111,7 @@ Optional: Upload DOM If desired (and available), DOM can be also uploaded to `domUploadUrl` obtained from `createSnapshotUpload` mutation. -**cURL:** +**cURL Request:** ```sh curl --request PUT \ @@ -139,7 +139,7 @@ mutation { name: "Your snapshot name", operatingSystem: OS, operatingSystemVersion: "os-version", - browser: BROWSER, + browser: BROWSER, browserVersion: "browser-version" } ) { @@ -149,7 +149,7 @@ mutation { } ``` - `buildUuid`: Build ID that was used in previous steps. -- `uploadId`: Upload ID acquired with `createSnapshotUpload` in the previous step. +- `uploadId`: Upload ID acquired with `createSnapshotUpload` in the previous step (`createSnapshotUpload` mutation response) - `operatingSystem`: The operating system used to take the snapshot. Strongly advised to be filled in. Available options: `ANDROID`, `IOS`, `LINUX`, `MACOS`, `WINDOWS`. - `operatingSystemVersion`: The operating system version. e.g. "14.5" for `MACOS` or "11" for `WINDOWS`. - `browser`: The browser used to take the snapshot. Strongly advised to be filled in (if available). Available options: `CHROME`, `EDGE`, `FIREFOX`, `PLAYWRIGHT_WEBKIT`, `SAFARI`. From 4141cde562e78eddfc8a29cb5ef869a40fdeadb6 Mon Sep 17 00:00:00 2001 From: Kerem Beygo Date: Fri, 26 Jul 2024 15:28:50 +0200 Subject: [PATCH 11/13] remove unnecessary explanation --- docs/visual-testing/workflows/api-lifecycle.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/visual-testing/workflows/api-lifecycle.md b/docs/visual-testing/workflows/api-lifecycle.md index b18aeccfa6..13c26facd8 100644 --- a/docs/visual-testing/workflows/api-lifecycle.md +++ b/docs/visual-testing/workflows/api-lifecycle.md @@ -149,7 +149,7 @@ mutation { } ``` - `buildUuid`: Build ID that was used in previous steps. -- `uploadId`: Upload ID acquired with `createSnapshotUpload` in the previous step (`createSnapshotUpload` mutation response) +- `uploadId`: Upload ID acquired with `createSnapshotUpload` in the previous step. - `operatingSystem`: The operating system used to take the snapshot. Strongly advised to be filled in. Available options: `ANDROID`, `IOS`, `LINUX`, `MACOS`, `WINDOWS`. - `operatingSystemVersion`: The operating system version. e.g. "14.5" for `MACOS` or "11" for `WINDOWS`. - `browser`: The browser used to take the snapshot. Strongly advised to be filled in (if available). Available options: `CHROME`, `EDGE`, `FIREFOX`, `PLAYWRIGHT_WEBKIT`, `SAFARI`. From 8e937e5a646b0ee2a1609d765e1a4ba283693bba Mon Sep 17 00:00:00 2001 From: Kerem Beygo Date: Fri, 26 Jul 2024 16:36:40 +0200 Subject: [PATCH 12/13] fix typos --- docs/visual-testing/_partials/_environment-variables.md | 2 +- docs/visual-testing/integrations/java.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/visual-testing/_partials/_environment-variables.md b/docs/visual-testing/_partials/_environment-variables.md index 03d1b505d6..b5b366a9b7 100644 --- a/docs/visual-testing/_partials/_environment-variables.md +++ b/docs/visual-testing/_partials/_environment-variables.md @@ -6,6 +6,6 @@ | `SAUCE_VISUAL_BUILD_NAME` | | The name you would like to appear in the Sauce Visual dashboard. | | `SAUCE_VISUAL_BRANCH` | | The branch name you would like to associate this build with. We recommend using your current VCS branch in CI. | | `SAUCE_VISUAL_DEFAULT_BRANCH` | | The main branch name you would like to associate this build with. Usually `main` or `master` or alternatively the branch name your current branch was derived from. [Follow me to learn more](../workflows/ci.md) | -| `SAUCE_VISUAL_PROJECT` | | The label / project you would like to associated this build with. | +| `SAUCE_VISUAL_PROJECT` | | The label / project you would like to associate this build with. | | `SAUCE_VISUAL_BUILD_ID` | | For advanced users, a user-supplied SauceLabs Visual build ID. Can be used to create builds in advance using the GraphQL API. This can be used to parallelize tests with multiple browsers, shard, or more.
By default, this is not set and we create / finish a build during setup / teardown. | | `SAUCE_VISUAL_CUSTOM_ID` | | For advanced users, a user-supplied custom ID to identify this build. Can be used in CI to identify / check / re-check the status of a single build. Usage suggestions: CI pipeline ID. | \ No newline at end of file diff --git a/docs/visual-testing/integrations/java.md b/docs/visual-testing/integrations/java.md index 663306b88c..475d481250 100644 --- a/docs/visual-testing/integrations/java.md +++ b/docs/visual-testing/integrations/java.md @@ -329,7 +329,7 @@ visual.sauceVisualCheck("Before Login", options); #### Screenshot-wide configuration -= + Example: From c24b347426bd139e17173cb10808f5f834470f16 Mon Sep 17 00:00:00 2001 From: Kerem Beygo Date: Fri, 26 Jul 2024 16:53:47 +0200 Subject: [PATCH 13/13] remove outdated section --- docs/visual-testing/integrations/java.md | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/docs/visual-testing/integrations/java.md b/docs/visual-testing/integrations/java.md index 475d481250..ccb30b40cb 100644 --- a/docs/visual-testing/integrations/java.md +++ b/docs/visual-testing/integrations/java.md @@ -451,25 +451,6 @@ options.setClipSelector(".your-css-selector"); visual.sauceVisualCheck("Visible Sale Banner", options); ``` -#### Selective Diffing (BETA) - -[Selective regions](../selective-diffing.md) are an even more powerful way to control diffing. - -```java -EnumSet visualChanges = EnumSet.of(DiffingFlag.Visual); - -visual.sauceVisualCheck( - "Before Login", - new CheckOptions.Builder() - .withDiffingMethod(DiffingMethod.BALANCED) - .disable(EnumSet.of(DiffingFlag.Position, DiffingFlag.Dimensions)) - .enable(visualChanges, loginPage.getInputUsername()) - .disable(visualChanges, loginPage.getInputUsername()) - .build()); -``` - -You can find the full example in our [examples repo](#examples). - ## Examples Two examples are available: