mirror of
https://github.com/maputnik/editor.git
synced 2026-06-18 21:27:34 +00:00
E2E: Improve tests, lint, and add more drivers (#855)
This PR introduces lint to cypress code, adds drivers to try and abstract the usage of cypress as much as possible. Nothing very interesting, mainly to try out the driver pattern for the e2e tests.
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
import MaputnikDriver from "./driver";
|
||||
import MaputnikDriver from "./maputnik-driver";
|
||||
|
||||
describe("map", () => {
|
||||
let { beforeAndAfter, given, when, get, should } = new MaputnikDriver();
|
||||
let { beforeAndAfter, when, should } = new MaputnikDriver();
|
||||
beforeAndAfter();
|
||||
describe("zoom level", () => {
|
||||
it("via url", () => {
|
||||
var zoomLevel = 12.37;
|
||||
let 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;
|
||||
let zoomLevel = 12.37;
|
||||
when.setStyle("geojson", zoomLevel);
|
||||
|
||||
should.beVisible("maplibre:ctrl-zoom");
|
||||
|
||||
Reference in New Issue
Block a user