mirror of
https://github.com/maputnik/editor.git
synced 2026-08-27 15:37:27 +00:00
fix some more tests
This commit is contained in:
+34
-29
@@ -224,41 +224,46 @@ describe("layers", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it("comments", () => {
|
describe("comments", () => {
|
||||||
let bgId = createBackground();
|
let bgId: string;
|
||||||
let comment = "42";
|
let comment = "42";
|
||||||
|
|
||||||
when.click("layer-list-item:background:" + bgId);
|
beforeEach(() => {
|
||||||
when.setValue("layer-comment.input", comment);
|
bgId = createBackground();
|
||||||
|
|
||||||
when.click("layer-editor.layer-id");
|
when.click("layer-list-item:background:" + bgId);
|
||||||
|
when.setValue("layer-comment.input", comment);
|
||||||
|
|
||||||
should.equalStyleStore(
|
when.click("layer-editor.layer-id");
|
||||||
(a: any) => a.layers,
|
});
|
||||||
[
|
|
||||||
{
|
it("should update style in local stroage", () => {
|
||||||
id: "background:" + bgId,
|
then(get.maputnikStyleFromLocalStorage()).shouldDeepNestedInclude({
|
||||||
type: "background",
|
layers: [
|
||||||
metadata: {
|
{
|
||||||
"maputnik:comment": comment,
|
id: "background:" + bgId,
|
||||||
|
type: "background",
|
||||||
|
metadata: {
|
||||||
|
"maputnik:comment": comment,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
],
|
||||||
]
|
});
|
||||||
);
|
});
|
||||||
|
|
||||||
// Unset it again.
|
it("when unsetting should update style in local storage", () => {
|
||||||
when.type("layer-comment.input", "{backspace}{backspace}");
|
// Unset it again.
|
||||||
when.click("min-zoom.input-text");
|
when.type("layer-comment.input", "{backspace}{backspace}");
|
||||||
|
when.click("min-zoom.input-text");
|
||||||
should.equalStyleStore(
|
then(get.maputnikStyleFromLocalStorage()).shouldDeepNestedInclude({
|
||||||
(a: any) => a.layers,
|
layers: [
|
||||||
[
|
{
|
||||||
{
|
id: "background:" + bgId,
|
||||||
id: "background:" + bgId,
|
type: "background",
|
||||||
type: "background",
|
},
|
||||||
},
|
],
|
||||||
]
|
});
|
||||||
);
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it("color", () => {
|
it("color", () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user