Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
paweltomaszewskisaucelabs committed Nov 27, 2024
1 parent 6a38c84 commit 0ea41b6
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 2 deletions.
27 changes: 27 additions & 0 deletions visual-java/src/main/java/com/saucelabs/visual/CheckOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,33 @@ public enum DiffingMethod {

public CheckOptions() {}

public CheckOptions(
List<WebElement> ignoreElements,
List<IgnoreRegion> ignoreRegions,
List<VisualRegion> regions,
String testName,
String suiteName,
DiffingMethod diffingMethod,
DiffingOptionsIn diffingOptions,
Boolean captureDom,
String clipSelector,
WebElement clipElement,
FullPageScreenshotConfig fullPageScreenshotConfig) {
this(
ignoreElements,
ignoreRegions,
regions,
testName,
suiteName,
diffingMethod,
diffingOptions,
captureDom,
clipSelector,
clipElement,
fullPageScreenshotConfig,
new ArrayList<>());
}

public CheckOptions(
List<WebElement> ignoreElements,
List<IgnoreRegion> ignoreRegions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,29 @@ public static class CreateSnapshotFromWebDriverIn {

public Optional<DiffingOptionsIn> diffingOptions = Optional.empty();

public CreateSnapshotFromWebDriverIn(
String buildUuid,
DiffingMethod diffingMethod,
Optional<DiffingOptionsIn> diffingOptions,
List<RegionIn> ignoreRegions,
List<ElementIn> ignoreElements,
String jobId,
String name,
String sessionId,
String sessionMetadata) {
this(
buildUuid,
diffingMethod,
diffingOptions,
ignoreRegions,
ignoreElements,
jobId,
name,
sessionId,
sessionMetadata,
new ArrayList<>());
}

public CreateSnapshotFromWebDriverIn(
String buildUuid,
DiffingMethod diffingMethod,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,23 @@ public class FullPageScreenshotConfig {
private String scrollElement;
private SelectorIn nativeClipSelector;

public FullPageScreenshotConfig(
int delayAfterScrollMs,
Boolean disableCSSAnimation,
List<String> hideAfterFirstScroll,
Boolean hideScrollBars,
int scrollLimit,
String scrollElement) {
this(
delayAfterScrollMs,
disableCSSAnimation,
hideAfterFirstScroll,
hideScrollBars,
scrollLimit,
scrollElement,
null);
}

public FullPageScreenshotConfig(
int delayAfterScrollMs,
Boolean disableCSSAnimation,
Expand Down
4 changes: 2 additions & 2 deletions visual-js/.changeset/shy-bananas-speak.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@saucelabs/nightwatch-sauce-visual-service": patch
"@saucelabs/nightwatch-sauce-visual-service": minor
---

ignore selectors
add support for ignore selectors in visual check

0 comments on commit 0ea41b6

Please sign in to comment.