test(aio): cleaner approach to reliable Google Analytics e2e tests (#20661)

PR Close #20661
This commit is contained in:
Peter Bacon Darwin
2017-11-28 13:35:22 +00:00
committed by Miško Hevery
parent 4ec4a99f16
commit 3def2cc552
3 changed files with 6 additions and 9 deletions

View File

@ -80,8 +80,6 @@ describe('site App', function() {
});
});
// TODO(https://github.com/angular/angular/issues/19785): Activate this again
// once it is no more flaky.
describe('google analytics', () => {
it('should call ga with initial URL', done => {

View File

@ -29,10 +29,7 @@ export class SitePage {
locationPath() { return browser.executeScript('return document.location.pathname') as promise.Promise<string>; }
navigateTo(pageUrl = '') {
return browser.get('/' + pageUrl)
// We need to tell the index.html not to load the real analytics library
// See the GA snippet in index.html
.then(() => browser.executeScript('sessionStorage.setItem("__e2e__", true);'));
return browser.get('/' + pageUrl);
}
getDocViewerText() {