From 2f3ba39ff400569aeb29e00f42d2dd14b04940e7 Mon Sep 17 00:00:00 2001
From: titanism <101466223+titanism@users.noreply.github.com>
Date: Thu, 19 Oct 2023 17:37:27 -0500
Subject: [PATCH] fix: fixed ci due to build differences on ubuntu vs mac
---
app/views/layout.pug | 38 +++++++++++++++++++++----------
test/web/snapshots/index.js.md | 8 +++----
test/web/snapshots/index.js.snap | Bin 53496 -> 53277 bytes
test/web/snapshots/otp.js.md | 4 ++--
test/web/snapshots/otp.js.snap | Bin 13128 -> 13001 bytes
5 files changed, 32 insertions(+), 18 deletions(-)
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.";␊