From 35d4993c3dc9f0068b77bb09b7ae2ec979bdeaad Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Fri, 16 Aug 2013 10:56:04 -0700 Subject: chore(ngdocs): disable google analytics in e2e tests GA is not needed during e2e tests, so I'm removing it to speed up the e2e test suite. See previous commits for more info. --- docs/src/templates/index.html | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'docs/src') diff --git a/docs/src/templates/index.html b/docs/src/templates/index.html index 4807019a..0788e415 100644 --- a/docs/src/templates/index.html +++ b/docs/src/templates/index.html @@ -119,11 +119,13 @@ _gaq.push(['_setAccount', 'UA-8594346-3']); _gaq.push(['_setDomainName', '.angularjs.org']); - (function() { - var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; - ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; - var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); - })(); + if (!window.RUNNING_IN_NG_TEST_RUNNER) { + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + } -- cgit v1.2.3