From 7ba1b569836ea3809b35e7cc9b9ab1e912cf5c23 Mon Sep 17 00:00:00 2001 From: Kevin Schaul Date: Fri, 25 Aug 2023 16:19:24 -0500 Subject: [PATCH] chore: fix mapbox references in tests --- test/functional/accessibility/skip-links.js | 2 +- test/functional/keyboard/index.js | 2 +- test/functional/map/index.js | 8 ++++---- test/functional/modals/index.js | 13 ------------- 4 files changed, 6 insertions(+), 19 deletions(-) diff --git a/test/functional/accessibility/skip-links.js b/test/functional/accessibility/skip-links.js index 9d426901..d8df364a 100644 --- a/test/functional/accessibility/skip-links.js +++ b/test/functional/accessibility/skip-links.js @@ -45,7 +45,7 @@ describe("skip links", function() { assert(await elem.isFocused()); await elem.click(); - const targetEl = await $(".mapboxgl-canvas"); + const targetEl = await $(".maplibregl-canvas"); assert(await targetEl.isFocused()); }); }); diff --git a/test/functional/keyboard/index.js b/test/functional/keyboard/index.js index e874aee4..9ec5e4fa 100644 --- a/test/functional/keyboard/index.js +++ b/test/functional/keyboard/index.js @@ -44,7 +44,7 @@ describe("keyboard", function() { it("'m' should focus map", async function() { await browser.keys(["m"]); - assert(await (await $(".mapboxgl-canvas")).isFocused()); + assert(await (await $(".maplibregl-canvas")).isFocused()); }); it("'!' should show debug modal", async function() { diff --git a/test/functional/map/index.js b/test/functional/map/index.js index 4e55fca8..6a9902bb 100644 --- a/test/functional/map/index.js +++ b/test/functional/map/index.js @@ -13,8 +13,8 @@ describe("map", function() { await browser.waitUntil(async function () { return ( - await browser.isVisible(".mapboxgl-ctrl-zoom") - && await browser.getText(".mapboxgl-ctrl-zoom") === "Zoom level: "+(zoomLevel) + await browser.isVisible(".maplibregl-ctrl-zoom") + && await browser.getText(".maplibregl-ctrl-zoom") === "Zoom level: "+(zoomLevel) ); }, 10*1000) }) @@ -25,9 +25,9 @@ describe("map", function() { ])+"#"+zoomLevel+"/41.3805/2.1635"); await browser.alertAccept(); - await browser.click(".mapboxgl-ctrl-zoom-in") + await browser.click(".maplibregl-ctrl-zoom-in") await browser.waitUntil(async function () { - var text = await browser.getText(".mapboxgl-ctrl-zoom") + var text = await browser.getText(".maplibregl-ctrl-zoom") return text === "Zoom level: "+(zoomLevel+1); }, 10*1000) }) diff --git a/test/functional/modals/index.js b/test/functional/modals/index.js index 35ad4994..37c3836a 100644 --- a/test/functional/modals/index.js +++ b/test/functional/modals/index.js @@ -184,19 +184,6 @@ describe("modals", function() { assert.equal(styleObj.glyphs, glyphsUrl); }) - it("mapbox access token", async function() { - var apiKey = "testing123"; - await browser.setValueSafe(wd.$("modal:settings.maputnik:mapbox_access_token"), apiKey); - const elem = await $(wd.$("modal:settings.name")); - await elem.click(); - await browser.flushReactUpdates(); - - var styleObj = await helper.getStyleStore(browser); - await browser.waitUntil(function() { - return styleObj.metadata["maputnik:mapbox_access_token"] == apiKey; - }) - }) - it("maptiler access token", async function() { var apiKey = "testing123"; await browser.setValueSafe(wd.$("modal:settings.maputnik:openmaptiles_access_token"), apiKey);