Compare commits

..

1 Commits

Author SHA1 Message Date
dependabot[bot] c67237f6a7 chore(deps-dev): Bump @vitejs/plugin-react in the react group
Bumps the react group with 1 update: [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/tree/HEAD/packages/plugin-react).


Updates `@vitejs/plugin-react` from 5.2.0 to 6.0.3
- [Release notes](https://github.com/vitejs/vite-plugin-react/releases)
- [Changelog](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite-plugin-react/commits/plugin-react@6.0.3/packages/plugin-react)

---
updated-dependencies:
- dependency-name: "@vitejs/plugin-react"
  dependency-version: 6.0.3
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: react
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-08 13:43:26 +00:00
18 changed files with 197 additions and 214 deletions
-1
View File
@@ -10,7 +10,6 @@ export default defineConfig({
}, },
e2e: { e2e: {
specPattern: "e2e/**/*.spec.ts",
setupNodeEvents(on, config) { setupNodeEvents(on, config) {
// implement node event listeners here // implement node event listeners here
require("@cypress/code-coverage/task")(on, config); require("@cypress/code-coverage/task")(on, config);
@@ -1,7 +1,5 @@
import { MaputnikDriver } from "./maputnik-driver"; import { MaputnikDriver } from "./maputnik-driver";
const test = it;
describe("accessibility", () => { describe("accessibility", () => {
const { beforeAndAfter, get, when, then } = new MaputnikDriver(); const { beforeAndAfter, get, when, then } = new MaputnikDriver();
beforeAndAfter(); beforeAndAfter();
@@ -11,7 +9,7 @@ describe("accessibility", () => {
when.setStyle("layer"); when.setStyle("layer");
}); });
test("skip link to layer list", () => { it("skip link to layer list", () => {
const selector = "root:skip:layer-list"; const selector = "root:skip:layer-list";
then(get.elementByTestId(selector)).shouldExist(); then(get.elementByTestId(selector)).shouldExist();
when.tab(); when.tab();
@@ -20,7 +18,7 @@ describe("accessibility", () => {
then(get.skipTargetLayerList()).shouldBeFocused(); then(get.skipTargetLayerList()).shouldBeFocused();
}); });
test("skip link to layer editor", () => { it("skip link to layer editor", () => {
const selector = "root:skip:layer-editor"; const selector = "root:skip:layer-editor";
then(get.elementByTestId(selector)).shouldExist(); then(get.elementByTestId(selector)).shouldExist();
then(get.elementByTestId("skip-target-layer-editor")).shouldExist(); then(get.elementByTestId("skip-target-layer-editor")).shouldExist();
@@ -30,7 +28,7 @@ describe("accessibility", () => {
then(get.skipTargetLayerEditor()).shouldBeFocused(); then(get.skipTargetLayerEditor()).shouldBeFocused();
}); });
test("skip link to map view", () => { it("skip link to map view", () => {
const selector = "root:skip:map-view"; const selector = "root:skip:map-view";
then(get.elementByTestId(selector)).shouldExist(); then(get.elementByTestId(selector)).shouldExist();
when.tab().tab().tab(); when.tab().tab().tab();
@@ -1,17 +1,15 @@
import { MaputnikDriver } from "./maputnik-driver"; import { MaputnikDriver } from "./maputnik-driver";
const test = it;
describe("code editor", () => { describe("code editor", () => {
const { beforeAndAfter, when, get, then } = new MaputnikDriver(); const { beforeAndAfter, when, get, then } = new MaputnikDriver();
beforeAndAfter(); beforeAndAfter();
test("open code editor", () => { it("open code editor", () => {
when.click("nav:code-editor"); when.click("nav:code-editor");
then(get.element(".maputnik-code-editor")).shouldExist(); then(get.element(".maputnik-code-editor")).shouldExist();
}); });
test("closes code editor", () => { it("closes code editor", () => {
when.click("nav:code-editor"); when.click("nav:code-editor");
then(get.element(".maputnik-code-editor")).shouldExist(); then(get.element(".maputnik-code-editor")).shouldExist();
when.click("nav:code-editor"); when.click("nav:code-editor");
@@ -1,7 +1,5 @@
import { MaputnikDriver } from "./maputnik-driver"; import { MaputnikDriver } from "./maputnik-driver";
const test = it;
describe("history", () => { describe("history", () => {
const { beforeAndAfter, when, get, then } = new MaputnikDriver(); const { beforeAndAfter, when, get, then } = new MaputnikDriver();
beforeAndAfter(); beforeAndAfter();
@@ -15,7 +13,7 @@ describe("history", () => {
redoKeyCombo = isMac ? "{meta}{shift}z" : "{ctrl}y"; redoKeyCombo = isMac ? "{meta}{shift}z" : "{ctrl}y";
}); });
test("undo/redo", () => { it("undo/redo", () => {
when.setStyle("geojson"); when.setStyle("geojson");
when.modal.open(); when.modal.open();
@@ -89,7 +87,7 @@ describe("history", () => {
}); });
}); });
test("should not redo after undo and value change", () => { it("should not redo after undo and value change", () => {
when.setStyle("geojson"); when.setStyle("geojson");
when.modal.open(); when.modal.open();
when.modal.fillLayers({ when.modal.fillLayers({
+3 -5
View File
@@ -1,19 +1,17 @@
import { MaputnikDriver } from "./maputnik-driver"; import { MaputnikDriver } from "./maputnik-driver";
const test = it;
describe("i18n", () => { describe("i18n", () => {
const { beforeAndAfter, get, when, then } = new MaputnikDriver(); const { beforeAndAfter, get, when, then } = new MaputnikDriver();
beforeAndAfter(); beforeAndAfter();
describe("language detector", () => { describe("language detector", () => {
test("English", () => { it("English", () => {
const url = "?lng=en"; const url = "?lng=en";
when.visit(url); when.visit(url);
then(get.elementByTestId("maputnik-lang-select")).shouldHaveValue("en"); then(get.elementByTestId("maputnik-lang-select")).shouldHaveValue("en");
}); });
test("Japanese", () => { it("Japanese", () => {
const url = "?lng=ja"; const url = "?lng=ja";
when.visit(url); when.visit(url);
then(get.elementByTestId("maputnik-lang-select")).shouldHaveValue("ja"); then(get.elementByTestId("maputnik-lang-select")).shouldHaveValue("ja");
@@ -25,7 +23,7 @@ describe("i18n", () => {
when.setStyle("layer"); when.setStyle("layer");
}); });
test("the language switcher switches to Japanese", () => { it("the language switcher switches to Japanese", () => {
const selector = "maputnik-lang-select"; const selector = "maputnik-lang-select";
then(get.elementByTestId(selector)).shouldExist(); then(get.elementByTestId(selector)).shouldExist();
when.select(selector, "ja"); when.select(selector, "ja");
@@ -1,5 +1,4 @@
import { MaputnikDriver } from "./maputnik-driver"; import { MaputnikDriver } from "./maputnik-driver";
const test = it;
describe("keyboard", () => { describe("keyboard", () => {
const { beforeAndAfter, given, when, get, then } = new MaputnikDriver(); const { beforeAndAfter, given, when, get, then } = new MaputnikDriver();
@@ -10,7 +9,7 @@ describe("keyboard", () => {
when.setStyle(""); when.setStyle("");
}); });
test("ESC should unfocus", () => { it("ESC should unfocus", () => {
const targetSelector = "maputnik-select"; const targetSelector = "maputnik-select";
when.focus(targetSelector); when.focus(targetSelector);
then(get.elementByTestId(targetSelector)).shouldBeFocused(); then(get.elementByTestId(targetSelector)).shouldBeFocused();
@@ -18,42 +17,42 @@ describe("keyboard", () => {
then(get.elementByTestId(targetSelector)).shouldNotBeFocused(); then(get.elementByTestId(targetSelector)).shouldNotBeFocused();
}); });
test("'?' should show shortcuts modal", () => { it("'?' should show shortcuts modal", () => {
when.typeKeys("?"); when.typeKeys("?");
then(get.elementByTestId("modal:shortcuts")).shouldBeVisible(); then(get.elementByTestId("modal:shortcuts")).shouldBeVisible();
}); });
test("'o' should show open modal", () => { it("'o' should show open modal", () => {
when.typeKeys("o"); when.typeKeys("o");
then(get.elementByTestId("modal:open")).shouldBeVisible(); then(get.elementByTestId("modal:open")).shouldBeVisible();
}); });
test("'e' should show export modal", () => { it("'e' should show export modal", () => {
when.typeKeys("e"); when.typeKeys("e");
then(get.elementByTestId("modal:export")).shouldBeVisible(); then(get.elementByTestId("modal:export")).shouldBeVisible();
}); });
test("'d' should show sources modal", () => { it("'d' should show sources modal", () => {
when.typeKeys("d"); when.typeKeys("d");
then(get.elementByTestId("modal:sources")).shouldBeVisible(); then(get.elementByTestId("modal:sources")).shouldBeVisible();
}); });
test("'s' should show settings modal", () => { it("'s' should show settings modal", () => {
when.typeKeys("s"); when.typeKeys("s");
then(get.elementByTestId("modal:settings")).shouldBeVisible(); then(get.elementByTestId("modal:settings")).shouldBeVisible();
}); });
test("'i' should change map to inspect mode", () => { it("'i' should change map to inspect mode", () => {
when.typeKeys("i"); when.typeKeys("i");
then(get.inputValue("maputnik-select")).shouldEqual("inspect"); then(get.inputValue("maputnik-select")).shouldEqual("inspect");
}); });
test("'m' should focus map", () => { it("'m' should focus map", () => {
when.typeKeys("m"); when.typeKeys("m");
then(get.canvas()).shouldBeFocused(); then(get.canvas()).shouldBeFocused();
}); });
test("'!' should show debug modal", () => { it("'!' should show debug modal", () => {
when.typeKeys("!"); when.typeKeys("!");
then(get.elementByTestId("modal:debug")).shouldBeVisible(); then(get.elementByTestId("modal:debug")).shouldBeVisible();
}); });
@@ -1,8 +1,6 @@
import { MaputnikDriver } from "./maputnik-driver"; import { MaputnikDriver } from "./maputnik-driver";
import { v1 as uuid } from "uuid"; import { v1 as uuid } from "uuid";
const test = it;
describe("layer editor", () => { describe("layer editor", () => {
const { beforeAndAfter, get, when, then } = new MaputnikDriver(); const { beforeAndAfter, get, when, then } = new MaputnikDriver();
beforeAndAfter(); beforeAndAfter();
@@ -30,8 +28,8 @@ describe("layer editor", () => {
return id; return id;
} }
test("expand/collapse"); it("expand/collapse");
test("id", () => { it("id", () => {
const bgId = createBackground(); const bgId = createBackground();
when.click("layer-list-item:background:" + bgId); when.click("layer-list-item:background:" + bgId);
@@ -51,7 +49,7 @@ describe("layer editor", () => {
}); });
describe("source", () => { describe("source", () => {
test("should show error when the source is invalid", () => { it("should show error when the source is invalid", () => {
when.modal.fillLayers({ when.modal.fillLayers({
type: "circle", type: "circle",
layer: "invalid", layer: "invalid",
@@ -70,7 +68,7 @@ describe("layer editor", () => {
when.click("layer-editor.layer-id"); when.click("layer-editor.layer-id");
}); });
test("should update min-zoom in local storage", () => { it("should update min-zoom in local storage", () => {
then(get.styleFromLocalStorage()).shouldDeepNestedInclude({ then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
layers: [ layers: [
{ {
@@ -107,7 +105,7 @@ describe("layer editor", () => {
when.click("layer-editor.layer-id"); when.click("layer-editor.layer-id");
}); });
test("should update style in local storage", () => { it("should update style in local storage", () => {
then(get.styleFromLocalStorage()).shouldDeepNestedInclude({ then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
layers: [ layers: [
{ {
@@ -131,7 +129,7 @@ describe("layer editor", () => {
when.click("layer-editor.layer-id"); when.click("layer-editor.layer-id");
}); });
test("should update style in local storage", () => { it("should update style in local storage", () => {
then(get.styleFromLocalStorage()).shouldDeepNestedInclude({ then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
layers: [ layers: [
{ {
@@ -151,7 +149,7 @@ describe("layer editor", () => {
when.click("min-zoom.input-text"); when.click("min-zoom.input-text");
}); });
test("should update style in local storage", () => { it("should update style in local storage", () => {
then(get.styleFromLocalStorage()).shouldDeepNestedInclude({ then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
layers: [ layers: [
{ {
@@ -172,7 +170,7 @@ describe("layer editor", () => {
when.click("spec-field:background-color"); when.click("spec-field:background-color");
}); });
test("should update style in local storage", () => { it("should update style in local storage", () => {
then(get.styleFromLocalStorage()).shouldDeepNestedInclude({ then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
layers: [ layers: [
{ {
@@ -192,11 +190,11 @@ describe("layer editor", () => {
when.type("spec-field-input:background-opacity", "0."); when.type("spec-field-input:background-opacity", "0.");
}); });
test("should keep '.' in the input field", () => { it("should keep '.' in the input field", () => {
then(get.elementByTestId("spec-field-input:background-opacity")).shouldHaveValue("0."); then(get.elementByTestId("spec-field-input:background-opacity")).shouldHaveValue("0.");
}); });
test("should revert to a valid value when focus out", () => { it("should revert to a valid value when focus out", () => {
when.click("layer-list-item:background:" + bgId); when.click("layer-list-item:background:" + bgId);
then(get.elementByTestId("spec-field-input:background-opacity")).shouldHaveValue("0"); then(get.elementByTestId("spec-field-input:background-opacity")).shouldHaveValue("0");
}); });
@@ -205,12 +203,12 @@ describe("layer editor", () => {
describe("filter", () => { describe("filter", () => {
test("expand/collapse"); it("expand/collapse");
test("compound filter"); it("compound filter");
}); });
describe("layout", () => { describe("layout", () => {
test("text-font", () => { it("text-font", () => {
when.setStyle("font"); when.setStyle("font");
when.collapseGroupInLayerEditor(); when.collapseGroupInLayerEditor();
when.collapseGroupInLayerEditor(1); when.collapseGroupInLayerEditor(1);
@@ -224,14 +222,14 @@ describe("layer editor", () => {
}); });
describe("paint", () => { describe("paint", () => {
test("expand/collapse"); it("expand/collapse");
test("color"); it("color");
test("pattern"); it("pattern");
test("opacity"); it("opacity");
}); });
describe("json-editor", () => { describe("json-editor", () => {
test("add", () => { it("add", () => {
const id = when.modal.fillLayers({ const id = when.modal.fillLayers({
type: "circle", type: "circle",
layer: "example", layer: "example",
@@ -256,10 +254,10 @@ describe("layer editor", () => {
}); });
test("expand/collapse"); it("expand/collapse");
test("modify"); it("modify");
test("parse error", () => { it("parse error", () => {
const bgId = createBackground(); const bgId = createBackground();
when.click("layer-list-item:background:" + bgId); when.click("layer-list-item:background:" + bgId);
@@ -275,7 +273,7 @@ describe("layer editor", () => {
}); });
describe("sticky header", () => { describe("sticky header", () => {
test("should keep layer header visible when scrolling properties", () => { it("should keep layer header visible when scrolling properties", () => {
// Setup: Create a layer with many properties (e.g., symbol layer) // Setup: Create a layer with many properties (e.g., symbol layer)
when.modal.fillLayers({ when.modal.fillLayers({
type: "symbol", type: "symbol",
@@ -1,5 +1,4 @@
import { MaputnikDriver } from "./maputnik-driver"; import { MaputnikDriver } from "./maputnik-driver";
const test = it;
describe("layers list", () => { describe("layers list", () => {
const { beforeAndAfter, get, when, then } = new MaputnikDriver(); const { beforeAndAfter, get, when, then } = new MaputnikDriver();
@@ -17,7 +16,7 @@ describe("layers list", () => {
}); });
}); });
test("should update layers in local storage", () => { it("should update layers in local storage", () => {
then(get.styleFromLocalStorage()).shouldDeepNestedInclude({ then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
layers: [ layers: [
{ {
@@ -32,7 +31,7 @@ describe("layers list", () => {
beforeEach(() => { beforeEach(() => {
when.click("layer-list-item:" + id + ":delete"); when.click("layer-list-item:" + id + ":delete");
}); });
test("should empty layers in local storage", () => { it("should empty layers in local storage", () => {
then(get.styleFromLocalStorage()).shouldDeepNestedInclude({ then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
layers: [], layers: [],
}); });
@@ -43,7 +42,7 @@ describe("layers list", () => {
beforeEach(() => { beforeEach(() => {
when.click("layer-list-item:" + id + ":copy"); when.click("layer-list-item:" + id + ":copy");
}); });
test("should add copy layer in local storage", () => { it("should add copy layer in local storage", () => {
then(get.styleFromLocalStorage()).shouldDeepNestedInclude({ then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
layers: [ layers: [
{ {
@@ -64,7 +63,7 @@ describe("layers list", () => {
when.click("layer-list-item:" + id + ":toggle-visibility"); when.click("layer-list-item:" + id + ":toggle-visibility");
}); });
test("should update visibility to none in local storage", () => { it("should update visibility to none in local storage", () => {
then(get.styleFromLocalStorage()).shouldDeepNestedInclude({ then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
layers: [ layers: [
{ {
@@ -83,7 +82,7 @@ describe("layers list", () => {
when.click("layer-list-item:" + id + ":toggle-visibility"); when.click("layer-list-item:" + id + ":toggle-visibility");
}); });
test("should update visibility to visible in local storage", () => { it("should update visibility to visible in local storage", () => {
then(get.styleFromLocalStorage()).shouldDeepNestedInclude({ then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
layers: [ layers: [
{ {
@@ -107,7 +106,7 @@ describe("layers list", () => {
type: "background", type: "background",
}); });
}); });
test("should show the selected layer in the editor", () => { it("should show the selected layer in the editor", () => {
when.realClick("layer-list-item:" + secondId); when.realClick("layer-list-item:" + secondId);
then(get.elementByTestId("layer-editor.layer-id.input")).shouldHaveValue(secondId); then(get.elementByTestId("layer-editor.layer-id.input")).shouldHaveValue(secondId);
when.realClick("layer-list-item:" + id); when.realClick("layer-list-item:" + id);
@@ -118,7 +117,7 @@ describe("layers list", () => {
}); });
describe("background", () => { describe("background", () => {
test("add", () => { it("add", () => {
const id = when.modal.fillLayers({ const id = when.modal.fillLayers({
type: "background", type: "background",
}); });
@@ -136,7 +135,7 @@ describe("layers list", () => {
}); });
describe("fill", () => { describe("fill", () => {
test("add", () => { it("add", () => {
const id = when.modal.fillLayers({ const id = when.modal.fillLayers({
type: "fill", type: "fill",
layer: "example", layer: "example",
@@ -154,11 +153,11 @@ describe("layers list", () => {
}); });
// TODO: Change source // TODO: Change source
test("change source"); it("change source");
}); });
describe("line", () => { describe("line", () => {
test("add", () => { it("add", () => {
const id = when.modal.fillLayers({ const id = when.modal.fillLayers({
type: "line", type: "line",
layer: "example", layer: "example",
@@ -175,7 +174,7 @@ describe("layers list", () => {
}); });
}); });
test("groups", () => { it("groups", () => {
when.modal.open(); when.modal.open();
const id1 = when.modal.fillLayers({ const id1 = when.modal.fillLayers({
id: "aa", id: "aa",
@@ -231,7 +230,7 @@ describe("layers list", () => {
}); });
describe("symbol", () => { describe("symbol", () => {
test("add", () => { it("add", () => {
const id = when.modal.fillLayers({ const id = when.modal.fillLayers({
type: "symbol", type: "symbol",
layer: "example", layer: "example",
@@ -248,7 +247,7 @@ describe("layers list", () => {
}); });
}); });
test("should show spec info when hovering and clicking single line property", () => { it("should show spec info when hovering and clicking single line property", () => {
when.modal.fillLayers({ when.modal.fillLayers({
type: "symbol", type: "symbol",
layer: "example", layer: "example",
@@ -260,7 +259,7 @@ describe("layers list", () => {
then(get.elementByTestId("spec-field-doc")).shouldContainText("Rotates the "); then(get.elementByTestId("spec-field-doc")).shouldContainText("Rotates the ");
}); });
test("should show spec info when hovering and clicking multi line property", () => { it("should show spec info when hovering and clicking multi line property", () => {
when.modal.fillLayers({ when.modal.fillLayers({
type: "symbol", type: "symbol",
layer: "example", layer: "example",
@@ -272,7 +271,7 @@ describe("layers list", () => {
then(get.elementByTestId("spec-field-doc")).shouldContainText("Offset distance"); then(get.elementByTestId("spec-field-doc")).shouldContainText("Offset distance");
}); });
test("should hide spec info when clicking a second time", () => { it("should hide spec info when clicking a second time", () => {
when.modal.fillLayers({ when.modal.fillLayers({
type: "symbol", type: "symbol",
layer: "example", layer: "example",
@@ -288,7 +287,7 @@ describe("layers list", () => {
}); });
describe("raster", () => { describe("raster", () => {
test("add", () => { it("add", () => {
const id = when.modal.fillLayers({ const id = when.modal.fillLayers({
type: "raster", type: "raster",
layer: "raster", layer: "raster",
@@ -307,7 +306,7 @@ describe("layers list", () => {
}); });
describe("circle", () => { describe("circle", () => {
test("add", () => { it("add", () => {
const id = when.modal.fillLayers({ const id = when.modal.fillLayers({
type: "circle", type: "circle",
layer: "example", layer: "example",
@@ -326,7 +325,7 @@ describe("layers list", () => {
}); });
describe("fill extrusion", () => { describe("fill extrusion", () => {
test("add", () => { it("add", () => {
const id = when.modal.fillLayers({ const id = when.modal.fillLayers({
type: "fill-extrusion", type: "fill-extrusion",
layer: "example", layer: "example",
@@ -345,7 +344,7 @@ describe("layers list", () => {
}); });
describe("hillshade", () => { describe("hillshade", () => {
test("add", () => { it("add", () => {
const id = when.modal.fillLayers({ const id = when.modal.fillLayers({
type: "hillshade", type: "hillshade",
layer: "example", layer: "example",
@@ -362,7 +361,7 @@ describe("layers list", () => {
}); });
}); });
test("set hillshade illumination direction array", () => { it("set hillshade illumination direction array", () => {
const id = when.modal.fillLayers({ const id = when.modal.fillLayers({
type: "hillshade", type: "hillshade",
layer: "example", layer: "example",
@@ -388,7 +387,7 @@ describe("layers list", () => {
}); });
}); });
test("set hillshade highlight color array", () => { it("set hillshade highlight color array", () => {
const id = when.modal.fillLayers({ const id = when.modal.fillLayers({
type: "hillshade", type: "hillshade",
layer: "example", layer: "example",
@@ -414,7 +413,7 @@ describe("layers list", () => {
}); });
describe("color-relief", () => { describe("color-relief", () => {
test("add", () => { it("add", () => {
const id = when.modal.fillLayers({ const id = when.modal.fillLayers({
type: "color-relief", type: "color-relief",
layer: "example", layer: "example",
@@ -431,7 +430,7 @@ describe("layers list", () => {
}); });
}); });
test("adds elevation expression when clicking the elevation button", () => { it("adds elevation expression when clicking the elevation button", () => {
when.modal.fillLayers({ when.modal.fillLayers({
type: "color-relief", type: "color-relief",
layer: "example", layer: "example",
@@ -443,7 +442,7 @@ describe("layers list", () => {
}); });
describe("groups", () => { describe("groups", () => {
test("simple", () => { it("simple", () => {
when.setStyle("geojson"); when.setStyle("geojson");
when.modal.open(); when.modal.open();
@@ -479,7 +478,7 @@ describe("layers list", () => {
}); });
describe("drag and drop", () => { describe("drag and drop", () => {
test("move layer should update local storage", () => { it("move layer should update local storage", () => {
when.modal.open(); when.modal.open();
const firstId = when.modal.fillLayers({ const firstId = when.modal.fillLayers({
id: "a", id: "a",
@@ -518,7 +517,7 @@ describe("layers list", () => {
}); });
describe("sticky header", () => { describe("sticky header", () => {
test("should keep header visible when scrolling layer list", () => { it("should keep header visible when scrolling layer list", () => {
// Setup: Create multiple layers to enable scrolling // Setup: Create multiple layers to enable scrolling
for (let i = 0; i < 20; i++) { for (let i = 0; i < 20; i++) {
when.modal.open(); when.modal.open();
+6 -8
View File
@@ -1,12 +1,10 @@
import { MaputnikDriver } from "./maputnik-driver"; import { MaputnikDriver } from "./maputnik-driver";
const test = it;
describe("map", () => { describe("map", () => {
const { beforeAndAfter, get, when, then } = new MaputnikDriver(); const { beforeAndAfter, get, when, then } = new MaputnikDriver();
beforeAndAfter(); beforeAndAfter();
describe("zoom level", () => { describe("zoom level", () => {
test("via url", () => { it("via url", () => {
const zoomLevel = 12.37; const zoomLevel = 12.37;
when.setStyle("geojson", zoomLevel); when.setStyle("geojson", zoomLevel);
then(get.elementByTestId("maplibre:ctrl-zoom")).shouldBeVisible(); then(get.elementByTestId("maplibre:ctrl-zoom")).shouldBeVisible();
@@ -15,7 +13,7 @@ describe("map", () => {
); );
}); });
test("via map controls", () => { it("via map controls", () => {
const zoomLevel = 12.37; const zoomLevel = 12.37;
when.setStyle("geojson", zoomLevel); when.setStyle("geojson", zoomLevel);
then(get.elementByTestId("maplibre:ctrl-zoom")).shouldBeVisible(); then(get.elementByTestId("maplibre:ctrl-zoom")).shouldBeVisible();
@@ -25,7 +23,7 @@ describe("map", () => {
); );
}); });
test("via style file definition", () => { it("via style file definition", () => {
when.setStyle("zoom_7_center_0_51"); when.setStyle("zoom_7_center_0_51");
then(get.elementByTestId("maplibre:ctrl-zoom")).shouldBeVisible(); then(get.elementByTestId("maplibre:ctrl-zoom")).shouldBeVisible();
then(get.elementByTestId("maplibre:ctrl-zoom")).shouldContainText( then(get.elementByTestId("maplibre:ctrl-zoom")).shouldContainText(
@@ -42,7 +40,7 @@ describe("map", () => {
}); });
describe("search", () => { describe("search", () => {
test("should exist", () => { it("should exist", () => {
then(get.searchControl()).shouldBeVisible(); then(get.searchControl()).shouldBeVisible();
}); });
}); });
@@ -52,12 +50,12 @@ describe("map", () => {
when.setStyle("rectangles"); when.setStyle("rectangles");
then(get.locationHash().should("exist")); then(get.locationHash().should("exist"));
}); });
test("should open on feature click", () => { it("should open on feature click", () => {
when.clickCenter("maplibre:map"); when.clickCenter("maplibre:map");
then(get.elementByTestId("feature-layer-popup")).shouldBeVisible(); then(get.elementByTestId("feature-layer-popup")).shouldBeVisible();
}); });
test("should open a second feature after closing popup", () => { it("should open a second feature after closing popup", () => {
when.clickCenter("maplibre:map"); when.clickCenter("maplibre:map");
then(get.elementByTestId("feature-layer-popup")).shouldBeVisible(); then(get.elementByTestId("feature-layer-popup")).shouldBeVisible();
when.closePopup(); when.closePopup();
+39 -40
View File
@@ -1,6 +1,5 @@
import { MaputnikDriver } from "./maputnik-driver"; import { MaputnikDriver } from "./maputnik-driver";
import tokens from "../src/config/tokens.json" with {type: "json"}; import tokens from "../../src/config/tokens.json" with {type: "json"};
const test = it;
describe("modals", () => { describe("modals", () => {
const { beforeAndAfter, when, get, given, then } = new MaputnikDriver(); const { beforeAndAfter, when, get, given, then } = new MaputnikDriver();
@@ -14,17 +13,17 @@ describe("modals", () => {
when.click("nav:open"); when.click("nav:open");
}); });
test("close", () => { it("close", () => {
when.modal.close("modal:open"); when.modal.close("modal:open");
then(get.elementByTestId("modal:open")).shouldNotExist(); then(get.elementByTestId("modal:open")).shouldNotExist();
}); });
test("upload", () => { it("upload", () => {
when.chooseExampleFile(); when.chooseExampleFile();
then(get.fixture("example-style.json")).shouldEqualToStoredStyle(); then(get.fixture("example-style.json")).shouldEqualToStoredStyle();
}); });
test("upload via drag and drop", () => { it("upload via drag and drop", () => {
when.dropExampleFile(); when.dropExampleFile();
then(get.fixture("example-style.json")).shouldEqualToStoredStyle(); then(get.fixture("example-style.json")).shouldEqualToStoredStyle();
}); });
@@ -37,14 +36,14 @@ describe("modals", () => {
when.click("modal:open.url.button"); when.click("modal:open.url.button");
when.wait(200); when.wait(200);
}); });
test("load from url", () => { it("load from url", () => {
then(get.responseBody("example-style.json")).shouldEqualToStoredStyle(); then(get.responseBody("example-style.json")).shouldEqualToStoredStyle();
}); });
}); });
}); });
describe("shortcuts", () => { describe("shortcuts", () => {
test("open/close", () => { it("open/close", () => {
when.setStyle(""); when.setStyle("");
when.typeKeys("?"); when.typeKeys("?");
when.modal.close("modal:shortcuts"); when.modal.close("modal:shortcuts");
@@ -57,13 +56,13 @@ describe("modals", () => {
when.click("nav:export"); when.click("nav:export");
}); });
test("close", () => { it("close", () => {
when.modal.close("modal:export"); when.modal.close("modal:export");
then(get.elementByTestId("modal:export")).shouldNotExist(); then(get.elementByTestId("modal:export")).shouldNotExist();
}); });
// TODO: Work out how to download a file and check the contents // TODO: Work out how to download a file and check the contents
test("download"); it("download");
}); });
describe("sources", () => { describe("sources", () => {
@@ -72,10 +71,10 @@ describe("modals", () => {
when.click("nav:sources"); when.click("nav:sources");
}); });
test("active sources"); it("active sources");
test("public source"); it("public source");
test("add new source", () => { it("add new source", () => {
const sourceId = "n1z2v3r"; const sourceId = "n1z2v3r";
when.setValue("modal:sources.add.source_id", sourceId); when.setValue("modal:sources.add.source_id", sourceId);
when.select("modal:sources.add.source_type", "tile_vector"); when.select("modal:sources.add.source_type", "tile_vector");
@@ -89,7 +88,7 @@ describe("modals", () => {
}); });
}); });
test("add new pmtiles source", () => { it("add new pmtiles source", () => {
const sourceId = "pmtilestest"; const sourceId = "pmtilestest";
when.setValue("modal:sources.add.source_id", sourceId); when.setValue("modal:sources.add.source_id", sourceId);
when.select("modal:sources.add.source_type", "pmtiles_vector"); when.select("modal:sources.add.source_type", "pmtiles_vector");
@@ -107,7 +106,7 @@ describe("modals", () => {
}); });
}); });
test("add new raster source", () => { it("add new raster source", () => {
const sourceId = "rastertest"; const sourceId = "rastertest";
when.setValue("modal:sources.add.source_id", sourceId); when.setValue("modal:sources.add.source_id", sourceId);
when.select("modal:sources.add.source_type", "tile_raster"); when.select("modal:sources.add.source_type", "tile_raster");
@@ -124,7 +123,7 @@ describe("modals", () => {
}); });
describe("inspect", () => { describe("inspect", () => {
test("toggle", () => { it("toggle", () => {
// There is no assertion in this test // There is no assertion in this test
when.setStyle("geojson"); when.setStyle("geojson");
when.select("maputnik-select", "inspect"); when.select("maputnik-select", "inspect");
@@ -141,7 +140,7 @@ describe("modals", () => {
when.click("field-doc-button-Name"); when.click("field-doc-button-Name");
}); });
test("should show the spec information", () => { it("should show the spec information", () => {
then(get.elementsText("spec-field-doc")).shouldInclude( then(get.elementsText("spec-field-doc")).shouldInclude(
"name for the style" "name for the style"
); );
@@ -155,7 +154,7 @@ describe("modals", () => {
when.wait(200); when.wait(200);
}); });
test("show name specifications", () => { it("show name specifications", () => {
then(get.styleFromLocalStorage()).shouldDeepNestedInclude({ then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
name: "foobar", name: "foobar",
}); });
@@ -168,14 +167,14 @@ describe("modals", () => {
when.click("modal:settings.name"); when.click("modal:settings.name");
when.wait(200); when.wait(200);
}); });
test("should update owner in local storage", () => { it("should update owner in local storage", () => {
then(get.styleFromLocalStorage()).shouldDeepNestedInclude({ then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
owner: "foobar", owner: "foobar",
}); });
}); });
}); });
test("sprite url", () => { it("sprite url", () => {
when.setTextInJsonEditor("\"http://example.com\""); when.setTextInJsonEditor("\"http://example.com\"");
when.click("modal:settings.name"); when.click("modal:settings.name");
then(get.styleFromLocalStorage()).shouldDeepNestedInclude({ then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
@@ -183,7 +182,7 @@ describe("modals", () => {
}); });
}); });
test("sprite object", () => { it("sprite object", () => {
when.setTextInJsonEditor(JSON.stringify([{ id: "1", url: "2" }])); when.setTextInJsonEditor(JSON.stringify([{ id: "1", url: "2" }]));
when.click("modal:settings.name"); when.click("modal:settings.name");
@@ -192,7 +191,7 @@ describe("modals", () => {
}); });
}); });
test("glyphs url", () => { it("glyphs url", () => {
const glyphsUrl = "http://example.com/{fontstack}/{range}.pbf"; const glyphsUrl = "http://example.com/{fontstack}/{range}.pbf";
when.setValue("modal:settings.glyphs", glyphsUrl); when.setValue("modal:settings.glyphs", glyphsUrl);
when.click("modal:settings.name"); when.click("modal:settings.name");
@@ -201,7 +200,7 @@ describe("modals", () => {
}); });
}); });
test("maptiler access token", () => { it("maptiler access token", () => {
const apiKey = "testing123"; const apiKey = "testing123";
when.setValue( when.setValue(
"modal:settings.maputnik:openmaptiles_access_token", "modal:settings.maputnik:openmaptiles_access_token",
@@ -215,7 +214,7 @@ describe("modals", () => {
}); });
}); });
test("thunderforest access token", () => { it("thunderforest access token", () => {
const apiKey = "testing123"; const apiKey = "testing123";
when.setValue( when.setValue(
"modal:settings.maputnik:thunderforest_access_token", "modal:settings.maputnik:thunderforest_access_token",
@@ -227,7 +226,7 @@ describe("modals", () => {
).shouldInclude({ "maputnik:thunderforest_access_token": apiKey }); ).shouldInclude({ "maputnik:thunderforest_access_token": apiKey });
}); });
test("stadia access token", () => { it("stadia access token", () => {
const apiKey = "testing123"; const apiKey = "testing123";
when.setValue( when.setValue(
"modal:settings.maputnik:stadia_access_token", "modal:settings.maputnik:stadia_access_token",
@@ -239,7 +238,7 @@ describe("modals", () => {
).shouldInclude({ "maputnik:stadia_access_token": apiKey }); ).shouldInclude({ "maputnik:stadia_access_token": apiKey });
}); });
test("locationiq access token", () => { it("locationiq access token", () => {
const apiKey = "testing123"; const apiKey = "testing123";
when.setValue( when.setValue(
"modal:settings.maputnik:locationiq_access_token", "modal:settings.maputnik:locationiq_access_token",
@@ -251,14 +250,14 @@ describe("modals", () => {
).shouldInclude({ "maputnik:locationiq_access_token": apiKey }); ).shouldInclude({ "maputnik:locationiq_access_token": apiKey });
}); });
test("style projection mercator", () => { it("style projection mercator", () => {
when.select("modal:settings.projection", "mercator"); when.select("modal:settings.projection", "mercator");
then( then(
get.styleFromLocalStorage().then((style) => style.projection) get.styleFromLocalStorage().then((style) => style.projection)
).shouldInclude({ type: "mercator" }); ).shouldInclude({ type: "mercator" });
}); });
test("style projection globe", () => { it("style projection globe", () => {
when.select("modal:settings.projection", "globe"); when.select("modal:settings.projection", "globe");
then( then(
get.styleFromLocalStorage().then((style) => style.projection) get.styleFromLocalStorage().then((style) => style.projection)
@@ -266,7 +265,7 @@ describe("modals", () => {
}); });
test("style projection vertical-perspective", () => { it("style projection vertical-perspective", () => {
when.select("modal:settings.projection", "vertical-perspective"); when.select("modal:settings.projection", "vertical-perspective");
then( then(
get.styleFromLocalStorage().then((style) => style.projection) get.styleFromLocalStorage().then((style) => style.projection)
@@ -274,7 +273,7 @@ describe("modals", () => {
}); });
test("style renderer", () => { it("style renderer", () => {
cy.on("uncaught:exception", () => false); // this is due to the fact that this is an invalid style for openlayers cy.on("uncaught:exception", () => false); // this is due to the fact that this is an invalid style for openlayers
when.select("modal:settings.maputnik:renderer", "ol"); when.select("modal:settings.maputnik:renderer", "ol");
then(get.inputValue("modal:settings.maputnik:renderer")).shouldEqual( then(get.inputValue("modal:settings.maputnik:renderer")).shouldEqual(
@@ -289,7 +288,7 @@ describe("modals", () => {
test("include API key when change renderer", () => { it("include API key when change renderer", () => {
when.click("modal:settings.close-modal"); when.click("modal:settings.close-modal");
when.click("nav:open"); when.click("nav:open");
@@ -328,7 +327,7 @@ describe("modals", () => {
when.modal.open(); when.modal.open();
}); });
test("shows duplicate id error", () => { it("shows duplicate id error", () => {
when.setValue("add-layer.layer-id.input", "background"); when.setValue("add-layer.layer-id.input", "background");
when.click("add-layer"); when.click("add-layer");
then(get.elementByTestId("modal:add-layer")).shouldExist(); then(get.elementByTestId("modal:add-layer")).shouldExist();
@@ -339,7 +338,7 @@ describe("modals", () => {
}); });
describe("sources", () => { describe("sources", () => {
test("toggle"); it("toggle");
}); });
describe("global state", () => { describe("global state", () => {
@@ -347,7 +346,7 @@ describe("modals", () => {
when.click("nav:global-state"); when.click("nav:global-state");
}); });
test("add variable", () => { it("add variable", () => {
when.wait(100); when.wait(100);
when.click("global-state-add-variable"); when.click("global-state-add-variable");
then(get.styleFromLocalStorage()).shouldDeepNestedInclude({ then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
@@ -356,7 +355,7 @@ describe("modals", () => {
}); });
test("add multiple variables", () => { it("add multiple variables", () => {
when.click("global-state-add-variable"); when.click("global-state-add-variable");
when.click("global-state-add-variable"); when.click("global-state-add-variable");
when.click("global-state-add-variable"); when.click("global-state-add-variable");
@@ -366,7 +365,7 @@ describe("modals", () => {
}); });
}); });
test("remove variable", () => { it("remove variable", () => {
when.click("global-state-add-variable"); when.click("global-state-add-variable");
when.click("global-state-add-variable"); when.click("global-state-add-variable");
when.click("global-state-add-variable"); when.click("global-state-add-variable");
@@ -377,7 +376,7 @@ describe("modals", () => {
}); });
}); });
test("edit variable key", () => { it("edit variable key", () => {
when.click("global-state-add-variable"); when.click("global-state-add-variable");
when.wait(100); when.wait(100);
when.setValue("global-state-variable-key:0", "mykey"); when.setValue("global-state-variable-key:0", "mykey");
@@ -388,7 +387,7 @@ describe("modals", () => {
}); });
}); });
test("edit variable value", () => { it("edit variable value", () => {
when.click("global-state-add-variable"); when.click("global-state-add-variable");
when.wait(100); when.wait(100);
when.setValue("global-state-variable-value:0", "myvalue"); when.setValue("global-state-variable-value:0", "myvalue");
@@ -401,11 +400,11 @@ describe("modals", () => {
}); });
describe("error panel", () => { describe("error panel", () => {
test("not visible when no errors", () => { it("not visible when no errors", () => {
then(get.element("maputnik-message-panel-error")).shouldNotExist(); then(get.element("maputnik-message-panel-error")).shouldNotExist();
}); });
test("visible on style error", () => { it("visible on style error", () => {
when.modal.open(); when.modal.open();
when.modal.fillLayers({ when.modal.fillLayers({
type: "circle", type: "circle",
@@ -416,7 +415,7 @@ describe("modals", () => {
}); });
describe("Handle localStorage QuotaExceededError", () => { describe("Handle localStorage QuotaExceededError", () => {
test("handles quota exceeded error when opening style from URL", () => { it("handles quota exceeded error when opening style from URL", () => {
// Clear localStorage to start fresh // Clear localStorage to start fresh
cy.clearLocalStorage(); cy.clearLocalStorage();
+80 -70
View File
@@ -11,9 +11,9 @@
"dependencies": { "dependencies": {
"@codemirror/lang-json": "^6.0.2", "@codemirror/lang-json": "^6.0.2",
"@codemirror/lint": "^6.9.7", "@codemirror/lint": "^6.9.7",
"@codemirror/state": "^6.7.1", "@codemirror/state": "^6.7.0",
"@codemirror/theme-one-dark": "^6.1.3", "@codemirror/theme-one-dark": "^6.1.3",
"@codemirror/view": "^6.43.6", "@codemirror/view": "^6.43.5",
"@dnd-kit/core": "^6.3.1", "@dnd-kit/core": "^6.3.1",
"@dnd-kit/sortable": "^10.0.0", "@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2", "@dnd-kit/utilities": "^3.2.2",
@@ -91,7 +91,7 @@
"@types/string-hash": "^1.1.3", "@types/string-hash": "^1.1.3",
"@types/wicg-file-system-access": "^2023.10.7", "@types/wicg-file-system-access": "^2023.10.7",
"@vitejs/plugin-react": "6.0", "@vitejs/plugin-react": "6.0",
"@vitest/coverage-v8": "^4.1.10", "@vitest/coverage-v8": "^4.1.9",
"cors": "^2.8.6", "cors": "^2.8.6",
"cypress": "^15.18.0", "cypress": "^15.18.0",
"cypress-plugin-tab": "^2.0.0", "cypress-plugin-tab": "^2.0.0",
@@ -113,7 +113,7 @@
"uuid": "^14.0.1", "uuid": "^14.0.1",
"vite": "^7.3.2", "vite": "^7.3.2",
"vite-plugin-istanbul": "^9.0.1", "vite-plugin-istanbul": "^9.0.1",
"vitest": "^4.1.10" "vitest": "^4.1.9"
} }
}, },
"node_modules/@angular/common": { "node_modules/@angular/common": {
@@ -566,9 +566,9 @@
} }
}, },
"node_modules/@codemirror/state": { "node_modules/@codemirror/state": {
"version": "6.7.1", "version": "6.7.0",
"resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.7.1.tgz", "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.7.0.tgz",
"integrity": "sha512-9QzNDgE4EYDnAHfrTlR2lwiPciiOymLtwKK+8yHQzCc7GXhAP9xdEbEJFy2IWB1j9UGUl9BsgMmTo/ImA02T7A==", "integrity": "sha512-Zbl9NyscLMZkfXPQnNAIIAFftidrA1UbcJEIMp24C0Bukc2I5T8wJS0wsXYsnDOqCFJUeJ1BITGNs5CqPDSmSg==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@marijn/find-cluster-break": "^1.0.0" "@marijn/find-cluster-break": "^1.0.0"
@@ -587,9 +587,9 @@
} }
}, },
"node_modules/@codemirror/view": { "node_modules/@codemirror/view": {
"version": "6.43.6", "version": "6.43.5",
"resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.43.6.tgz", "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.43.5.tgz",
"integrity": "sha512-EVunGSYN1wz1p75WY1s3Xg7t3i8Yol0kGZGizNdX9BUFgMFILYVe8/u6EVpo7Ff5PwbZuILb4QAq7IZoKzIEQA==", "integrity": "sha512-7uT/vUgH6dfXWn3WqOe23KneILMvGy5wQjNMEcRXLKzziJ9NOktpW6tGoyQpwVkBgE5Gj6hKkCcsddbnkaWrOQ==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@codemirror/state": "^6.7.0", "@codemirror/state": "^6.7.0",
@@ -3950,14 +3950,14 @@
} }
}, },
"node_modules/@vitest/coverage-v8": { "node_modules/@vitest/coverage-v8": {
"version": "4.1.10", "version": "4.1.9",
"resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-4.1.10.tgz", "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-4.1.9.tgz",
"integrity": "sha512-IM49HmthevbgAO4anp1hwtoT9wYe59w0LR00gr+eagHE+ZJ5lK4sLPeO0ubgoJcwLk6dehU3R24N+FbEEKDc8g==", "integrity": "sha512-G9/lgqibheLVBDRuya45EbsEXTYcWoSG+TLg7i2axuzx0Eq62eXn+aWXyaVdV5vKvFSWd6ywcX8hA7la9Pvu8g==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@bcoe/v8-coverage": "^1.0.2", "@bcoe/v8-coverage": "^1.0.2",
"@vitest/utils": "4.1.10", "@vitest/utils": "4.1.9",
"ast-v8-to-istanbul": "^1.0.0", "ast-v8-to-istanbul": "^1.0.0",
"istanbul-lib-coverage": "^3.2.2", "istanbul-lib-coverage": "^3.2.2",
"istanbul-lib-report": "^3.0.1", "istanbul-lib-report": "^3.0.1",
@@ -3971,8 +3971,8 @@
"url": "https://opencollective.com/vitest" "url": "https://opencollective.com/vitest"
}, },
"peerDependencies": { "peerDependencies": {
"@vitest/browser": "4.1.10", "@vitest/browser": "4.1.9",
"vitest": "4.1.10" "vitest": "4.1.9"
}, },
"peerDependenciesMeta": { "peerDependenciesMeta": {
"@vitest/browser": { "@vitest/browser": {
@@ -3981,16 +3981,16 @@
} }
}, },
"node_modules/@vitest/expect": { "node_modules/@vitest/expect": {
"version": "4.1.10", "version": "4.1.9",
"resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.10.tgz", "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.9.tgz",
"integrity": "sha512-YsCn+qAk1GWjQOWFEsEcL2gNQ0zmVmQu3T03qP6UyjhtmdtwtbuI+DASn/7iQB3HGTXkdBwGddzxPlmiql5vlA==", "integrity": "sha512-vl/rYsUKcBr3SnQn166+XR5ZQcgMx3DQhFWdfli/cWpLnLUmbxZvyrJZotLFUryib+LtArYMSTJ5RbQ57ZqrlA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@standard-schema/spec": "^1.1.0", "@standard-schema/spec": "^1.1.0",
"@types/chai": "^5.2.2", "@types/chai": "^5.2.2",
"@vitest/spy": "4.1.10", "@vitest/spy": "4.1.9",
"@vitest/utils": "4.1.10", "@vitest/utils": "4.1.9",
"chai": "^6.2.2", "chai": "^6.2.2",
"tinyrainbow": "^3.1.0" "tinyrainbow": "^3.1.0"
}, },
@@ -3999,13 +3999,13 @@
} }
}, },
"node_modules/@vitest/mocker": { "node_modules/@vitest/mocker": {
"version": "4.1.10", "version": "4.1.9",
"resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.10.tgz", "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.9.tgz",
"integrity": "sha512-v0xaezt+DKEmKfaxg133ldzADrwLGd7Ze1MfQQTYfvs8OqZIwbxyxaYURivwV7sWy5fqn3rH5uOrSp07bp44Ow==", "integrity": "sha512-EVkXzBjrPGM+cK8/ANWgBrkUCfJfb38/EfTSO8h7pWvKkyPkpWxvR7BkD2MyItMF62C97zAEoqdpUixwR/e+Rw==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@vitest/spy": "4.1.10", "@vitest/spy": "4.1.9",
"estree-walker": "^3.0.3", "estree-walker": "^3.0.3",
"magic-string": "^0.30.21" "magic-string": "^0.30.21"
}, },
@@ -4025,10 +4025,20 @@
} }
} }
}, },
"node_modules/@vitest/mocker/node_modules/estree-walker": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz",
"integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/estree": "^1.0.0"
}
},
"node_modules/@vitest/pretty-format": { "node_modules/@vitest/pretty-format": {
"version": "4.1.10", "version": "4.1.9",
"resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.10.tgz", "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.9.tgz",
"integrity": "sha512-W1HsjSH4MXQ9YfmmhLAoIYf1HRfekQCGngeIgcei6MP5QQGWUe0gkopdZQaVCFO+JDJMrAJGwa5pRpNpvy4P8Q==", "integrity": "sha512-s0iufns3iIFitdgm+YR7g1whCAaGtXz459VS9/PqyKDEEFgYIhsHOQmXgIgDuYCt7DeQmiZT0Qe2OA2p4ZPu5A==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@@ -4039,13 +4049,13 @@
} }
}, },
"node_modules/@vitest/runner": { "node_modules/@vitest/runner": {
"version": "4.1.10", "version": "4.1.9",
"resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.10.tgz", "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.9.tgz",
"integrity": "sha512-IKI6kpIH+LmpROplyLwBBaCfMgOZOMsygVa6BARD6ahA04VRuJSa6OaVG7kRvSEMD870Vd91rSSw0eegtWyLGg==", "integrity": "sha512-KXLMDtc7oe70+3mJfGrPUWPesswH+3sTxAMAMl8DG7I8IUQT4XW718dY5ID3vPUcmlu27CcKfY4P3h3I29SLJg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@vitest/utils": "4.1.10", "@vitest/utils": "4.1.9",
"pathe": "^2.0.3" "pathe": "^2.0.3"
}, },
"funding": { "funding": {
@@ -4053,14 +4063,14 @@
} }
}, },
"node_modules/@vitest/snapshot": { "node_modules/@vitest/snapshot": {
"version": "4.1.10", "version": "4.1.9",
"resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.10.tgz", "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.9.tgz",
"integrity": "sha512-xRkfOT1qpTAi/Ti4Y1LtfRc3kEuqxGw59eN2jN9pRWMtS/XDevekhcFSqvQqjUNGksfjMJu3Y+oJ+4Ypn2OaJw==", "integrity": "sha512-Jc7RKGNBo8Z28WYIm0Niej4xdSPByRf6mU58VpHQkd6Zh05rlnA+twjbK5HyeIGHxrzsc3mJgS43uM0CZKzaIA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@vitest/pretty-format": "4.1.10", "@vitest/pretty-format": "4.1.9",
"@vitest/utils": "4.1.10", "@vitest/utils": "4.1.9",
"magic-string": "^0.30.21", "magic-string": "^0.30.21",
"pathe": "^2.0.3" "pathe": "^2.0.3"
}, },
@@ -4069,9 +4079,9 @@
} }
}, },
"node_modules/@vitest/spy": { "node_modules/@vitest/spy": {
"version": "4.1.10", "version": "4.1.9",
"resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.10.tgz", "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.9.tgz",
"integrity": "sha512-PLf/Ugvoq5wO/b4rwYCR1h2PSIdXz7wnkQFMiUpLdtM7l6pqVFcQIBEHyT1+l+cj7mNwAfZHzqXqDyjvOuwbDw==", "integrity": "sha512-fHpsS6mIi+PiEW+vcRVOMkX1oSaPKne3VOclSFICPcGOmfKgXPU5iAah+wcNcj2xPrCCmfq99IDGf+EojhhvhA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"funding": { "funding": {
@@ -4079,13 +4089,13 @@
} }
}, },
"node_modules/@vitest/utils": { "node_modules/@vitest/utils": {
"version": "4.1.10", "version": "4.1.9",
"resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.10.tgz", "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.9.tgz",
"integrity": "sha512-fy9am/HWxbaGt/Sawrp90vt6Y6jQwf1RX77cz3uwoJwJVMli/e1IEwRPnMNJ7vKfPTwo0diXifkpPvwH9v7nGA==", "integrity": "sha512-A51o8ymO5PpqlWNnBP9ZHPXDIpuMtTLlGSjN7la4US+LJzoUMyhwjA5QXlm39JexgwHKW4Xjs8Z2d3dLCXOeuA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@vitest/pretty-format": "4.1.10", "@vitest/pretty-format": "4.1.9",
"convert-source-map": "^2.0.0", "convert-source-map": "^2.0.0",
"tinyrainbow": "^3.1.0" "tinyrainbow": "^3.1.0"
}, },
@@ -4457,6 +4467,16 @@
"js-tokens": "^10.0.0" "js-tokens": "^10.0.0"
} }
}, },
"node_modules/ast-v8-to-istanbul/node_modules/estree-walker": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz",
"integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/estree": "^1.0.0"
}
},
"node_modules/ast-v8-to-istanbul/node_modules/js-tokens": { "node_modules/ast-v8-to-istanbul/node_modules/js-tokens": {
"version": "10.0.0", "version": "10.0.0",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-10.0.0.tgz", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-10.0.0.tgz",
@@ -6620,16 +6640,6 @@
"url": "https://opencollective.com/unified" "url": "https://opencollective.com/unified"
} }
}, },
"node_modules/estree-walker": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz",
"integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/estree": "^1.0.0"
}
},
"node_modules/esutils": { "node_modules/esutils": {
"version": "2.0.3", "version": "2.0.3",
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
@@ -15472,19 +15482,19 @@
} }
}, },
"node_modules/vitest": { "node_modules/vitest": {
"version": "4.1.10", "version": "4.1.9",
"resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.10.tgz", "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.9.tgz",
"integrity": "sha512-R9jUTe5S4Qb0HCd4TNqpC7oGcrMssMRGXLW80ubjWsW9VH5GF8y1Y0SFLY9AbqSk6nt0PnOx4H4WNJYZ13GUPw==", "integrity": "sha512-nE3/LEyc0z87uHYLZebqCUOaJr2hdtuPp7BQ4BosVFnfltxgAvMG08NyrSGlPpOUWvR27c5flSmYFTNr78L9GQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@vitest/expect": "4.1.10", "@vitest/expect": "4.1.9",
"@vitest/mocker": "4.1.10", "@vitest/mocker": "4.1.9",
"@vitest/pretty-format": "4.1.10", "@vitest/pretty-format": "4.1.9",
"@vitest/runner": "4.1.10", "@vitest/runner": "4.1.9",
"@vitest/snapshot": "4.1.10", "@vitest/snapshot": "4.1.9",
"@vitest/spy": "4.1.10", "@vitest/spy": "4.1.9",
"@vitest/utils": "4.1.10", "@vitest/utils": "4.1.9",
"es-module-lexer": "^2.0.0", "es-module-lexer": "^2.0.0",
"expect-type": "^1.3.0", "expect-type": "^1.3.0",
"magic-string": "^0.30.21", "magic-string": "^0.30.21",
@@ -15512,12 +15522,12 @@
"@edge-runtime/vm": "*", "@edge-runtime/vm": "*",
"@opentelemetry/api": "^1.9.0", "@opentelemetry/api": "^1.9.0",
"@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0",
"@vitest/browser-playwright": "4.1.10", "@vitest/browser-playwright": "4.1.9",
"@vitest/browser-preview": "4.1.10", "@vitest/browser-preview": "4.1.9",
"@vitest/browser-webdriverio": "4.1.10", "@vitest/browser-webdriverio": "4.1.9",
"@vitest/coverage-istanbul": "4.1.10", "@vitest/coverage-istanbul": "4.1.9",
"@vitest/coverage-v8": "4.1.10", "@vitest/coverage-v8": "4.1.9",
"@vitest/ui": "4.1.10", "@vitest/ui": "4.1.9",
"happy-dom": "*", "happy-dom": "*",
"jsdom": "*", "jsdom": "*",
"vite": "^6.0.0 || ^7.0.0 || ^8.0.0" "vite": "^6.0.0 || ^7.0.0 || ^8.0.0"
+4 -4
View File
@@ -28,9 +28,9 @@
"dependencies": { "dependencies": {
"@codemirror/lang-json": "^6.0.2", "@codemirror/lang-json": "^6.0.2",
"@codemirror/lint": "^6.9.7", "@codemirror/lint": "^6.9.7",
"@codemirror/state": "^6.7.1", "@codemirror/state": "^6.7.0",
"@codemirror/theme-one-dark": "^6.1.3", "@codemirror/theme-one-dark": "^6.1.3",
"@codemirror/view": "^6.43.6", "@codemirror/view": "^6.43.5",
"@dnd-kit/core": "^6.3.1", "@dnd-kit/core": "^6.3.1",
"@dnd-kit/sortable": "^10.0.0", "@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2", "@dnd-kit/utilities": "^3.2.2",
@@ -125,7 +125,7 @@
"@types/string-hash": "^1.1.3", "@types/string-hash": "^1.1.3",
"@types/wicg-file-system-access": "^2023.10.7", "@types/wicg-file-system-access": "^2023.10.7",
"@vitejs/plugin-react": "6.0", "@vitejs/plugin-react": "6.0",
"@vitest/coverage-v8": "^4.1.10", "@vitest/coverage-v8": "^4.1.9",
"cors": "^2.8.6", "cors": "^2.8.6",
"cypress": "^15.18.0", "cypress": "^15.18.0",
"cypress-plugin-tab": "^2.0.0", "cypress-plugin-tab": "^2.0.0",
@@ -147,6 +147,6 @@
"uuid": "^14.0.1", "uuid": "^14.0.1",
"vite": "^7.3.2", "vite": "^7.3.2",
"vite-plugin-istanbul": "^9.0.1", "vite-plugin-istanbul": "^9.0.1",
"vitest": "^4.1.10" "vitest": "^4.1.9"
} }
} }
+1 -1
View File
@@ -21,7 +21,7 @@
"noUnusedParameters": true, "noUnusedParameters": true,
"noFallthroughCasesInSwitch": true "noFallthroughCasesInSwitch": true
}, },
"include": ["src", "cypress/e2e", "e2e/maputnik-cypress-helper.ts"], "include": ["src", "cypress/e2e"],
"exclude": ["dist"], "exclude": ["dist"],
"references": [{ "path": "./tsconfig.node.json" }], "references": [{ "path": "./tsconfig.node.json" }],
// TODO: Remove when issue is resolved https://github.com/cypress-io/cypress/issues/27448 // TODO: Remove when issue is resolved https://github.com/cypress-io/cypress/issues/27448
-11
View File
@@ -1,11 +0,0 @@
import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
// Only the unit tests that live next to the source are run by Vitest. The
// e2e specs (*.spec.ts) are run by their own runner, and the component
// browser test is run separately.
include: ["src/**/*.test.{ts,tsx}"],
exclude: ["**/node_modules/**", "e2e/**", "**/*.browser.test.tsx"],
},
});