From 189c34e0a2fee4446b62497bdd11e69e5e66a5e7 Mon Sep 17 00:00:00 2001 From: ShellyDCMS <60476837+ShellyDCMS@users.noreply.github.com> Date: Mon, 6 Jan 2025 11:27:45 +0200 Subject: [PATCH] Fix failing test --- cypress/e2e/modals.cy.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/cypress/e2e/modals.cy.ts b/cypress/e2e/modals.cy.ts index 9f5bfcb7..3de61dde 100644 --- a/cypress/e2e/modals.cy.ts +++ b/cypress/e2e/modals.cy.ts @@ -88,13 +88,15 @@ describe("modals", () => { when.setValue("modal:sources.add.source_id", sourceId); when.select("modal:sources.add.source_type", "pmtiles_vector"); when.setValue("modal:sources.add.source_url", "https://data.source.coop/protomaps/openstreetmap/v4.pmtiles"); - when.click("modal:sources.add.add_source"); + when.realClick("modal:sources.add.add_source"); when.wait(200); - then( - get.styleFromLocalStorage().then((style) => style.sources[sourceId]) - ).shouldInclude({ - type: "vector", - // url: "pmtiles://https://data.source.coop/protomaps/openstreetmap/v4.pmtiles", + then(get.styleFromLocalStorage()).shouldDeepNestedInclude({ + sources: { + pmtilestest: { + type: "vector", + url: "pmtiles://https://data.source.coop/protomaps/openstreetmap/v4.pmtiles", + }, + }, }); });