From 02c8c08d48277ca468fb55b2190d13168d0e637d Mon Sep 17 00:00:00 2001 From: Alex Plischke Date: Mon, 30 Sep 2024 16:12:17 -0700 Subject: [PATCH] feat: explicit browser profile settings for firefox --- src/testcafe-runner.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/testcafe-runner.ts b/src/testcafe-runner.ts index 1d112aee..82e603f7 100644 --- a/src/testcafe-runner.ts +++ b/src/testcafe-runner.ts @@ -126,6 +126,13 @@ export function buildCommandLine( const browserArgs = suite.browserArgs.join(' '); testCafeBrowserName = testCafeBrowserName + ' ' + browserArgs; } + + const browserProfile = process.env.SAUCE_FIREFOX_BROWSER_PROFILE; + if (browserProfile) { + const absolutePath = path.join(projectPath, browserProfile); + testCafeBrowserName = `${testCafeBrowserName} -profile ${absolutePath}`; + } + cli.push(testCafeBrowserName); // Add all sources files/globs