From 1b7951bdc6aab3e0cc4bafee709be40799dd7d1a Mon Sep 17 00:00:00 2001 From: David Marby Date: Thu, 17 Mar 2022 21:51:06 +0100 Subject: [PATCH] Use the segment development write key for smoketests (#4605) --- packages/insomnia-app/app/common/constants.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/insomnia-app/app/common/constants.ts b/packages/insomnia-app/app/common/constants.ts index 17af4a02c..0e1e54851 100644 --- a/packages/insomnia-app/app/common/constants.ts +++ b/packages/insomnia-app/app/common/constants.ts @@ -20,7 +20,7 @@ export const isLinux = () => getAppPlatform() === 'linux'; export const isWindows = () => getAppPlatform() === 'win32'; export const getAppEnvironment = () => process.env.INSOMNIA_ENV || 'production'; export const isDevelopment = () => getAppEnvironment() === 'development'; -export const getSegmentWriteKey = () => appConfig.segmentWriteKeys[isDevelopment() ? 'development' : 'production']; +export const getSegmentWriteKey = () => appConfig.segmentWriteKeys[(isDevelopment() || process.env.PLAYWRIGHT) ? 'development' : 'production']; export const getAppBuildDate = () => new Date(process.env.BUILD_DATE ?? '').toLocaleDateString(); export const getBrowserUserAgent = () => encodeURIComponent(