Skip to content
Snippets Groups Projects
Unverified Commit 90e32df3 authored by Matiss Janis Aboltins's avatar Matiss Janis Aboltins Committed by GitHub
Browse files

:bug: (vrt) set static version (#1641)

parent 8ef2c401
No related branches found
No related tags found
No related merge requests found
Showing
with 30 additions and 5 deletions
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
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);
......
......@@ -41,7 +41,6 @@ function Version() {
zIndex: 5001,
},
}}
data-vrt-mask
>
{`App: v${window.Actual.ACTUAL_VERSION} | Server: ${version}`}
</Text>
......
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;
export const isPlaywright = false;
export const OS: 'windows' | 'mac' | 'linux' | 'unknown' = 'unknown';
export const env: 'web' | 'mobile' | 'unknown' = 'unknown';
export const isBrowser = false;
......@@ -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;
---
category: Maintenance
authors: [MatissJanis]
---
VRT: set a static version and unmask more regions for the tests
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment