Skip to content

build: more stable screenshot tests #7774

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/e2e-app/e2e-app/e2e-app.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
* Don't show the caret for focused elements since those are causing the screenshot comparisons
* to be flaky. The `caret-color` CSS property is not supported in most of the browsers, but since
* the e2e tests run against Chrome we can use that property instead of a workaround using `color`.
*/
*:focus {
caret-color: transparent;
}
4 changes: 3 additions & 1 deletion src/e2e-app/e2e-app/e2e-app.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Component} from '@angular/core';
import {Component, ViewEncapsulation} from '@angular/core';


@Component({
Expand All @@ -11,6 +11,8 @@ export class Home {}
moduleId: module.id,
selector: 'e2e-app',
templateUrl: 'e2e-app.html',
styleUrls: ['e2e-app.css'],
encapsulation: ViewEncapsulation.None,
})
export class E2EApp {
showLinks: boolean = false;
Expand Down