diff --git a/__mocks__/leaflet.js b/__mocks__/leaflet.js
deleted file mode 100644
index 2ef6e4a0a..000000000
--- a/__mocks__/leaflet.js
+++ /dev/null
@@ -1,23 +0,0 @@
-// __mocks__/leaflet.js
-const L = {
- divIcon: jest.fn(() => new L.DivIcon()),
- DivIcon: function () {
- this.options = {
- className: "custom-start-icon",
- html: `
-
- `,
- iconSize: [18, 18],
- iconAnchor: [9, 10],
- };
- },
-};
-
-L.DivIcon.prototype = {
- constructor: L.DivIcon,
-};
-
-module.exports = L;
diff --git a/__tests__/MapComponent.test.js b/__tests__/MapComponent.test.js
deleted file mode 100644
index ea9be1af6..000000000
--- a/__tests__/MapComponent.test.js
+++ /dev/null
@@ -1,89 +0,0 @@
-// __tests__/MapComponent.test.js
-
-// Ein einfacher Testfall, der sicherstellt, dass die Addition korrekt ist
-test("simple addition", () => {
- const a = 1;
- const b = 2;
- const c = a + b;
- expect(c).toBe(3); // Überprüft, ob c gleich 3 ist
-});
-
-//import L from "leaflet";
-//import { checkOverlappingMarkers } from "../utils/mapUtils"; // Passe den Pfad entsprechend an
-
-/* describe("checkOverlappingMarkers", () => {
- let map;
-
- beforeEach(() => {
- // Erstelle eine neue Leaflet-Karte für jeden Test
- map = L.map(document.createElement("div"));
- });
-
- it("should group markers by coordinates and add plus icons for overlapping markers", () => {
- // Erstelle einige Beispielmarker
- const markers = [
- L.marker([51.505, -0.09]),
- L.marker([51.505, -0.09]),
- L.marker([51.51, -0.1]),
- ];
-
- const plusIcon = L.divIcon({ className: "plus-icon" });
-
- // Rufe die Funktion auf
- checkOverlappingMarkers(map, markers, plusIcon);
-
- // Überprüfe, dass die Marker zu Gruppen hinzugefügt wurden
- const overlappingGroups = map._layers;
- expect(Object.keys(overlappingGroups).length).toBeGreaterThan(0);
-
- // Überprüfe, dass die Plus-Marker hinzugefügt wurden
- const plusMarkers = Object.values(overlappingGroups).filter(
- (layer) =>
- layer.options.icon &&
- layer.options.icon.options.className === "plus-icon"
- );
- expect(plusMarkers.length).toBeGreaterThan(0);
- });
-
- it("should handle non-array markers argument gracefully", () => {
- const plusIcon = L.divIcon({ className: "plus-icon" });
-
- // Rufe die Funktion mit einem ungültigen Argument auf
- checkOverlappingMarkers(map, null, plusIcon);
-
- // Stelle sicher, dass keine Marker hinzugefügt wurden
- const layers = map._layers;
- expect(Object.keys(layers).length).toBe(0);
- });
-
- it("should not add plus markers if there are no overlaps", () => {
- // Erstelle einige Beispielmarker
- const markers = [
- L.marker([51.505, -0.09]),
- L.marker([51.51, -0.1]),
- L.marker([51.52, -0.12]),
- ];
-
- const plusIcon = L.divIcon({ className: "plus-icon" });
-
- // Rufe die Funktion auf
- checkOverlappingMarkers(map, markers, plusIcon);
-
- // Überprüfe, dass keine Plus-Marker hinzugefügt wurden
- const plusMarkers = Object.values(map._layers).filter(
- (layer) =>
- layer.options.icon &&
- layer.options.icon.options.className === "plus-icon"
- );
- expect(plusMarkers.length).toBe(0);
- });
-}); */
-/*
-In diesem Test:
-
-Wird eine neue Leaflet-Karte vor jedem Test erstellt.
-checkOverlappingMarkers wird aufgerufen, um zu überprüfen, ob die Funktion die Marker richtig gruppiert und Plus-Icons für überlappende Marker hinzufügt.
-Der Test überprüft auch, ob die Funktion ungültige Argumente (wie null für Marker) korrekt behandelt.
-Es wird sichergestellt, dass keine Plus-Marker hinzugefügt werden, wenn keine Überlappungen vorliegen.
-Stelle sicher, dass du die Pfade und Importe entsprechend deiner Projektstruktur anpasst.
-*/
diff --git a/__tests__/unit/components/DataSheet.test.js b/__tests__/unit/components/DataSheet.test.js
deleted file mode 100644
index f390de883..000000000
--- a/__tests__/unit/components/DataSheet.test.js
+++ /dev/null
@@ -1,82 +0,0 @@
-// __tests__/components/DataSheet.test.js
-import React from "react";
-import { render, screen, waitFor } from "@testing-library/react";
-import "@testing-library/jest-dom";
-import userEvent from "@testing-library/user-event";
-import DataSheet from "../../components/DataSheet";
-import { RecoilRoot } from "recoil";
-import * as Recoil from "recoil";
-import { useRecoilState, useRecoilValue, useSetRecoilState } from "recoil";
-import { gisStationsStaticDistrictState } from "../../store/atoms/gisStationState";
-import { gisSystemStaticState } from "../../store/atoms/gisSystemState";
-import { mapLayersState } from "../../store/atoms/mapLayersState";
-import { selectedAreaState } from "../../store/atoms/selectedAreaState";
-import { zoomTriggerState } from "../../store/atoms/zoomTriggerState";
-import { poiLayerVisibleState } from "../../store/atoms/poiLayerVisibleState";
-
-// Stelle sicher, dass alle notwendigen Atome korrekt gemockt sind
-jest.mock("../../store/atoms/gisStationState", () => ({
- gisStationState: {
- subscribe: jest.fn(),
- getSnapshot: jest.fn(() => []), // Mocked return value
- },
-}));
-
-jest.mock("../../store/atoms/gisSystemState", () => ({
- gisSystemStaticState: {
- subscribe: jest.fn(),
- getSnapshot: jest.fn(() => []), // Mocked return value
- },
-}));
-
-describe("DataSheet Component", () => {
- //--------------------------------------------------------------------------------
- it("renders the basic fields and initial station/system listings", async () => {
- render(
-
-
-
- );
-
- // Waiting for asynchronous tasks to complete
- await waitFor(() => {
- // Check if the specific elements are present after data processing
- expect(screen.getByRole("combobox")).toBeInTheDocument();
- expect(screen.getByLabelText("POIs")).toBeInTheDocument();
- expect(screen.getByRole("option", { name: "Station wählen" })).toBeInTheDocument();
- });
-
- // Optionally print out the full DOM for debugging
- screen.debug();
- });
- //--------------------------------------------------------------------------------
- test("should open dropdown on click", async () => {
- render(
-
-
-
- );
- const combobox = screen.getByRole("combobox");
- userEvent.click(combobox);
- // Überprüfe, ob die Dropdown-Optionen angezeigt werden
- expect(screen.getByRole("option", { name: "Station wählen" })).toBeInTheDocument();
- });
-
- //--------------------------------------------------------------------------------
- test("should toggle checkbox", async () => {
- render(
-
-
-
- );
- const checkbox = screen.getByLabelText("POIs");
- // Stelle sicher, dass die Checkbox nicht angekreuzt ist
- expect(checkbox).not.toBeChecked();
- // Klicke auf die Checkbox
- userEvent.click(checkbox);
- // Jetzt sollte sie angekreuzt sein
- expect(checkbox).toBeChecked();
- });
-
- //--------------------------------------------------------------------------------
-});
diff --git a/__tests__/unit/components/MapComponent.test.js b/__tests__/unit/components/MapComponent.test.js
deleted file mode 100644
index ea9be1af6..000000000
--- a/__tests__/unit/components/MapComponent.test.js
+++ /dev/null
@@ -1,89 +0,0 @@
-// __tests__/MapComponent.test.js
-
-// Ein einfacher Testfall, der sicherstellt, dass die Addition korrekt ist
-test("simple addition", () => {
- const a = 1;
- const b = 2;
- const c = a + b;
- expect(c).toBe(3); // Überprüft, ob c gleich 3 ist
-});
-
-//import L from "leaflet";
-//import { checkOverlappingMarkers } from "../utils/mapUtils"; // Passe den Pfad entsprechend an
-
-/* describe("checkOverlappingMarkers", () => {
- let map;
-
- beforeEach(() => {
- // Erstelle eine neue Leaflet-Karte für jeden Test
- map = L.map(document.createElement("div"));
- });
-
- it("should group markers by coordinates and add plus icons for overlapping markers", () => {
- // Erstelle einige Beispielmarker
- const markers = [
- L.marker([51.505, -0.09]),
- L.marker([51.505, -0.09]),
- L.marker([51.51, -0.1]),
- ];
-
- const plusIcon = L.divIcon({ className: "plus-icon" });
-
- // Rufe die Funktion auf
- checkOverlappingMarkers(map, markers, plusIcon);
-
- // Überprüfe, dass die Marker zu Gruppen hinzugefügt wurden
- const overlappingGroups = map._layers;
- expect(Object.keys(overlappingGroups).length).toBeGreaterThan(0);
-
- // Überprüfe, dass die Plus-Marker hinzugefügt wurden
- const plusMarkers = Object.values(overlappingGroups).filter(
- (layer) =>
- layer.options.icon &&
- layer.options.icon.options.className === "plus-icon"
- );
- expect(plusMarkers.length).toBeGreaterThan(0);
- });
-
- it("should handle non-array markers argument gracefully", () => {
- const plusIcon = L.divIcon({ className: "plus-icon" });
-
- // Rufe die Funktion mit einem ungültigen Argument auf
- checkOverlappingMarkers(map, null, plusIcon);
-
- // Stelle sicher, dass keine Marker hinzugefügt wurden
- const layers = map._layers;
- expect(Object.keys(layers).length).toBe(0);
- });
-
- it("should not add plus markers if there are no overlaps", () => {
- // Erstelle einige Beispielmarker
- const markers = [
- L.marker([51.505, -0.09]),
- L.marker([51.51, -0.1]),
- L.marker([51.52, -0.12]),
- ];
-
- const plusIcon = L.divIcon({ className: "plus-icon" });
-
- // Rufe die Funktion auf
- checkOverlappingMarkers(map, markers, plusIcon);
-
- // Überprüfe, dass keine Plus-Marker hinzugefügt wurden
- const plusMarkers = Object.values(map._layers).filter(
- (layer) =>
- layer.options.icon &&
- layer.options.icon.options.className === "plus-icon"
- );
- expect(plusMarkers.length).toBe(0);
- });
-}); */
-/*
-In diesem Test:
-
-Wird eine neue Leaflet-Karte vor jedem Test erstellt.
-checkOverlappingMarkers wird aufgerufen, um zu überprüfen, ob die Funktion die Marker richtig gruppiert und Plus-Icons für überlappende Marker hinzufügt.
-Der Test überprüft auch, ob die Funktion ungültige Argumente (wie null für Marker) korrekt behandelt.
-Es wird sichergestellt, dass keine Plus-Marker hinzugefügt werden, wenn keine Überlappungen vorliegen.
-Stelle sicher, dass du die Pfade und Importe entsprechend deiner Projektstruktur anpasst.
-*/
diff --git a/__tests__/unit/components/gisPolylines/icons/CircleIcon.test.js b/__tests__/unit/components/gisPolylines/icons/CircleIcon.test.js
deleted file mode 100644
index efc9e485e..000000000
--- a/__tests__/unit/components/gisPolylines/icons/CircleIcon.test.js
+++ /dev/null
@@ -1,40 +0,0 @@
-// __tests__/components/gisPolylines/icons/CircleIcon.test.js
-jest.mock("leaflet", () => {
- const actualLeaflet = jest.requireActual("leaflet");
- return {
- ...actualLeaflet,
- DivIcon: jest.fn().mockImplementation((options) => ({
- ...options,
- options,
- _leaflet_id: Math.random(),
- })),
- };
-});
-
-import L from "leaflet";
-import CircleIcon from "../../../components/gisPolylines/icons/CircleIcon";
-
-describe("CircleIcon", () => {
- test("should be a Leaflet divIcon with correct properties", () => {
- // console.log("CircleIcon options:", CircleIcon.options);
- expect(CircleIcon).toEqual(
- expect.objectContaining({
- options: expect.objectContaining({
- className: "custom-circle-icon leaflet-marker-icon",
- html: '
',
- iconSize: [25, 25],
- iconAnchor: [5, 5],
- }),
- })
- );
- expect(CircleIcon.options.className).toContain("custom-circle-icon");
- expect(CircleIcon.options.html).toContain(" {
- const actualLeaflet = jest.requireActual("leaflet");
- return {
- ...actualLeaflet,
- DivIcon: jest.fn().mockImplementation((options) => ({
- ...options,
- options,
- _leaflet_id: Math.random(),
- })),
- };
-});
-
-import L from "leaflet";
-import EndIcon from "../../../../components/gisPolylines/icons/EndIcon";
-//console.log("console log EndIcon: ", EndIcon);
-describe("endIcon", () => {
- test("should be a custom-end-icon with correct HTML and styles", () => {
- expect(EndIcon.options.className).toBe("custom-end-icon");
- expect(EndIcon.options.html).toBe("
");
- expect(EndIcon.options.iconSize).toEqual([14, 14]);
- expect(EndIcon.options.iconAnchor).toEqual([7, 7]);
- });
-});
diff --git a/__tests__/unit/components/gisPolylines/icons/StartIcon.test.js b/__tests__/unit/components/gisPolylines/icons/StartIcon.test.js
deleted file mode 100644
index 2769119ea..000000000
--- a/__tests__/unit/components/gisPolylines/icons/StartIcon.test.js
+++ /dev/null
@@ -1,41 +0,0 @@
-// __tests__/components/gisPolylines/icons/StartIcon.test.js
-jest.mock("leaflet", () => {
- const actualLeaflet = jest.requireActual("leaflet");
- return {
- ...actualLeaflet,
- DivIcon: jest.fn().mockImplementation((options) => ({
- ...options,
- options,
- _leaflet_id: Math.random(),
- _createIcon: jest.fn(),
- _createImg: jest.fn(),
- _getIconUrl: jest.fn(),
- _initHooks: [],
- _initHooksCalled: true,
- _setIconStyles: jest.fn(),
- callInitHooks: jest.fn(),
- createIcon: jest.fn(),
- createShadow: jest.fn(),
- initialize: jest.fn(),
- })),
- };
-});
-
-import L from "leaflet";
-import StartIcon from "../../../../../components/gisPolylines/icons/StartIcon";
-
-describe("StartIcon", () => {
- test("should be a Leaflet divIcon with correct properties", () => {
- //console.log("StartIcon options:", StartIcon.options);
- expect(StartIcon).toEqual(
- expect.objectContaining({
- options: expect.objectContaining({
- className: "custom-start-icon",
- html: expect.stringContaining("