chore: add featureFlag for integrationtestenv derived from process.env

pull/2858/head
Audric Ackermann 2 years ago
parent 1cff5e467f
commit 3c8ab8906a

@ -31,6 +31,9 @@ window.sessionFeatureFlags = {
useTestNet: Boolean( useTestNet: Boolean(
process.env.NODE_APP_INSTANCE && process.env.NODE_APP_INSTANCE.includes('testnet') process.env.NODE_APP_INSTANCE && process.env.NODE_APP_INSTANCE.includes('testnet')
), ),
integrationTestEnv: Boolean(
process.env.NODE_APP_INSTANCE && process.env.NODE_APP_INSTANCE.includes('test-integration')
),
useClosedGroupV3: false || process.env.USE_CLOSED_GROUP_V3, useClosedGroupV3: false || process.env.USE_CLOSED_GROUP_V3,
debug: { debug: {
debugLogging: !_.isEmpty(process.env.SESSION_DEBUG), debugLogging: !_.isEmpty(process.env.SESSION_DEBUG),

@ -140,7 +140,7 @@ export async function autoScaleAvatarBlob(file: File) {
* Shows the system file picker for images, scale the image down for avatar/opengroup measurements and return the blob objectURL on success * Shows the system file picker for images, scale the image down for avatar/opengroup measurements and return the blob objectURL on success
*/ */
export async function pickFileForAvatar(): Promise<string | null> { export async function pickFileForAvatar(): Promise<string | null> {
if (process.env.NODE_APP_INSTANCE?.includes('test-integration')) { if (window.sessionFeatureFlags.integrationTestEnv) {
window.log.info( window.log.info(
'shorting pickFileForAvatar as it does not work in playwright/notsending the filechooser event' 'shorting pickFileForAvatar as it does not work in playwright/notsending the filechooser event'
); );

1
ts/window.d.ts vendored

@ -34,6 +34,7 @@ declare global {
useOnionRequests: boolean; useOnionRequests: boolean;
useTestNet: boolean; useTestNet: boolean;
useClosedGroupV3: boolean; useClosedGroupV3: boolean;
integrationTestEnv: boolean;
debug: { debug: {
debugLogging: boolean; debugLogging: boolean;
debugLibsessionDumps: boolean; debugLibsessionDumps: boolean;

Loading…
Cancel
Save