Web Dev Solutions

Catalin Mititiuc

From f9bf2f9097dfeb3b8426074cce7d4b541ee9abe4 Mon Sep 17 00:00:00 2001 From: Catalin Mititiuc Date: Thu, 11 Jul 2024 10:29:57 -0700 Subject: Fix tests --- test/integration/loadScenario.test.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/integration/loadScenario.test.js') diff --git a/test/integration/loadScenario.test.js b/test/integration/loadScenario.test.js index fa0d735..2abf9f3 100644 --- a/test/integration/loadScenario.test.js +++ b/test/integration/loadScenario.test.js @@ -19,7 +19,7 @@ it('loads default scenario on initial page load', async () => { const mapResource = page.findMapResourceEl(driver); await driver.switchTo().frame(mapResource); - const defaultScenarioMapsSelector = '[href="#map2"], [href="#map3"]'; + const defaultScenarioMapsSelector = '#mapsheet2, #mapsheet3'; const maps = await driver.findElements(By.css(defaultScenarioMapsSelector)); expect(maps.length).toBe(2); @@ -38,7 +38,7 @@ it('loads previously-loaded scenario on page refresh', async () => { const mapResource = page.findMapResourceEl(driver); await driver.switchTo().frame(mapResource); - const scenarioMapsSelector = '[href="#map1"], [href="#map2"], [href="#map3"]'; + const scenarioMapsSelector = '#mapsheet1, #mapsheet2, #mapsheet3'; maps = await driver.findElements(By.css(scenarioMapsSelector)); expect(maps.length).toBe(3); @@ -65,7 +65,7 @@ it('loads built-in scenario from dialog', async () => { const mapResource = page.findMapResourceEl(driver); await driver.switchTo().frame(mapResource); - const scenarioMapsSelector = '[href="#map1"], [href="#map2"], [href="#map3"]'; + const scenarioMapsSelector = '#mapsheet1, #mapsheet2, #mapsheet3'; let maps = await driver.findElements(By.css(scenarioMapsSelector)); expect(maps.length).toBe(3); @@ -84,7 +84,7 @@ it('loads scenario directly from file', async () => { const mapResource = page.findMapResourceEl(driver); await driver.switchTo().frame(mapResource); - const scenarioMapsSelector = '[href="#map1"], [href="#map2"], [href="#map3"]'; + const scenarioMapsSelector = '#mapsheet1, #mapsheet2, #mapsheet3'; let maps = await driver.findElements(By.css(scenarioMapsSelector)); expect(maps.length).toBe(3); -- cgit v1.2.3