DEV: Stop loading external scripts while running tests (#81)
* DEV: Stop loading external scripts while running tests
* Revert "Turn of CSP for tests"
This reverts commit db1bf99277
. It had no effect, since CSP is set by the server, and this was only affecting the client
This commit is contained in:
parent
db1bf99277
commit
cf27a7be64
|
@ -72,6 +72,10 @@ export default AdComponent.extend({
|
|||
},
|
||||
|
||||
_triggerAds() {
|
||||
if (Ember.testing) {
|
||||
return; // Don't load external JS during tests
|
||||
}
|
||||
|
||||
loadAdbutler().then(
|
||||
function() {
|
||||
if (this.divs.length > 0) {
|
||||
|
|
|
@ -135,6 +135,10 @@ export default AdComponent.extend({
|
|||
},
|
||||
|
||||
_triggerAds() {
|
||||
if (Ember.testing) {
|
||||
return; // Don't load external JS during tests
|
||||
}
|
||||
|
||||
this.set("adRequested", true);
|
||||
loadAdsense().then(function() {
|
||||
const adsbygoogle = window.adsbygoogle || [];
|
||||
|
|
|
@ -367,6 +367,10 @@ export default AdComponent.extend({
|
|||
|
||||
@on("didInsertElement")
|
||||
_initGoogleDFP() {
|
||||
if (Ember.testing) {
|
||||
return; // Don't load external JS during tests
|
||||
}
|
||||
|
||||
if (!this.get("showAd")) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -18,8 +18,7 @@ acceptance("AdSense", {
|
|||
adsense_mobile_post_bottom_ad_size: "300*250 - medium rectangle",
|
||||
adsense_nth_post_code: 6,
|
||||
adsense_topic_above_post_stream_code: "above_post_stream_ad_unit",
|
||||
adsense_topic_above_post_stream_ad_sizes: "728*90 - leaderboard",
|
||||
content_security_policy: false
|
||||
adsense_topic_above_post_stream_ad_sizes: "728*90 - leaderboard"
|
||||
},
|
||||
site: {
|
||||
house_creatives: {
|
||||
|
|
|
@ -18,8 +18,7 @@ acceptance("DFP Ads", {
|
|||
dfp_mobile_post_bottom_ad_size: "300*250 - medium rectangle",
|
||||
dfp_nth_post_code: 6,
|
||||
dfp_topic_above_post_stream_code: "list_top_ad_unit",
|
||||
dfp_topic_above_post_stream_ad_sizes: "728*90 - leaderboard",
|
||||
content_security_policy: false
|
||||
dfp_topic_above_post_stream_ad_sizes: "728*90 - leaderboard"
|
||||
},
|
||||
site: {
|
||||
house_creatives: {
|
||||
|
|
Loading…
Reference in New Issue