From 30bb78aca21e68062658e4c60e03ae5046d66a29 Mon Sep 17 00:00:00 2001 From: Puneet Agarwal <28705989+puagarwa@users.noreply.github.com> Date: Thu, 16 May 2024 13:52:59 +0530 Subject: [PATCH] env variable to toggle MPT service --- samples/get-started/playwright.service.config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/get-started/playwright.service.config.ts b/samples/get-started/playwright.service.config.ts index 3358738..4939cb0 100644 --- a/samples/get-started/playwright.service.config.ts +++ b/samples/get-started/playwright.service.config.ts @@ -41,7 +41,7 @@ export default defineConfig(config, { use: { // Specify the service endpoint. - connectOptions: { + connectOptions: process.env.ENABLE_MPT_SERVICE === '1' ? { wsEndpoint: `${process.env.PLAYWRIGHT_SERVICE_URL}?cap=${JSON.stringify({ // Can be 'linux' or 'windows'. os, @@ -53,7 +53,7 @@ export default defineConfig(config, { }, // Allow service to access the localhost. exposeNetwork: '' - } + }: undefined }, // Tenmp workaround for config merge bug in OSS https://github.com/microsoft/playwright/pull/28224 projects: config.projects? config.projects : [{}]