From 2b96b5060f8272935a47516033b15bf2b9cdae1a Mon Sep 17 00:00:00 2001 From: Lukas Mertens Date: Wed, 10 Apr 2024 16:05:38 +0200 Subject: [PATCH] test(e2e): added config-management test Signed-off-by: Lukas Mertens commit-id:2f10d1b6 --- cypress/e2e/config-management.cy.ts | 12 ++++++++++++ cypress/e2e/module-selection.cy.ts | 1 - 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 cypress/e2e/config-management.cy.ts diff --git a/cypress/e2e/config-management.cy.ts b/cypress/e2e/config-management.cy.ts new file mode 100644 index 00000000..685d1c61 --- /dev/null +++ b/cypress/e2e/config-management.cy.ts @@ -0,0 +1,12 @@ +import {faker} from "@faker-js/faker"; + +describe("ConfigManagement", () => { + it('should be possible to create and save a new config', () => { + cy.connectToSimulator(); + const configName = faker.word.words(1); + cy.createConfig(configName); + cy.get('#config-save-button').click(); + cy.get('[data-cy="configs-expansion-panel"]').click(); + cy.get('[data-cy="config-list-item"]').contains(configName).should('be.visible'); + }); +}); diff --git a/cypress/e2e/module-selection.cy.ts b/cypress/e2e/module-selection.cy.ts index b65025da..942af119 100644 --- a/cypress/e2e/module-selection.cy.ts +++ b/cypress/e2e/module-selection.cy.ts @@ -7,7 +7,6 @@ describe('Module Selection', () => { it('should be possible to search for EvseManager', () => { cy.connectToSimulator(); cy.createConfig(faker.word.words(1)); - cy.get('[data-cy="modules-expansion-panel"]').click(); cy.get('[data-cy="modules-search"]').type("EvseManager"); cy.get('[data-cy="module-list-item"]').contains("EvseManager").should('be.visible'); cy.get('[data-cy="modules-search"]').type("{selectall}{backspace}LoremIpsumDolorModule");