angular-cn/aio/src
Peter Bacon Darwin 441e01c568 fix(aio): simplify GaService to avoid e2e test failures
The GaService and the E2E specs were unnecessarily complicated and had
arbitrary async timeouts to ensure that the interplay between the GA
library code and the rest of the app worked correctly. This resulted
in potential flaky tests if the timeouts were not adequate; this was
experienced when Travis upgraded to Chrome 62.

The new approach is to block loading of the Analytics library altogether
if there is a `__e2e__` flag set in the `SessionStorage` of the browser.
It doesn't appear to be enough just to set the flag directly on the
window. I think this is because the window gets cleaned when navigation
occurs (but I am not certain).

The downside of this is that we had to add a small piece of extra logic
to the GA snippet in index.html; and we also had to switch from using
`<script async ...>` to a programmatic approach to loading the GA library
which prevents the browser from eagerly fetching the library. This may
be mitigated by adding it to the HTTP/2 push configuration of the Firebase
hosting.

Re-enables the test that was disabled in https://github.com/angular/angular/pull/19784

Closes #19785
2017-10-20 09:40:52 -07:00
..
app fix(aio): simplify GaService to avoid e2e test failures 2017-10-20 09:40:52 -07:00
assets refactor(aio): move content-specific images to `content/images/` 2017-07-28 15:06:49 -07:00
environments ci(aio): compute AIO deployment mode 2017-08-04 09:13:34 -07:00
extra-files ci(aio): fix deploying the stable branch to Firebase 2017-08-09 14:18:33 -07:00
styles feat(aio): add search to 404 page (#19682) 2017-10-13 09:18:42 -07:00
testing feat(aio): allow SearchService to have multiple clients (#19682) 2017-10-13 09:18:41 -07:00
favicon.ico build(aio): big move of docs related files (#14361) 2017-02-09 11:58:36 -08:00
google385281288605d160.html build(aio): add google webmaster tools verification file 2017-05-26 01:25:58 -07:00
ie-polyfills.js fix(aio): add missing WeakMap polyfill 2017-06-23 09:03:07 -07:00
index.html fix(aio): simplify GaService to avoid e2e test failures 2017-10-20 09:40:52 -07:00
main.ts fix(aio): only register ServiceWorker in production mode 2017-05-12 14:17:27 +01:00
noop-worker-basic.js feat(aio): provide noop service worker file 2017-05-26 14:24:41 +01:00
polyfills.ts fix(aio): support IE via conditionally loaded polyfills 2017-05-19 11:26:29 +01:00
pwa-manifest.json feat(aio): add iphone pwa features 2017-06-15 07:47:49 +01:00
styles.scss style(aio): tidy up SCSS files 2017-03-13 12:55:11 -07:00
test-specs.ts perf(aio): improve unit test rebuild time 2017-04-24 14:30:16 +01:00
test.ts build(aio): switch from `@angular/http` to `@angular/common/http` 2017-08-15 15:13:47 -07:00
tsconfig.app.json build(aio): start using tsc importHelpers option for the app 2017-05-26 06:02:12 +01:00
tsconfig.spec.json build(aio): update project config for @angular/cli v1.0.0 2017-03-27 11:55:26 -07:00
typings.d.ts build(aio): update project config for @angular/cli v1.0.0 2017-03-27 11:55:26 -07:00