diff --git a/packages/bruno-app/next.config.js b/packages/bruno-app/next.config.js index 639ae300..8c5064b4 100644 --- a/packages/bruno-app/next.config.js +++ b/packages/bruno-app/next.config.js @@ -1,7 +1,8 @@ module.exports = { reactStrictMode: true, publicRuntimeConfig: { - CI: process.env.CI + CI: process.env.CI, + PLAYWRIGHT: process.env.PLAYWRIGHT }, webpack: (config, { isServer }) => { // Fixes npm packages that depend on `fs` module diff --git a/packages/bruno-app/src/providers/App/useTelemetry.js b/packages/bruno-app/src/providers/App/useTelemetry.js index 7ed558b6..581c54c1 100644 --- a/packages/bruno-app/src/providers/App/useTelemetry.js +++ b/packages/bruno-app/src/providers/App/useTelemetry.js @@ -9,8 +9,8 @@ const { publicRuntimeConfig } = getConfig(); const posthogApiKey = 'phc_7gtqSrrdZRohiozPMLIacjzgHbUlhalW1Bu16uYijMR'; let posthogClient = null; -const isCI = () => { - return publicRuntimeConfig.CI ? true : false; +const isPlaywrightTestRunning = () => { + return publicRuntimeConfig.PLAYWRIGHT ? true : false; }; // Todo support chrome and firefox extension @@ -39,7 +39,7 @@ const getAnonymousTrackingId = () => { }; const trackStart = () => { - if(isCI()) { + if(isPlaywrightTestRunning()) { return; } diff --git a/playwright.config.js b/playwright.config.js index fb328c41..63afd88d 100644 --- a/playwright.config.js +++ b/playwright.config.js @@ -7,6 +7,7 @@ const { devices } = require('@playwright/test'); */ // require('dotenv').config(); +process.env.PLAYWRIGHT = "1"; /** * @see https://playwright.dev/docs/test-configuration