test(aio): cleaner approach to reliable Google Analytics e2e tests (#20661)
PR Close #20661
This commit is contained in:

committed by
Miško Hevery

parent
4ec4a99f16
commit
3def2cc552
@ -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 => {
|
||||
|
@ -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() {
|
||||
|
Reference in New Issue
Block a user