Compare commits

..

3 Commits

Author SHA1 Message Date
shelly_goldblit b74e5d4c74 review comments 2024-01-01 16:51:10 +02:00
shelly_goldblit b869905db9 lint 2024-01-01 15:56:26 +02:00
shelly_goldblit 1d938b5a8b review comments 2024-01-01 15:53:15 +02:00
5 changed files with 4 additions and 12 deletions
-1
View File
@@ -306,7 +306,6 @@ describe("layers", () => {
when.click("layer-list-item:background:" + bgId); when.click("layer-list-item:background:" + bgId);
let errorSelector = ".CodeMirror-lint-marker-error"; let errorSelector = ".CodeMirror-lint-marker-error";
// Not a good idea to check that something doesn't exist. infinite things don't exist.
then(get.elementByTestId(errorSelector)).shouldNotExist(); then(get.elementByTestId(errorSelector)).shouldNotExist();
when.click(".CodeMirror"); when.click(".CodeMirror");
+1 -8
View File
@@ -1,6 +1,6 @@
import { CypressHelper } from "@shellygo/cypress-test-utils"; import { CypressHelper } from "@shellygo/cypress-test-utils";
import { Assertable, then } from "@shellygo/cypress-test-utils/assertable"; import { Assertable, then } from "@shellygo/cypress-test-utils/assertable";
import MaputnikCypressHelper from "./cypress-wrapper-driver"; import MaputnikCypressHelper from "./maputnik-cypress-helper";
import ModalDriver from "./modal-driver"; import ModalDriver from "./modal-driver";
const baseUrl = "http://localhost:8888/"; const baseUrl = "http://localhost:8888/";
@@ -169,13 +169,6 @@ export class MaputnikDriver {
styleFromLocalStorage: () => styleFromLocalStorage: () =>
this.helper.get.window().then((win) => styleFromWindow(win)), this.helper.get.window().then((win) => styleFromWindow(win)),
maputnikStyleFromLocalStorageObj: () => {
const styleId = localStorage.getItem("maputnik:latest_style");
const styleItem = localStorage.getItem(`maputnik:style:${styleId}`);
const obj = JSON.parse(styleItem || "");
return obj;
},
exampleFileUrl: () => { exampleFileUrl: () => {
return baseUrl + "example-style.json"; return baseUrl + "example-style.json";
}, },
+1 -1
View File
@@ -1,5 +1,5 @@
import { v1 as uuid } from "uuid"; import { v1 as uuid } from "uuid";
import MaputnikCypressHelper from "./cypress-wrapper-driver"; import MaputnikCypressHelper from "./maputnik-cypress-helper";
export default class ModalDriver { export default class ModalDriver {
private helper = new MaputnikCypressHelper(); private helper = new MaputnikCypressHelper();
+2 -2
View File
@@ -5,7 +5,7 @@ describe("modals", () => {
beforeAndAfter(); beforeAndAfter();
beforeEach(() => { beforeEach(() => {
when.visit("/"); when.setStyle("");
}); });
describe("open", () => { describe("open", () => {
beforeEach(() => { beforeEach(() => {
@@ -51,7 +51,7 @@ describe("modals", () => {
when.click("nav:export"); when.click("nav:export");
}); });
it.skip("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();
}); });