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.png index 9e420b859e81cf1ac17c5ff30851014e9bb2f71c..443581d98f558bfbfecb4f7a22bf88d5ad545f10 100644 Binary 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 differ diff --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.png index 2ff0f44b32c01b66add4acbae376a339a1056430..9f850670dffeb1a7612ca70062dcc2574dd865a6 100644 Binary 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 differ diff --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.png index b37b61f98d2511af757ded7888ce9f66b44cf03f..ed62336bdf97e05f39b4d76269b1cecc544b2808 100644 Binary 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 differ diff --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.png index 52f277e0d4b9b3048633ec93554d0a37284b941a..b25a320d87909ee3c067eac9cdc29fc9ba695d71 100644 Binary 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 differ diff --git a/packages/desktop-client/src/browser-preload.browser.js b/packages/desktop-client/src/browser-preload.browser.js index ddb1928b7f3b0ac52528997dabed3ae55dc279ad..35b714c3889da5ea087aef00dbfcb57d626e35ac 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.js index b3329df80883a522908e0c9e208eb41b35f6e2c4..3e61c09b76042ff8e5219e69c58b15a9cf3e612e 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.ts new file mode 100644 index 0000000000000000000000000000000000000000..690af55963fc88a86f3cec24356f756d1090560c --- /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.ts new file mode 100644 index 0000000000000000000000000000000000000000..a65bd002e6c6922330a7de637a68aecec4ca87c9 --- /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.ts index 12065b7d21bb4b783173c58b9572b25915c6495a..25a86de84ca70c94fb8e5db45b709aadaac599c2 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.md new file mode 100644 index 0000000000000000000000000000000000000000..b7d664ce057cac953a6431acbba1878dd66320be --- /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