Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into issue/OSOE-935
Browse files Browse the repository at this point in the history
  • Loading branch information
Piedone committed Jan 10, 2025
2 parents 0b554d7 + 09bca12 commit 2db3a83
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
11 changes: 8 additions & 3 deletions Lombiq.Tests.UI.Samples/Tests/BasicVisualVerificationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ public Task VerifyBlogImage() =>
var blogImageElementSelector = By.ClassName("field-name-blog-image");

// Here we check that the rendered content visually equals the baseline image within a given error
// percentage. You can read more about this in the AssertVisualVerificationApproved method documentation.
// percentage. You can read more about this in the AssertVisualVerificationApproved method
// documentation. Keep in mind, that after a browser update, font rendering and spacing can change. To
// prevent visual verification tests from failing, you should apply a percentage of approximately 5 in
// cases of images with a lot of text.
context.AssertVisualVerificationApproved(blogImageElementSelector, 0);
});

Expand All @@ -68,8 +71,10 @@ public Task VerifyNavbar(Browser browser) =>
var navbarElementSelector = By.ClassName("navbar-brand");

// Here we check that the rendered content visually equals the baseline image within a given error
// percentage using different baseline image on each platform and browser. You can read more about
// this in the AssertVisualVerificationApproved method documentation.
// percentage using different baseline image on each platform and browser. You can read more about this
// in the AssertVisualVerificationApproved method documentation. Keep in mind, that after a browser
// update, font rendering and spacing can change. To prevent visual verification tests from failing,
// you should apply a percentage of approximately 5 in cases of images with a lot of text.
context.AssertVisualVerificationApproved(
navbarElementSelector,
0,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "Lombiq UI Testing Toolbox - UI Tests - WorkflowShortcutsTests",
"description": "Test recipe for WorkflowShortcutsTests.",
"author": "Lombiq Technologies",
"website": "https://github.com/Lombiq/Orchard-Privacy",
"website": "https://github.com/Lombiq/UI-Testing-Toolbox",
"version": "1.0",
"issetuprecipe": false,
"categories": [
Expand Down
5 changes: 5 additions & 0 deletions Lombiq.Tests.UI/Services/WebDriverFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,11 @@ private static TDriverOptions SetCommonChromiumOptions<TDriverOptions>(
options.AddArgument("disable-accelerated-2d-canvas");
options.AddArgument("disable-gpu"); // #spell-check-ignore-line

// Setting font rendering to keep the text as they are for visual verification testing.
options.AddArgument("font-render-hinting=none");
options.AddArgument("disable-font-subpixel-positioning");
options.AddArgument("disable-lcd-text");

// Setting color profile explicitly to sRGB to keep colors as they are for visual verification testing.
options.AddArgument("force-color-profile=sRGB");

Expand Down

0 comments on commit 2db3a83

Please sign in to comment.