23 lines
599 B
JavaScript
23 lines
599 B
JavaScript
const { Builder } = require('selenium-webdriver'),
|
|
chrome = require('selenium-webdriver/chrome.js'),
|
|
chromeOptions = new chrome.Options();
|
|
|
|
chromeOptions.addArguments('--headless', '--disable-gpu', '--no-sandbox');
|
|
chromeOptions.enableBidi();
|
|
|
|
let driver;
|
|
|
|
beforeEach(async () => {
|
|
const builder = new Builder().forBrowser('chrome').setChromeOptions(chromeOptions);
|
|
driver = builder.build();
|
|
});
|
|
|
|
it('loads the page', async () => {
|
|
await driver.get(url('/'));
|
|
expect(await driver.getTitle()).toEqual('Infantry Combat Solo Basic');
|
|
});
|
|
|
|
afterEach(async () => {
|
|
await driver.quit();
|
|
});
|