Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/page.test.js')
-rw-r--r--test/integration/page.test.js17
1 files changed, 9 insertions, 8 deletions
diff --git a/test/integration/page.test.js b/test/integration/page.test.js
index e888b6d..42167ae 100644
--- a/test/integration/page.test.js
+++ b/test/integration/page.test.js
@@ -9,19 +9,19 @@ chromeOptions.addArguments('--headless', '--disable-gpu', '--no-sandbox');
let driver;
-beforeAll(async () => {
- await symlink('../../../test/map1.svg', 'public/assets/images/test_map.svg');
-});
+// beforeAll(async () => {
+// await symlink('../../../test/map1.svg', 'public/assets/images/test_map.svg');
+// });
beforeEach(async () => {
driver = new Builder().forBrowser('chrome').setChromeOptions(chromeOptions).build();
- console.log('manage', await driver.manage());
+ // console.log('manage', await driver.manage());
await driver.get('http://localhost:3005');
});
-it.only('loads the page', async () => {
+it('loads the page', async () => {
expect(await driver.getTitle()).toEqual('Infantry Combat Solo Basic');
// console.log('window', window);
@@ -43,6 +43,7 @@ it.only('loads the page', async () => {
});
it('selects an off-board soldier', async () => {
+// it.only.each(Array(10).fill(null))('selects an off-board soldier', async () => {
await driver.switchTo().frame(await driver.findElement(By.css('object')));
const selector = '.counter[data-allegiance="attacker"][data-number="1"]',
@@ -58,9 +59,9 @@ afterEach(async () => {
await driver.quit();
});
-afterAll(async () => {
- await unlink('public/assets/images/test_map.svg');
-});
+// afterAll(async () => {
+// await unlink('public/assets/images/test_map.svg');
+// });
async function takeScreenshot(driver) {
const dir = './test/screenshots';