Skip to content

Commit

Permalink
Use isolated Chrome profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
georgegevoian committed Sep 13, 2023
1 parent 71c1e12 commit f38cd67
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/nbrowser/testUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import log from 'app/server/lib/log';
import {addToRepl, assert, driver, enableDebugCapture, Key, setOptionsModifyFunc, useServer} from 'mocha-webdriver';
import * as gu from 'test/nbrowser/gristUtils';
import {server} from 'test/nbrowser/testServer';
import {v4 as uuidv4} from 'uuid';

// Exports the server object with useful methods such as getHost(), waitServerReady(),
// simulateLogin(), etc.
Expand All @@ -29,6 +30,8 @@ setOptionsModifyFunc(({chromeOpts, firefoxOpts}) => {
chromeOpts.setChromeBinaryPath(process.env.TEST_CHROME_BINARY_PATH);
}

chromeOpts.addArguments(`--user-data-dir=/tmp/mocha-webdriver/chrome-profiles/${uuidv4()}`);

// Set "kiosk" printing that saves to PDF without offering any dialogs. This applies to regular
// (non-headless) Chrome. On headless Chrome, no dialog or output occurs regardless.
chromeOpts.addArguments("--kiosk-printing");
Expand Down

0 comments on commit f38cd67

Please sign in to comment.