mirror of
https://github.com/maputnik/editor.git
synced 2026-01-09 23:10:01 +00:00
This is basically the content of #841 with the code review changes and relevant fixes to tests/driver code to pass the tests. CC: @ShellyDCMS After this we should lint the project and add the lint to the CI to make sure it doesn't break. --------- Co-authored-by: ShellyDCMS <60476837+ShellyDCMS@users.noreply.github.com> Co-authored-by: shelly_goldblit <shelly_goldblit@dell.com>
24 lines
687 B
TypeScript
24 lines
687 B
TypeScript
import MaputnikDriver from "./driver";
|
|
|
|
describe("map", () => {
|
|
let { beforeAndAfter, given, when, get, should } = new MaputnikDriver();
|
|
beforeAndAfter();
|
|
describe("zoom level", () => {
|
|
it("via url", () => {
|
|
var zoomLevel = 12.37;
|
|
when.setStyle("geojson", zoomLevel);
|
|
should.beVisible("maplibre:ctrl-zoom");
|
|
should.containText("maplibre:ctrl-zoom", "Zoom: " + zoomLevel);
|
|
});
|
|
|
|
it("via map controls", () => {
|
|
var zoomLevel = 12.37;
|
|
when.setStyle("geojson", zoomLevel);
|
|
|
|
should.beVisible("maplibre:ctrl-zoom");
|
|
when.clickZoomin();
|
|
should.containText("maplibre:ctrl-zoom", "Zoom: "+(zoomLevel + 1));
|
|
});
|
|
});
|
|
});
|