Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
paweltomaszewskisaucelabs committed Apr 3, 2024
1 parent 0d252d1 commit 9d5d329
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions visual-dotnet/SauceLabs.Visual/VisualClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,12 @@ private async Task<string> VisualCheckAsync(string name, VisualCheckOptions opti
var ignored = new List<RegionIn>();
ignored.AddRange(options.IgnoreRegions?.Select(r => new RegionIn(r)) ?? new List<RegionIn>());
ignored.AddRange(options.IgnoreElements?.Select(r => new RegionIn(r)) ?? new List<RegionIn>());
var fullPageConfig = (options.FullPageConfig ?? new FullPageConfig()).ToFullPageConfigIn();

FullPageConfigIn? fullPageConfigIn = null;
if (options.FullPage == true)
{
fullPageConfigIn = (options.FullPageConfig ?? new FullPageConfig()).ToFullPageConfigIn();
}

var result = (await Api.CreateSnapshotFromWebDriver(new CreateSnapshotFromWebDriverIn(
buildUuid: Build.Id,
Expand All @@ -158,7 +163,7 @@ private async Task<string> VisualCheckAsync(string name, VisualCheckOptions opti
clipSelector: options.ClipSelector,
suiteName: options.SuiteName,
testName: options.TestName,
fullPageConfig: options.FullPage != false ? fullPageConfig : null
fullPageConfig: fullPageConfigIn
))).EnsureValidResponse();
result.Result.Diffs.Nodes.ToList().ForEach(d => _screenshotIds.Add(d.Id));
return result.Result.Id;
Expand Down

0 comments on commit 9d5d329

Please sign in to comment.