A local-first personal finance app
:bug: (vrt) set static version (#1641)
Matiss Janis Aboltins90e32df3fb04
diff --git a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-2-chromium-linux.png b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-2-chromium-linux.pngindex 9e420b859e..443581d98f 100644Binary files a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-2-chromium-linux.png and b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-2-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/onboarding.test.js-snapshots/Onboarding-checks-the-page-visuals-1-chromium-linux.png b/packages/desktop-client/e2e/onboarding.test.js-snapshots/Onboarding-checks-the-page-visuals-1-chromium-linux.pngindex 2ff0f44b32..9f850670df 100644Binary files a/packages/desktop-client/e2e/onboarding.test.js-snapshots/Onboarding-checks-the-page-visuals-1-chromium-linux.png and b/packages/desktop-client/e2e/onboarding.test.js-snapshots/Onboarding-checks-the-page-visuals-1-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/onboarding.test.js-snapshots/Onboarding-checks-the-page-visuals-2-chromium-linux.png b/packages/desktop-client/e2e/onboarding.test.js-snapshots/Onboarding-checks-the-page-visuals-2-chromium-linux.pngindex b37b61f98d..ed62336bdf 100644Binary files a/packages/desktop-client/e2e/onboarding.test.js-snapshots/Onboarding-checks-the-page-visuals-2-chromium-linux.png and b/packages/desktop-client/e2e/onboarding.test.js-snapshots/Onboarding-checks-the-page-visuals-2-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/settings.test.js-snapshots/Settings-checks-the-page-visuals-1-chromium-linux.png b/packages/desktop-client/e2e/settings.test.js-snapshots/Settings-checks-the-page-visuals-1-chromium-linux.pngindex 52f277e0d4..b25a320d87 100644Binary files a/packages/desktop-client/e2e/settings.test.js-snapshots/Settings-checks-the-page-visuals-1-chromium-linux.png and b/packages/desktop-client/e2e/settings.test.js-snapshots/Settings-checks-the-page-visuals-1-chromium-linux.png differdiff --git a/packages/desktop-client/src/browser-preload.browser.js b/packages/desktop-client/src/browser-preload.browser.jsindex ddb1928b7f..35b714c388 100644--- a/packages/desktop-client/src/browser-preload.browser.js+++ b/packages/desktop-client/src/browser-preload.browser.js@@ -1,5 +1,7 @@import { initBackend as initSQLBackend } from 'absurd-sql/dist/indexeddb-main-thread';+import * as Platform from 'loot-core/src/client/platform';+import packageJson from '../package.json';const backendWorkerUrl = new URL('./browser-server.js', import.meta.url);@@ -10,7 +12,7 @@ const backendWorkerUrl = new URL('./browser-server.js', import.meta.url);// everything else.let IS_DEV = process.env.NODE_ENV === 'development';-let ACTUAL_VERSION = packageJson.version;+let ACTUAL_VERSION = Platform.isPlaywright ? '99.9.9' : packageJson.version;// *** Start the backend ***let worker;@@ -40,7 +42,6 @@ createBackendWorker();global.Actual = {IS_DEV,ACTUAL_VERSION,- IS_FAKE_WEB: true,logToTerminal: (...args) => {console.log(...args);diff --git a/packages/desktop-client/src/components/manager/ManagementApp.js b/packages/desktop-client/src/components/manager/ManagementApp.jsindex b3329df808..3e61c09b76 100644--- a/packages/desktop-client/src/components/manager/ManagementApp.js+++ b/packages/desktop-client/src/components/manager/ManagementApp.js@@ -41,7 +41,6 @@ function Version() {zIndex: 5001,},}}- data-vrt-mask>{`App: v${window.Actual.ACTUAL_VERSION} | Server: ${version}`}</Text>diff --git a/packages/loot-core/src/client/platform.electron.ts b/packages/loot-core/src/client/platform.electron.tsnew file mode 100644index 0000000000..690af55963--- /dev/null+++ b/packages/loot-core/src/client/platform.electron.ts@@ -0,0 +1,15 @@+const isWindows =+ navigator.platform && navigator.platform.toLowerCase() === 'win32';++const isMac =+ navigator.platform && navigator.platform.toUpperCase().indexOf('MAC') >= 0;++export const isPlaywright = navigator.userAgent === 'playwright';++export const OS: 'windows' | 'mac' | 'linux' | 'unknown' = isWindows+ ? 'windows'+ : isMac+ ? 'mac'+ : 'linux';+export const env: 'web' | 'mobile' | 'unknown' = 'unknown';+export const isBrowser = false;diff --git a/packages/loot-core/src/client/platform.testing.ts b/packages/loot-core/src/client/platform.testing.tsnew file mode 100644index 0000000000..a65bd002e6--- /dev/null+++ b/packages/loot-core/src/client/platform.testing.ts@@ -0,0 +1,5 @@+export const isPlaywright = false;++export const OS: 'windows' | 'mac' | 'linux' | 'unknown' = 'unknown';+export const env: 'web' | 'mobile' | 'unknown' = 'unknown';+export const isBrowser = false;diff --git a/packages/loot-core/src/client/platform.web.ts b/packages/loot-core/src/client/platform.web.tsindex 12065b7d21..25a86de84c 100644--- a/packages/loot-core/src/client/platform.web.ts+++ b/packages/loot-core/src/client/platform.web.ts@@ -12,5 +12,4 @@ export const OS: 'windows' | 'mac' | 'linux' | 'unknown' = isWindows? 'mac': 'linux';export const env: 'web' | 'mobile' | 'unknown' = 'web';-export const isBrowser =- typeof window !== 'undefined' && !!window.Actual?.IS_FAKE_WEB;+export const isBrowser = true;diff --git a/upcoming-release-notes/1641.md b/upcoming-release-notes/1641.mdnew file mode 100644index 0000000000..b7d664ce05--- /dev/null+++ b/upcoming-release-notes/1641.md@@ -0,0 +1,6 @@+---+category: Maintenance+authors: [MatissJanis]+---++VRT: set a static version and unmask more regions for the tests