Fix/refactor tests
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
const { Builder } = require('selenium-webdriver'),
|
||||
chrome = require('selenium-webdriver/chrome.js'),
|
||||
chromeOptions = new chrome.Options(),
|
||||
{ expect, it } = require('@jest/globals');
|
||||
chromeOptions = new chrome.Options();
|
||||
|
||||
chromeOptions.addArguments('--headless', '--disable-gpu', '--no-sandbox');
|
||||
chromeOptions.enableBidi();
|
||||
@@ -9,11 +8,12 @@ chromeOptions.enableBidi();
|
||||
let driver;
|
||||
|
||||
beforeEach(async () => {
|
||||
driver = new Builder().forBrowser('chrome').setChromeOptions(chromeOptions).build();
|
||||
const builder = new Builder().forBrowser('chrome').setChromeOptions(chromeOptions);
|
||||
driver = builder.build();
|
||||
});
|
||||
|
||||
it('loads the page', async () => {
|
||||
await driver.get('http://localhost:3005');
|
||||
await driver.get(url('/'));
|
||||
expect(await driver.getTitle()).toEqual('Infantry Combat Solo Basic');
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user