diff --git a/app/views/layout.pug b/app/views/layout.pug index 986c63ca1..692748d2e 100644 --- a/app/views/layout.pug +++ b/app/views/layout.pug @@ -306,20 +306,34 @@ html.h-100.no-js( if isBot(ctx.get('User-Agent')) //- lazyload only support for bots - script( - defer, - src=manifest("js/lazyload.js"), - integrity=manifest("js/lazyload.js", "integrity"), - crossorigin="anonymous" - ) + if config.env === 'test' + script( + defer, + src=`${config.urls.web}/js/lazyload.js`, + crossorigin="anonymous" + ) + else + script( + defer, + src=manifest("js/lazyload.js"), + integrity=manifest("js/lazyload.js", "integrity"), + crossorigin="anonymous" + ) else //- build - script( - defer, - src=manifest("js/build.js"), - integrity=manifest("js/build.js", "integrity"), - crossorigin="anonymous" - ) + if config.env === 'test' + script( + defer, + src=`${config.urls.web}/js/build.js`, + crossorigin="anonymous" + ) + else + script( + defer, + src=manifest("js/build.js"), + integrity=manifest("js/build.js", "integrity"), + crossorigin="anonymous" + ) //- TODO: remove plausible and migrate to our own //- analytics via plausible.io diff --git a/test/web/snapshots/index.js.md b/test/web/snapshots/index.js.md index c8cc6a9e3..f9378a72a 100644 --- a/test/web/snapshots/index.js.md +++ b/test/web/snapshots/index.js.md @@ -41,7 +41,7 @@ Generated by [AVA](https://avajs.dev). window._confirmPromptHTML = "Please confirm if you wish to continue.";␊ ` + ` ## returns Spanish homepage @@ -80,7 +80,7 @@ Generated by [AVA](https://avajs.dev). window._confirmPromptHTML = "Por favor confirme si desea continuar.";␊ ` + ` ## returns English ToS @@ -233,7 +233,7 @@ Generated by [AVA](https://avajs.dev). window._confirmPromptHTML = "Please confirm if you wish to continue.";␊ ` + ` ## returns Spanish ToS @@ -364,4 +364,4 @@ Generated by [AVA](https://avajs.dev). window._confirmPromptHTML = "Por favor confirme si desea continuar.";␊ ` + ` diff --git a/test/web/snapshots/index.js.snap b/test/web/snapshots/index.js.snap index 4a033b4e9..7f4ca77eb 100644 Binary files a/test/web/snapshots/index.js.snap and b/test/web/snapshots/index.js.snap differ diff --git a/test/web/snapshots/otp.js.md b/test/web/snapshots/otp.js.md index f46771c1f..c97efe3c8 100644 --- a/test/web/snapshots/otp.js.md +++ b/test/web/snapshots/otp.js.md @@ -27,7 +27,7 @@ Generated by [AVA](https://avajs.dev). window._confirmPromptHTML = "Please confirm if you wish to continue.";␊ ` + ` ## GET otp/keys > successful @@ -52,4 +52,4 @@ Generated by [AVA](https://avajs.dev). window._confirmPromptHTML = "Please confirm if you wish to continue.";␊ ` + ` diff --git a/test/web/snapshots/otp.js.snap b/test/web/snapshots/otp.js.snap index 1d87d93b0..498d0adf0 100644 Binary files a/test/web/snapshots/otp.js.snap and b/test/web/snapshots/otp.js.snap differ