Version 1.0.4.1 open Links in new Tab for polylines and devices work it without disablePolylineEvents(window.polylines);
This commit is contained in:
20
cypress/integration/map_test_spec.js
Normal file
20
cypress/integration/map_test_spec.js
Normal file
@@ -0,0 +1,20 @@
|
||||
describe("Map Initial Load Test", () => {
|
||||
it("should load the map with the correct center and zoom", () => {
|
||||
// Besuche die Seite, auf der die Karte angezeigt wird
|
||||
cy.visit("http://192.168.10.167:3000/?m=12&u=485");
|
||||
|
||||
// Überprüfe, ob das Kartenelement existiert
|
||||
cy.get("#map").should("be.visible");
|
||||
|
||||
// Überprüfe, ob die Karte das korrekte Zentrum und den korrekten Zoom hat
|
||||
cy.window().then((win) => {
|
||||
const map = win.L.map;
|
||||
const center = map.getCenter();
|
||||
const zoom = map.getZoom();
|
||||
|
||||
expect(center.lat).to.be.closeTo(53.111111, 0.0001);
|
||||
expect(center.lng).to.be.closeTo(8.4625, 0.0001);
|
||||
expect(zoom).to.eq(12);
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user