chore: add featureFlag for integrationtestenv derived from process.env
This commit is contained in:
parent
1cff5e467f
commit
3c8ab8906a
|
@ -31,6 +31,9 @@ window.sessionFeatureFlags = {
|
|||
useTestNet: Boolean(
|
||||
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,
|
||||
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
|
||||
*/
|
||||
export async function pickFileForAvatar(): Promise<string | null> {
|
||||
if (process.env.NODE_APP_INSTANCE?.includes('test-integration')) {
|
||||
if (window.sessionFeatureFlags.integrationTestEnv) {
|
||||
window.log.info(
|
||||
'shorting pickFileForAvatar as it does not work in playwright/notsending the filechooser event'
|
||||
);
|
||||
|
|
|
@ -34,6 +34,7 @@ declare global {
|
|||
useOnionRequests: boolean;
|
||||
useTestNet: boolean;
|
||||
useClosedGroupV3: boolean;
|
||||
integrationTestEnv: boolean;
|
||||
debug: {
|
||||
debugLogging: boolean;
|
||||
debugLibsessionDumps: boolean;
|
||||
|
|
Loading…
Reference in New Issue