mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
build: more stable screenshot tests (#7774)
* Most of the time the screenshot tests are failing because the caret is blinking and therefore the screenshot is different. Setting the caret-color to `transparent` for focused elements ensures that the screenshot tests are running more stable.
This commit is contained in:
committed by
tinayuangao
parent
5c6e3df64a
commit
bf6a2c37aa
@@ -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;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import {Component} from '@angular/core';
|
||||
import {Component, ViewEncapsulation} from '@angular/core';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user