From 163e3a9de59f5d6a8df38fa32a1e7dc4db1ad024 Mon Sep 17 00:00:00 2001
From: Catalin Mititiuc
Date: Sat, 1 Jun 2024 17:50:58 -0700
Subject: Fix/refactor tests
---
test/integration/page.test.js | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
(limited to 'test/integration/page.test.js')
diff --git a/test/integration/page.test.js b/test/integration/page.test.js
index 8bb703e..f06a7d1 100644
--- a/test/integration/page.test.js
+++ b/test/integration/page.test.js
@@ -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');
});
--
cgit v1.2.3