Skip to content

Commit

Permalink
test(cli): test chrome paths
Browse files Browse the repository at this point in the history
  • Loading branch information
scottmries committed Jun 13, 2024
1 parent b0666c7 commit bb5198a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/cli/src/lib/webdriver.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import chrome from 'selenium-webdriver/chrome';
import path from 'path';
import { WebdriverConfigParams } from '../types';
import sinon from 'sinon';
import { CHROMEDRIVER_TEST_PATH } from './utils';
import { CHROME_TEST_PATH, CHROMEDRIVER_TEST_PATH } from './utils';

describe('startDriver', () => {
let config: WebdriverConfigParams;
Expand Down Expand Up @@ -51,6 +51,14 @@ describe('startDriver', () => {
assert.include(capabilities.get('browserName'), 'chrome');
});

it('uses the chrome path with chrome-headless', async () => {
browser = 'chrome-headless';
driver = await startDriver(config);
const options = config?.builder?.getChromeOptions();
const chromePath = (options as any).get('goog:chromeOptions').binary;
assert.equal(chromePath, CHROME_TEST_PATH);
});

it('uses the chromedriver path with chrome-headless', async () => {
browser = 'chrome-headless';
driver = await startDriver(config);
Expand Down

0 comments on commit bb5198a

Please sign in to comment.