mirror of
https://github.com/maputnik/editor.git
synced 2026-08-26 15:07:41 +00:00
Move things back to where this will still work.
This commit is contained in:
@@ -10,6 +10,7 @@ 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,10 +1,12 @@
|
|||||||
import { MaputnikDriver } from "./maputnik-driver";
|
import { MaputnikDriver } from "./maputnik-driver";
|
||||||
|
|
||||||
test.describe("accessibility", () => {
|
const test = it;
|
||||||
|
|
||||||
|
describe("accessibility", () => {
|
||||||
const { beforeAndAfter, get, when, then } = new MaputnikDriver();
|
const { beforeAndAfter, get, when, then } = new MaputnikDriver();
|
||||||
beforeAndAfter();
|
beforeAndAfter();
|
||||||
|
|
||||||
test.describe("skip links", () => {
|
describe("skip links", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
when.setStyle("layer");
|
when.setStyle("layer");
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import { MaputnikDriver } from "./maputnik-driver";
|
import { MaputnikDriver } from "./maputnik-driver";
|
||||||
|
|
||||||
test.describe("code editor", () => {
|
const test = it;
|
||||||
|
|
||||||
|
describe("code editor", () => {
|
||||||
const { beforeAndAfter, when, get, then } = new MaputnikDriver();
|
const { beforeAndAfter, when, get, then } = new MaputnikDriver();
|
||||||
beforeAndAfter();
|
beforeAndAfter();
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -1,6 +1,8 @@
|
|||||||
import { MaputnikDriver } from "./maputnik-driver";
|
import { MaputnikDriver } from "./maputnik-driver";
|
||||||
|
|
||||||
test.describe("history", () => {
|
const test = it;
|
||||||
|
|
||||||
|
describe("history", () => {
|
||||||
const { beforeAndAfter, when, get, then } = new MaputnikDriver();
|
const { beforeAndAfter, when, get, then } = new MaputnikDriver();
|
||||||
beforeAndAfter();
|
beforeAndAfter();
|
||||||
|
|
||||||
|
|||||||
+5
-3
@@ -1,10 +1,12 @@
|
|||||||
import { MaputnikDriver } from "./maputnik-driver";
|
import { MaputnikDriver } from "./maputnik-driver";
|
||||||
|
|
||||||
test.describe("i18n", () => {
|
const test = it;
|
||||||
|
|
||||||
|
describe("i18n", () => {
|
||||||
const { beforeAndAfter, get, when, then } = new MaputnikDriver();
|
const { beforeAndAfter, get, when, then } = new MaputnikDriver();
|
||||||
beforeAndAfter();
|
beforeAndAfter();
|
||||||
|
|
||||||
test.describe("language detector", () => {
|
describe("language detector", () => {
|
||||||
test("English", () => {
|
test("English", () => {
|
||||||
const url = "?lng=en";
|
const url = "?lng=en";
|
||||||
when.visit(url);
|
when.visit(url);
|
||||||
@@ -18,7 +20,7 @@ test.describe("i18n", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("language switcher", () => {
|
describe("language switcher", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
when.setStyle("layer");
|
when.setStyle("layer");
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
import { MaputnikDriver } from "./maputnik-driver";
|
import { MaputnikDriver } from "./maputnik-driver";
|
||||||
|
const test = it;
|
||||||
|
|
||||||
test.describe("keyboard", () => {
|
describe("keyboard", () => {
|
||||||
const { beforeAndAfter, given, when, get, then } = new MaputnikDriver();
|
const { beforeAndAfter, given, when, get, then } = new MaputnikDriver();
|
||||||
beforeAndAfter();
|
beforeAndAfter();
|
||||||
test.describe("shortcuts", () => {
|
describe("shortcuts", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
given.setupMockBackedResponses();
|
given.setupMockBackedResponses();
|
||||||
when.setStyle("");
|
when.setStyle("");
|
||||||
|
|||||||
+16
-14
@@ -1,7 +1,9 @@
|
|||||||
import { MaputnikDriver } from "./maputnik-driver";
|
import { MaputnikDriver } from "./maputnik-driver";
|
||||||
import { v1 as uuid } from "uuid";
|
import { v1 as uuid } from "uuid";
|
||||||
|
|
||||||
test.describe("layer editor", () => {
|
const test = it;
|
||||||
|
|
||||||
|
describe("layer editor", () => {
|
||||||
const { beforeAndAfter, get, when, then } = new MaputnikDriver();
|
const { beforeAndAfter, get, when, then } = new MaputnikDriver();
|
||||||
beforeAndAfter();
|
beforeAndAfter();
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
@@ -48,7 +50,7 @@ test.describe("layer editor", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("source", () => {
|
describe("source", () => {
|
||||||
test("should show error when the source is invalid", () => {
|
test("should show error when the source is invalid", () => {
|
||||||
when.modal.fillLayers({
|
when.modal.fillLayers({
|
||||||
type: "circle",
|
type: "circle",
|
||||||
@@ -58,7 +60,7 @@ test.describe("layer editor", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("min-zoom", () => {
|
describe("min-zoom", () => {
|
||||||
let bgId: string;
|
let bgId: string;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
@@ -80,7 +82,7 @@ test.describe("layer editor", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test("when clicking next layer should update style on local storage", () => {
|
it("when clicking next layer should update style on local storage", () => {
|
||||||
when.type("min-zoom.input-text", "{backspace}");
|
when.type("min-zoom.input-text", "{backspace}");
|
||||||
when.click("max-zoom.input-text");
|
when.click("max-zoom.input-text");
|
||||||
then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||||
@@ -95,7 +97,7 @@ test.describe("layer editor", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("max-zoom", () => {
|
describe("max-zoom", () => {
|
||||||
let bgId: string;
|
let bgId: string;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
@@ -118,7 +120,7 @@ test.describe("layer editor", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("comments", () => {
|
describe("comments", () => {
|
||||||
let bgId: string;
|
let bgId: string;
|
||||||
const comment = "42";
|
const comment = "42";
|
||||||
|
|
||||||
@@ -143,7 +145,7 @@ test.describe("layer editor", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("when unsetting", () => {
|
describe("when unsetting", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
when.clear("layer-comment.input");
|
when.clear("layer-comment.input");
|
||||||
when.click("min-zoom.input-text");
|
when.click("min-zoom.input-text");
|
||||||
@@ -162,7 +164,7 @@ test.describe("layer editor", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("color", () => {
|
describe("color", () => {
|
||||||
let bgId: string;
|
let bgId: string;
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
bgId = createBackground();
|
bgId = createBackground();
|
||||||
@@ -182,7 +184,7 @@ test.describe("layer editor", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("opacity", () => {
|
describe("opacity", () => {
|
||||||
let bgId: string;
|
let bgId: string;
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
bgId = createBackground();
|
bgId = createBackground();
|
||||||
@@ -202,12 +204,12 @@ test.describe("layer editor", () => {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
test.describe("filter", () => {
|
describe("filter", () => {
|
||||||
test("expand/collapse");
|
test("expand/collapse");
|
||||||
test("compound filter");
|
test("compound filter");
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("layout", () => {
|
describe("layout", () => {
|
||||||
test("text-font", () => {
|
test("text-font", () => {
|
||||||
when.setStyle("font");
|
when.setStyle("font");
|
||||||
when.collapseGroupInLayerEditor();
|
when.collapseGroupInLayerEditor();
|
||||||
@@ -221,14 +223,14 @@ test.describe("layer editor", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("paint", () => {
|
describe("paint", () => {
|
||||||
test("expand/collapse");
|
test("expand/collapse");
|
||||||
test("color");
|
test("color");
|
||||||
test("pattern");
|
test("pattern");
|
||||||
test("opacity");
|
test("opacity");
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("json-editor", () => {
|
describe("json-editor", () => {
|
||||||
test("add", () => {
|
test("add", () => {
|
||||||
const id = when.modal.fillLayers({
|
const id = when.modal.fillLayers({
|
||||||
type: "circle",
|
type: "circle",
|
||||||
@@ -272,7 +274,7 @@ test.describe("layer editor", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("sticky header", () => {
|
describe("sticky header", () => {
|
||||||
test("should keep layer header visible when scrolling properties", () => {
|
test("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({
|
||||||
|
|||||||
+20
-20
@@ -1,6 +1,6 @@
|
|||||||
import { MaputnikDriver } from "./maputnik-driver";
|
import { MaputnikDriver } from "./maputnik-driver";
|
||||||
|
|
||||||
test.describe("layers list", () => {
|
describe("layers list", () => {
|
||||||
const { beforeAndAfter, get, when, then } = new MaputnikDriver();
|
const { beforeAndAfter, get, when, then } = new MaputnikDriver();
|
||||||
beforeAndAfter();
|
beforeAndAfter();
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
@@ -8,7 +8,7 @@ test.describe("layers list", () => {
|
|||||||
when.modal.open();
|
when.modal.open();
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("ops", () => {
|
describe("ops", () => {
|
||||||
let id: string;
|
let id: string;
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
id = when.modal.fillLayers({
|
id = when.modal.fillLayers({
|
||||||
@@ -27,7 +27,7 @@ test.describe("layers list", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("when clicking delete", () => {
|
describe("when clicking delete", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
when.click("layer-list-item:" + id + ":delete");
|
when.click("layer-list-item:" + id + ":delete");
|
||||||
});
|
});
|
||||||
@@ -38,7 +38,7 @@ test.describe("layers list", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("when clicking duplicate", () => {
|
describe("when clicking duplicate", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
when.click("layer-list-item:" + id + ":copy");
|
when.click("layer-list-item:" + id + ":copy");
|
||||||
});
|
});
|
||||||
@@ -58,7 +58,7 @@ test.describe("layers list", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("when clicking hide", () => {
|
describe("when clicking hide", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
when.click("layer-list-item:" + id + ":toggle-visibility");
|
when.click("layer-list-item:" + id + ":toggle-visibility");
|
||||||
});
|
});
|
||||||
@@ -77,7 +77,7 @@ test.describe("layers list", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("when clicking show", () => {
|
describe("when clicking show", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
when.click("layer-list-item:" + id + ":toggle-visibility");
|
when.click("layer-list-item:" + id + ":toggle-visibility");
|
||||||
});
|
});
|
||||||
@@ -97,7 +97,7 @@ test.describe("layers list", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("when selecting a layer", () => {
|
describe("when selecting a layer", () => {
|
||||||
let secondId: string;
|
let secondId: string;
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
when.modal.open();
|
when.modal.open();
|
||||||
@@ -116,7 +116,7 @@ test.describe("layers list", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("background", () => {
|
describe("background", () => {
|
||||||
test("add", () => {
|
test("add", () => {
|
||||||
const id = when.modal.fillLayers({
|
const id = when.modal.fillLayers({
|
||||||
type: "background",
|
type: "background",
|
||||||
@@ -131,10 +131,10 @@ test.describe("layers list", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("modify", () => {});
|
describe("modify", () => {});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("fill", () => {
|
describe("fill", () => {
|
||||||
test("add", () => {
|
test("add", () => {
|
||||||
const id = when.modal.fillLayers({
|
const id = when.modal.fillLayers({
|
||||||
type: "fill",
|
type: "fill",
|
||||||
@@ -156,7 +156,7 @@ test.describe("layers list", () => {
|
|||||||
test("change source");
|
test("change source");
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("line", () => {
|
describe("line", () => {
|
||||||
test("add", () => {
|
test("add", () => {
|
||||||
const id = when.modal.fillLayers({
|
const id = when.modal.fillLayers({
|
||||||
type: "line",
|
type: "line",
|
||||||
@@ -229,7 +229,7 @@ test.describe("layers list", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("symbol", () => {
|
describe("symbol", () => {
|
||||||
test("add", () => {
|
test("add", () => {
|
||||||
const id = when.modal.fillLayers({
|
const id = when.modal.fillLayers({
|
||||||
type: "symbol",
|
type: "symbol",
|
||||||
@@ -286,7 +286,7 @@ test.describe("layers list", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("raster", () => {
|
describe("raster", () => {
|
||||||
test("add", () => {
|
test("add", () => {
|
||||||
const id = when.modal.fillLayers({
|
const id = when.modal.fillLayers({
|
||||||
type: "raster",
|
type: "raster",
|
||||||
@@ -305,7 +305,7 @@ test.describe("layers list", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("circle", () => {
|
describe("circle", () => {
|
||||||
test("add", () => {
|
test("add", () => {
|
||||||
const id = when.modal.fillLayers({
|
const id = when.modal.fillLayers({
|
||||||
type: "circle",
|
type: "circle",
|
||||||
@@ -324,7 +324,7 @@ test.describe("layers list", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("fill extrusion", () => {
|
describe("fill extrusion", () => {
|
||||||
test("add", () => {
|
test("add", () => {
|
||||||
const id = when.modal.fillLayers({
|
const id = when.modal.fillLayers({
|
||||||
type: "fill-extrusion",
|
type: "fill-extrusion",
|
||||||
@@ -343,7 +343,7 @@ test.describe("layers list", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("hillshade", () => {
|
describe("hillshade", () => {
|
||||||
test("add", () => {
|
test("add", () => {
|
||||||
const id = when.modal.fillLayers({
|
const id = when.modal.fillLayers({
|
||||||
type: "hillshade",
|
type: "hillshade",
|
||||||
@@ -412,7 +412,7 @@ test.describe("layers list", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("color-relief", () => {
|
describe("color-relief", () => {
|
||||||
test("add", () => {
|
test("add", () => {
|
||||||
const id = when.modal.fillLayers({
|
const id = when.modal.fillLayers({
|
||||||
type: "color-relief",
|
type: "color-relief",
|
||||||
@@ -441,7 +441,7 @@ test.describe("layers list", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("groups", () => {
|
describe("groups", () => {
|
||||||
test("simple", () => {
|
test("simple", () => {
|
||||||
when.setStyle("geojson");
|
when.setStyle("geojson");
|
||||||
|
|
||||||
@@ -477,7 +477,7 @@ test.describe("layers list", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("drag and drop", () => {
|
describe("drag and drop", () => {
|
||||||
test("move layer should update local storage", () => {
|
test("move layer should update local storage", () => {
|
||||||
when.modal.open();
|
when.modal.open();
|
||||||
const firstId = when.modal.fillLayers({
|
const firstId = when.modal.fillLayers({
|
||||||
@@ -516,7 +516,7 @@ test.describe("layers list", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("sticky header", () => {
|
describe("sticky header", () => {
|
||||||
test("should keep header visible when scrolling layer list", () => {
|
test("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++) {
|
||||||
|
|||||||
+6
-4
@@ -1,9 +1,11 @@
|
|||||||
import { MaputnikDriver } from "./maputnik-driver";
|
import { MaputnikDriver } from "./maputnik-driver";
|
||||||
|
|
||||||
test.describe("map", () => {
|
const test = it;
|
||||||
|
|
||||||
|
describe("map", () => {
|
||||||
const { beforeAndAfter, get, when, then } = new MaputnikDriver();
|
const { beforeAndAfter, get, when, then } = new MaputnikDriver();
|
||||||
beforeAndAfter();
|
beforeAndAfter();
|
||||||
test.describe("zoom level", () => {
|
describe("zoom level", () => {
|
||||||
test("via url", () => {
|
test("via url", () => {
|
||||||
const zoomLevel = 12.37;
|
const zoomLevel = 12.37;
|
||||||
when.setStyle("geojson", zoomLevel);
|
when.setStyle("geojson", zoomLevel);
|
||||||
@@ -39,13 +41,13 @@ test.describe("map", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("search", () => {
|
describe("search", () => {
|
||||||
test("should exist", () => {
|
test("should exist", () => {
|
||||||
then(get.searchControl()).shouldBeVisible();
|
then(get.searchControl()).shouldBeVisible();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("popup", () => {
|
describe("popup", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
when.setStyle("rectangles");
|
when.setStyle("rectangles");
|
||||||
then(get.locationHash().should("exist"));
|
then(get.locationHash().should("exist"));
|
||||||
|
|||||||
+18
-17
@@ -1,14 +1,15 @@
|
|||||||
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;
|
||||||
|
|
||||||
test.describe("modals", () => {
|
describe("modals", () => {
|
||||||
const { beforeAndAfter, when, get, given, then } = new MaputnikDriver();
|
const { beforeAndAfter, when, get, given, then } = new MaputnikDriver();
|
||||||
beforeAndAfter();
|
beforeAndAfter();
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
when.setStyle("");
|
when.setStyle("");
|
||||||
});
|
});
|
||||||
test.describe("open", () => {
|
describe("open", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
when.click("nav:open");
|
when.click("nav:open");
|
||||||
});
|
});
|
||||||
@@ -28,7 +29,7 @@ test.describe("modals", () => {
|
|||||||
then(get.fixture("example-style.json")).shouldEqualToStoredStyle();
|
then(get.fixture("example-style.json")).shouldEqualToStoredStyle();
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("when click open url", () => {
|
describe("when click open url", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
const styleFileUrl = get.exampleFileUrl();
|
const styleFileUrl = get.exampleFileUrl();
|
||||||
|
|
||||||
@@ -42,7 +43,7 @@ test.describe("modals", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("shortcuts", () => {
|
describe("shortcuts", () => {
|
||||||
test("open/close", () => {
|
test("open/close", () => {
|
||||||
when.setStyle("");
|
when.setStyle("");
|
||||||
when.typeKeys("?");
|
when.typeKeys("?");
|
||||||
@@ -51,7 +52,7 @@ test.describe("modals", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("export", () => {
|
describe("export", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
when.click("nav:export");
|
when.click("nav:export");
|
||||||
});
|
});
|
||||||
@@ -65,7 +66,7 @@ test.describe("modals", () => {
|
|||||||
test("download");
|
test("download");
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("sources", () => {
|
describe("sources", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
when.setStyle("layer");
|
when.setStyle("layer");
|
||||||
when.click("nav:sources");
|
when.click("nav:sources");
|
||||||
@@ -122,7 +123,7 @@ test.describe("modals", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("inspect", () => {
|
describe("inspect", () => {
|
||||||
test("toggle", () => {
|
test("toggle", () => {
|
||||||
// There is no assertion in this test
|
// There is no assertion in this test
|
||||||
when.setStyle("geojson");
|
when.setStyle("geojson");
|
||||||
@@ -130,12 +131,12 @@ test.describe("modals", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("style settings", () => {
|
describe("style settings", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
when.click("nav:settings");
|
when.click("nav:settings");
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("when click name filed spec information", () => {
|
describe("when click name filed spec information", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
when.click("field-doc-button-Name");
|
when.click("field-doc-button-Name");
|
||||||
});
|
});
|
||||||
@@ -147,7 +148,7 @@ test.describe("modals", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("when set name and click owner", () => {
|
describe("when set name and click owner", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
when.setValue("modal:settings.name", "foobar");
|
when.setValue("modal:settings.name", "foobar");
|
||||||
when.click("modal:settings.owner");
|
when.click("modal:settings.owner");
|
||||||
@@ -161,7 +162,7 @@ test.describe("modals", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("when set owner and click name", () => {
|
describe("when set owner and click name", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
when.setValue("modal:settings.owner", "foobar");
|
when.setValue("modal:settings.owner", "foobar");
|
||||||
when.click("modal:settings.name");
|
when.click("modal:settings.name");
|
||||||
@@ -321,7 +322,7 @@ test.describe("modals", () => {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("add layer", () => {
|
describe("add layer", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
when.setStyle("layer");
|
when.setStyle("layer");
|
||||||
when.modal.open();
|
when.modal.open();
|
||||||
@@ -337,11 +338,11 @@ test.describe("modals", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("sources", () => {
|
describe("sources", () => {
|
||||||
test("toggle");
|
test("toggle");
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("global state", () => {
|
describe("global state", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
when.click("nav:global-state");
|
when.click("nav:global-state");
|
||||||
});
|
});
|
||||||
@@ -399,7 +400,7 @@ test.describe("modals", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("error panel", () => {
|
describe("error panel", () => {
|
||||||
test("not visible when no errors", () => {
|
test("not visible when no errors", () => {
|
||||||
then(get.element("maputnik-message-panel-error")).shouldNotExist();
|
then(get.element("maputnik-message-panel-error")).shouldNotExist();
|
||||||
});
|
});
|
||||||
@@ -414,7 +415,7 @@ test.describe("modals", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("Handle localStorage QuotaExceededError", () => {
|
describe("Handle localStorage QuotaExceededError", () => {
|
||||||
test("handles quota exceeded error when opening style from URL", () => {
|
test("handles quota exceeded error when opening style from URL", () => {
|
||||||
// Clear localStorage to start fresh
|
// Clear localStorage to start fresh
|
||||||
cy.clearLocalStorage();
|
cy.clearLocalStorage();
|
||||||
|
|||||||
+1
-1
@@ -21,7 +21,7 @@
|
|||||||
"noUnusedParameters": true,
|
"noUnusedParameters": true,
|
||||||
"noFallthroughCasesInSwitch": true
|
"noFallthroughCasesInSwitch": true
|
||||||
},
|
},
|
||||||
"include": ["src", "cypress/e2e"],
|
"include": ["src", "cypress/e2e", "e2e/maputnik-cypress-helper.ts"],
|
||||||
"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
|
||||||
|
|||||||
Reference in New Issue
Block a user