mirror of
https://github.com/maputnik/editor.git
synced 2026-02-06 12:40:00 +00:00
27 lines
828 B
TypeScript
27 lines
828 B
TypeScript
import { MaputnikDriver, then } from "./maputnik-driver";
|
|
|
|
describe("map", () => {
|
|
let { beforeAndAfter, get, when } = new MaputnikDriver();
|
|
beforeAndAfter();
|
|
describe("zoom level", () => {
|
|
it("via url", () => {
|
|
let zoomLevel = 12.37;
|
|
when.setStyle("geojson", zoomLevel);
|
|
then(get.elementByTestId("maplibre:ctrl-zoom")).shouldBeVisible();
|
|
then(get.elementByTestId("maplibre:ctrl-zoom")).shouldContainText(
|
|
"Zoom: " + zoomLevel
|
|
);
|
|
});
|
|
|
|
it("via map controls", () => {
|
|
let zoomLevel = 12.37;
|
|
when.setStyle("geojson", zoomLevel);
|
|
then(get.elementByTestId("maplibre:ctrl-zoom")).shouldBeVisible();
|
|
when.clickZoomIn();
|
|
then(get.elementByTestId("maplibre:ctrl-zoom")).shouldContainText(
|
|
"Zoom: " + (zoomLevel + 1)
|
|
);
|
|
});
|
|
});
|
|
});
|