mirror of
https://github.com/maputnik/editor.git
synced 2025-12-06 06:10:00 +00:00
Keeps the repo clean, same as several other of our repos --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
33 lines
960 B
TypeScript
33 lines
960 B
TypeScript
import { MaputnikDriver } from "./maputnik-driver";
|
|
|
|
describe("map", () => {
|
|
const { beforeAndAfter, get, when, then } = new MaputnikDriver();
|
|
beforeAndAfter();
|
|
describe("zoom level", () => {
|
|
it("via url", () => {
|
|
const 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", () => {
|
|
const 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)
|
|
);
|
|
});
|
|
});
|
|
|
|
describe("search", () => {
|
|
it('should exist', () => {
|
|
then(get.searchControl()).shouldBeVisible();
|
|
});
|
|
});
|
|
});
|