describe('Kue705FO Integration Tests', () => { beforeEach(() => { // Besuche die Seite, auf der die Komponente gerendert wird //cy.visit('/path-to-your-component'); // Passe den Pfad an deine App an cy.visit('http://localhost:3000/kabelueberwachung'); }); it('should render the component with default props', () => { // Überprüfe, ob der Modulname und die Slotnummer angezeigt werden cy.contains('KÜ705-FO').should('be.visible'); cy.contains('Modul 1').should('be.visible'); // Beispiel für den Modulnamen }); it('should update display when TDR button is clicked', () => { // Klicke auf den TDR-Button cy.contains('TDR').click(); // Überprüfe, ob der Text aktualisiert wurde cy.contains('Entfernung [Km]').should('be.visible'); }); it('should switch back to Schleife display', () => { // Klicke auf TDR, dann zurück zu Schleife cy.contains('TDR').click(); cy.contains('Schleife').click(); // Überprüfe, ob der Text aktualisiert wurde cy.contains('Schleifenwiderstand [kOhm]').should('be.visible'); }); it('should disable TDR button when tdrActive is 0', () => { // Dies erfordert eine benutzerdefinierte Backend-Konfiguration oder Redux-Manipulation cy.contains('TDR').should('be.disabled'); }); it('should open and close the settings modal', () => { // Öffne das Modal cy.contains('⚙').click(); cy.contains('KUE Einstellung - Slot 1').should('be.visible'); // Schließe das Modal cy.contains('×').click(); cy.contains('KUE Einstellung - Slot 1').should('not.exist'); }); });