From a46de08d1824deb0b1d00fbdb43017493d2f407c Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 19 Jan 2022 11:53:44 +0000 Subject: [PATCH] Making the worker tell the UI it is in production when running in Cypress. --- packages/worker/src/api/controllers/system/environment.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/worker/src/api/controllers/system/environment.js b/packages/worker/src/api/controllers/system/environment.js index b897fbd943..4edf1ff8d3 100644 --- a/packages/worker/src/api/controllers/system/environment.js +++ b/packages/worker/src/api/controllers/system/environment.js @@ -6,6 +6,7 @@ exports.fetch = async ctx => { cloud: !env.SELF_HOSTED, accountPortalUrl: env.ACCOUNT_PORTAL_URL, disableAccountPortal: env.DISABLE_ACCOUNT_PORTAL, - isDev: env.isDev(), + // in test need to pretend its in production for the UI (Cypress) + isDev: env.isDev() && !env.isTest(), } }