mirror of
https://github.com/maputnik/editor.git
synced 2026-08-27 07:27:33 +00:00
I think all tests should be green now
This commit is contained in:
+13
-19
@@ -20,9 +20,7 @@ describe("modals", () => {
|
||||
it.skip("upload", () => {
|
||||
// HM: I was not able to make the following choose file actually to select a file and close the modal...
|
||||
when.chooseExampleFile();
|
||||
then(get.responseBody("example-style.json")).shouldHaveLocalStorageStyle(
|
||||
get.maputnikStyleFromLocalStorageObj()
|
||||
);
|
||||
then(get.responseBody("example-style.json")).shouldEqualToStoredStyle();
|
||||
});
|
||||
|
||||
describe("when click open url", () => {
|
||||
@@ -34,9 +32,7 @@ describe("modals", () => {
|
||||
when.wait(200);
|
||||
});
|
||||
it("load from url", () => {
|
||||
then(
|
||||
get.responseBody("example-style.json")
|
||||
).shouldHaveLocalStorageStyle(get.maputnikStyleFromLocalStorageObj());
|
||||
then(get.responseBody("example-style.json")).shouldEqualToStoredStyle();
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -103,9 +99,7 @@ describe("modals", () => {
|
||||
});
|
||||
|
||||
it("show name specifications", () => {
|
||||
then(
|
||||
get.maputnikStyleFromLocalStorage()
|
||||
).shouldIncludeLocalStorageStyle({
|
||||
then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
name: "foobar",
|
||||
});
|
||||
});
|
||||
@@ -118,9 +112,7 @@ describe("modals", () => {
|
||||
when.wait(200);
|
||||
});
|
||||
it("should update owner in local storage", () => {
|
||||
then(
|
||||
get.maputnikStyleFromLocalStorage()
|
||||
).shouldIncludeLocalStorageStyle({
|
||||
then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
owner: "foobar",
|
||||
});
|
||||
});
|
||||
@@ -129,7 +121,7 @@ describe("modals", () => {
|
||||
it("sprite url", () => {
|
||||
when.setValue("modal:settings.sprite", "http://example.com");
|
||||
when.click("modal:settings.name");
|
||||
then(get.maputnikStyleFromLocalStorage()).shouldIncludeLocalStorageStyle({
|
||||
then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
sprite: "http://example.com",
|
||||
});
|
||||
});
|
||||
@@ -137,7 +129,7 @@ describe("modals", () => {
|
||||
let glyphsUrl = "http://example.com/{fontstack}/{range}.pbf";
|
||||
when.setValue("modal:settings.glyphs", glyphsUrl);
|
||||
when.click("modal:settings.name");
|
||||
then(get.maputnikStyleFromLocalStorage()).shouldIncludeLocalStorageStyle({
|
||||
then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
glyphs: glyphsUrl,
|
||||
});
|
||||
});
|
||||
@@ -149,7 +141,9 @@ describe("modals", () => {
|
||||
apiKey
|
||||
);
|
||||
when.click("modal:settings.name");
|
||||
then(get.maputnikStyleFromLocalStorage()).shouldIncludeLocalStorageStyle({
|
||||
then(
|
||||
get.styleFromLocalStorage().pipe((style) => style.metadata)
|
||||
).shouldInclude({
|
||||
"maputnik:openmaptiles_access_token": apiKey,
|
||||
});
|
||||
});
|
||||
@@ -161,9 +155,9 @@ describe("modals", () => {
|
||||
apiKey
|
||||
);
|
||||
when.click("modal:settings.name");
|
||||
then(get.maputnikStyleFromLocalStorage()).shouldIncludeLocalStorageStyle({
|
||||
metadata: { "maputnik:thunderforest_access_token": apiKey },
|
||||
});
|
||||
then(
|
||||
get.styleFromLocalStorage().pipe((style) => style.metadata)
|
||||
).shouldInclude({ "maputnik:thunderforest_access_token": apiKey });
|
||||
});
|
||||
|
||||
it("style renderer", () => {
|
||||
@@ -174,7 +168,7 @@ describe("modals", () => {
|
||||
);
|
||||
|
||||
when.click("modal:settings.name");
|
||||
then(get.maputnikStyleFromLocalStorage()).shouldIncludeLocalStorageStyle({
|
||||
then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
metadata: { "maputnik:renderer": "ol" },
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user