blob: 8bb703e794ac9c3afc5d062127453e16846d9526 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
const { Builder } = require('selenium-webdriver'),
chrome = require('selenium-webdriver/chrome.js'),
chromeOptions = new chrome.Options(),
{ expect, it } = require('@jest/globals');
chromeOptions.addArguments('--headless', '--disable-gpu', '--no-sandbox');
chromeOptions.enableBidi();
let driver;
beforeEach(async () => {
driver = new Builder().forBrowser('chrome').setChromeOptions(chromeOptions).build();
});
it('loads the page', async () => {
await driver.get('http://localhost:3005');
expect(await driver.getTitle()).toEqual('Infantry Combat Solo Basic');
});
afterEach(async () => {
await driver.quit();
});
|