mirror of
https://github.com/maputnik/editor.git
synced 2026-09-01 18:07:37 +00:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ba201935a8 | |||
| 79b36efbdb | |||
| fb41a59bd8 | |||
| 7538e02e47 | |||
| d031fc67f5 | |||
| 7de266ca43 | |||
| ecfdd5f1ba | |||
| 0bb0ae87af | |||
| 7c8b25e82c |
@@ -34,12 +34,6 @@ jobs:
|
|||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version-file: '.nvmrc'
|
node-version-file: '.nvmrc'
|
||||||
- uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: ~/.npm
|
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-node-
|
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- run: npm run build
|
- run: npm run build
|
||||||
- run: npm run lint
|
- run: npm run lint
|
||||||
@@ -57,12 +51,6 @@ jobs:
|
|||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version-file: '.nvmrc'
|
node-version-file: '.nvmrc'
|
||||||
- uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: ~/.npm
|
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-node-
|
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- run: npm run build
|
- run: npm run build
|
||||||
- run: npm run build-storybook
|
- run: npm run build-storybook
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ describe("accessibility", () => {
|
|||||||
const selector = "root:skip:layer-list";
|
const selector = "root:skip:layer-list";
|
||||||
then(get.elementByTestId(selector)).shouldExist();
|
then(get.elementByTestId(selector)).shouldExist();
|
||||||
when.tab();
|
when.tab();
|
||||||
then(get.skipTargetLayerList()).shouldBeFocused();
|
then(get.elementByTestId(selector)).shouldBeFocused();
|
||||||
when.click(selector);
|
when.click(selector);
|
||||||
then(get.skipTargetLayerList()).shouldBeFocused();
|
then(get.skipTargetLayerList()).shouldBeFocused();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -87,18 +87,18 @@ export default class MaputnikDriver {
|
|||||||
) => {
|
) => {
|
||||||
let url = "?debug";
|
let url = "?debug";
|
||||||
switch (styleProperties) {
|
switch (styleProperties) {
|
||||||
case "geojson":
|
case "geojson":
|
||||||
url += `&style=${baseUrl}geojson-style.json`;
|
url += `&style=${baseUrl}geojson-style.json`;
|
||||||
break;
|
break;
|
||||||
case "raster":
|
case "raster":
|
||||||
url += `&style=${baseUrl}raster-style.json`;
|
url += `&style=${baseUrl}raster-style.json`;
|
||||||
break;
|
break;
|
||||||
case "both":
|
case "both":
|
||||||
url += `&style=${baseUrl}geojson-raster-style.json`;
|
url += `&style=${baseUrl}geojson-raster-style.json`;
|
||||||
break;
|
break;
|
||||||
case "layer":
|
case "layer":
|
||||||
url += `&style=${baseUrl}/example-layer-style.json`;
|
url += `&style=${baseUrl}/example-layer-style.json`;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (zoom) {
|
if (zoom) {
|
||||||
url += `#${zoom}/41.3805/2.1635`;
|
url += `#${zoom}/41.3805/2.1635`;
|
||||||
@@ -111,7 +111,7 @@ export default class MaputnikDriver {
|
|||||||
this.helper.get.elementByTestId("toolbar:link").should("be.visible");
|
this.helper.get.elementByTestId("toolbar:link").should("be.visible");
|
||||||
},
|
},
|
||||||
|
|
||||||
typeKeys: (keys: string, selector?: string) =>
|
typeKeys: (keys: string) =>
|
||||||
this.helper.get.element("body").type(keys),
|
this.helper.get.element("body").type(keys),
|
||||||
|
|
||||||
clickZoomIn: () => {
|
clickZoomIn: () => {
|
||||||
@@ -192,9 +192,9 @@ export default class MaputnikDriver {
|
|||||||
},
|
},
|
||||||
|
|
||||||
styleStoreEqualToExampleFileData: () => {
|
styleStoreEqualToExampleFileData: () => {
|
||||||
cy.window().then((win: any) => {
|
cy.window().then((_win: any) => {
|
||||||
const obj = this.get.styleFromWindow(win);
|
//const obj = this.get.styleFromWindow(win);
|
||||||
const bobj = this.get.maputnikStyleFromLocalStorageObj();
|
const obj = this.get.maputnikStyleFromLocalStorageObj();
|
||||||
this.helper.given
|
this.helper.given
|
||||||
.fixture("example-style.json", "file:example-style.json")
|
.fixture("example-style.json", "file:example-style.json")
|
||||||
.should("deep.equal", obj);
|
.should("deep.equal", obj);
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ describe("modals", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("when click owner", () => {
|
describe("when set name and click owner", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
when.setValue("modal:settings.name", "foobar");
|
when.setValue("modal:settings.name", "foobar");
|
||||||
when.click("modal:settings.owner");
|
when.click("modal:settings.owner");
|
||||||
@@ -110,13 +110,19 @@ describe("modals", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it("owner", () => {
|
describe("when set owner and click name", () => {
|
||||||
when.setValue("modal:settings.owner", "foobar");
|
beforeEach(() => {
|
||||||
when.click("modal:settings.name");
|
when.setValue("modal:settings.owner", "foobar");
|
||||||
then(get.maputnikStyleFromLocalStorage()).shouldDeepNestedInclude({
|
when.click("modal:settings.name");
|
||||||
owner: "foobar",
|
when.wait(200);
|
||||||
|
});
|
||||||
|
it("should update owner in local storage", () => {
|
||||||
|
then(get.maputnikStyleFromLocalStorage()).shouldDeepNestedInclude({
|
||||||
|
owner: "foobar",
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it("sprite url", () => {
|
it("sprite url", () => {
|
||||||
when.setValue("modal:settings.sprite", "http://example.com");
|
when.setValue("modal:settings.sprite", "http://example.com");
|
||||||
when.click("modal:settings.name");
|
when.click("modal:settings.name");
|
||||||
|
|||||||
Generated
+860
-108
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user