From e49d0c21bd1316abd8ef8c7bfd45349ec27cae43 Mon Sep 17 00:00:00 2001 From: Birk Skyum Date: Tue, 21 Jan 2025 23:42:01 +0100 Subject: [PATCH] add test --- cypress/e2e/layers.cy.ts | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/cypress/e2e/layers.cy.ts b/cypress/e2e/layers.cy.ts index 11afc47a..503e8a8c 100644 --- a/cypress/e2e/layers.cy.ts +++ b/cypress/e2e/layers.cy.ts @@ -494,4 +494,33 @@ describe("layers", () => { ).shouldBeVisible(); }); }); + + + describe.only("layereditor jsonlint should error", ()=>{ + + it("add", () => { + const id = when.modal.fillLayers({ + type: "circle", + layer: "example", + }); + + then(get.styleFromLocalStorage()).shouldDeepNestedInclude({ + layers: [ + { + id: id, + type: "circle", + source: "example", + }, + ], + }); + + const sourceText = get.elementByText('"source"'); + + sourceText.click(); + sourceText.type("\""); + + const error = cy.get('.CodeMirror-lint-marker-error'); + error.should('exist'); + }); + }); });