diff --git a/cypress/e2e/module-selection.cy.ts b/cypress/e2e/module-selection.cy.ts index 210611d4..942af119 100644 --- a/cypress/e2e/module-selection.cy.ts +++ b/cypress/e2e/module-selection.cy.ts @@ -1,10 +1,12 @@ // SPDX-License-Identifier: Apache-2.0 // Copyright 2020 - 2024 Pionix GmbH and Contributors to EVerest +import {faker} from "@faker-js/faker"; + describe('Module Selection', () => { it('should be possible to search for EvseManager', () => { cy.connectToSimulator(); - cy.get('[data-cy="modules-expansion-panel"]').click(); + cy.createConfig(faker.word.words(1)); 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"); diff --git a/cypress/support/commands.ts b/cypress/support/commands.ts index 48ede8e7..4b734ba1 100644 --- a/cypress/support/commands.ts +++ b/cypress/support/commands.ts @@ -7,6 +7,7 @@ declare global { namespace Cypress { interface Chainable { connectToSimulator(): Chainable; + createConfig(name: string): Chainable; } } } @@ -15,4 +16,10 @@ Cypress.Commands.add('connectToSimulator', () => { cy.visit('/'); cy.get('[data-cy="server-list-item').contains('Simulator').click(); cy.get('[data-cy="hamburger-menu"]').should('be.visible'); -}) +}); + +Cypress.Commands.add('createConfig', (name) => { + cy.get('[data-cy="plus-create-config-btn"]').click(); + cy.get('[data-cy="config-name-input"]').type(name); + cy.get('[data-cy="accept-create-config-btn"]').click(); +}); diff --git a/src/components/CreateConfig.vue b/src/components/CreateConfig.vue new file mode 100644 index 00000000..51b16cc3 --- /dev/null +++ b/src/components/CreateConfig.vue @@ -0,0 +1,107 @@ + + + + + + + + + diff --git a/src/components/EvModuleList.vue b/src/components/EvModuleList.vue index 0a0f252a..57e469b0 100644 --- a/src/components/EvModuleList.vue +++ b/src/components/EvModuleList.vue @@ -2,8 +2,8 @@ Copyright 2020 - 2024 Pionix GmbH and Contributors to EVerest -->