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:
Paul Gschwendtner
2017-10-21 02:08:03 +02:00
committed by tinayuangao
parent 5c6e3df64a
commit bf6a2c37aa
2 changed files with 11 additions and 1 deletions
+8
View File
@@ -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;
}
+3 -1
View File
@@ -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;