geoCoder hinter dataSheet ausblenden

This commit is contained in:
ISA
2025-01-10 12:23:11 +01:00
parent 9e1c4525ac
commit 78ad2219ec
2 changed files with 17 additions and 2 deletions

View File

@@ -0,0 +1,15 @@
describe("Karteninteraktion", () => {
it("zoomt zu den eingegebenen Koordinaten", () => {
cy.visit("/map"); // Passe den Pfad an deine Karte an
cy.get('input[placeholder="Koordinaten eingeben (lat,lng)"]').type("52.52,13.405");
cy.get("button").contains("Zu Marker zoomen").click();
// Überprüfe, ob die Karte die Koordinaten korrekt zentriert hat
cy.window().then((win) => {
const map = win.map; // Zugriff auf die Leaflet-Instanz
const center = map.getCenter();
expect(center.lat).to.be.closeTo(52.52, 0.01);
expect(center.lng).to.be.closeTo(13.405, 0.01);
});
});
});