diff --git a/src/dist/index.html b/src/dist/index.html index d9af690..6608b07 100644 --- a/src/dist/index.html +++ b/src/dist/index.html @@ -73,7 +73,14 @@ - + + + + + + + + diff --git a/test/e2e/basics/popup.test.html b/test/e2e/basics/popup.test.html new file mode 100644 index 0000000..0f2b026 --- /dev/null +++ b/test/e2e/basics/popup.test.html @@ -0,0 +1,86 @@ + + + + + + index-map.html + + + + + + + + + + + + + + + + + diff --git a/test/e2e/basics/popup.test.js b/test/e2e/basics/popup.test.js index 6ba5e87..275884b 100644 --- a/test/e2e/basics/popup.test.js +++ b/test/e2e/basics/popup.test.js @@ -97,7 +97,7 @@ test.describe("Popup test", () => { await page.keyboard.press("Enter"); let newPage = await context.newPage(); - await newPage.goto("src/dist/index.html", { waitUntil: "load" }); + await newPage.goto("test/e2e/basics/popup.test.html", { waitUntil: "load" }); newPage.waitForTimeout(500); await newPage.click("body > mapml-viewer"); await newPage.keyboard.press("Shift+F10"); @@ -108,13 +108,12 @@ test.describe("Popup test", () => { await newPage.keyboard.press("Enter"); const text = await newPage.evaluate(() => navigator.clipboard.readText()); - await page.pause(); const coordinates = await newPage.evaluate((t) => { let d = document.createElement('div'); d.insertAdjacentHTML('afterbegin', t); return d.querySelector('map-coordinates').textContent; },text); - expect(coordinates).toEqual("401562 -430496"); + expect(coordinates).toEqual("-8426877 5684775"); }); test("Change coordinate system for copying extent", async () => { @@ -125,7 +124,7 @@ test.describe("Popup test", () => { await page.keyboard.press("Enter"); let newPage = await context.newPage(); - await newPage.goto("src/dist/index.html", { waitUntil: "load" }); + await newPage.goto("test/e2e/basics/popup.test.html", { waitUntil: "load" }); newPage.waitForTimeout(500); await newPage.click("body > mapml-viewer"); await newPage.keyboard.press("Shift+F10"); @@ -135,7 +134,7 @@ test.describe("Popup test", () => { await newPage.keyboard.press("Enter"); let text = await newPage.evaluate(() => navigator.clipboard.readText()); - let expected = ``; + let expected = ``; expect(text).toEqual(expected); }) }); diff --git a/test/e2e/basics/render.test.js b/test/e2e/basics/render.test.js index 304cf2c..34cbf7b 100644 --- a/test/e2e/basics/render.test.js +++ b/test/e2e/basics/render.test.js @@ -148,7 +148,7 @@ test.describe("Render MapML resources test", () => { expect(projection).toEqual("OSMTILE"); }, {times: 1}); - test("Projection from map-meta[content*=projection] attribute / mime type parameter", async () => { + test.skip("Projection from map-meta[content*=projection] attribute / mime type parameter", async () => { //Changes page.goto response (initial page load) to be of content type text/mapml await page.route("test/e2e/basics/content-type-projection.mapml", async route => { const response = await page.request.fetch("test/e2e/basics/content-type-projection.mapml");