Fix/refactor tests

This commit is contained in:
2025-06-16 22:41:31 -07:00
parent dac61e6121
commit c46c361217
15 changed files with 160 additions and 135 deletions

View File

@@ -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');
});