Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Commit

Permalink
Add rename route test
Browse files Browse the repository at this point in the history
  • Loading branch information
tplevko authored and lordrip committed Jul 21, 2023
1 parent dae156c commit 719b350
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions cypress/e2e/11-multi_flow/canvas_multi_flow.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,30 @@ describe('Test for Multi route actions from the canvas', () => {
cy.get('[data-testid^="rf__node-node_0"]').should('have.length', 0);
});

it('User renames routes', () => {
cy.uploadFixture('IntegrationMultiFlow.yaml');
cy.get('[data-testid="flows-list-route-count"]').should("have.text", "1/2");

cy.get('[data-testid=flows-list-dropdown]').click();
cy.get('[data-testid=goto-btn-route-1234--edit]').click();
cy.get('[data-testid=goto-btn-route-1234--text-input]').dblclick();
cy.get('[data-testid=goto-btn-route-1234--text-input]').clear().type('route-4321');

cy.get('div.pf-c-form__helper-text').should("have.text", "Name must be unique")

cy.get('[data-testid=goto-btn-route-1234--text-input]').dblclick();
cy.get('[data-testid=goto-btn-route-1234--text-input]').clear().type('test 2');

cy.get('div.pf-c-form__helper-text').should("have.text", "Name should only contain lowercase letters, numbers, and dashes")

cy.get('[data-testid=goto-btn-route-1234--text-input]').dblclick();
cy.get('[data-testid=goto-btn-route-1234--text-input]').clear().type('test3');
cy.get('[data-testid=goto-btn-route-1234--save]').click();

cy.checkCodeSpanLine('id: test3');
cy.checkCodeSpanLine('id: route-1234', 0);
});

it('User deletes routes in the canvas till there are no routes', () => {
cy.switchIntegrationType('Integration');
cy.createNewRoute();
Expand Down

0 comments on commit 719b350

Please sign in to comment.