From 80f7e303c51120f4044c4546f77ff99b01432dbc Mon Sep 17 00:00:00 2001 From: tplevko Date: Thu, 10 Oct 2024 11:08:54 +0200 Subject: [PATCH] e2e(992): test for consumer/producer properties in the CanvasForm --- .../producerConsumerConf.cy.ts | 20 +++++++++++++++++++ .../flows/camelRoute/consumerProducer.yaml | 11 ++++++++++ 2 files changed, 31 insertions(+) create mode 100644 packages/ui-tests/cypress/e2e/designer/sidepanelConfig/producerConsumerConf.cy.ts create mode 100644 packages/ui-tests/cypress/fixtures/flows/camelRoute/consumerProducer.yaml diff --git a/packages/ui-tests/cypress/e2e/designer/sidepanelConfig/producerConsumerConf.cy.ts b/packages/ui-tests/cypress/e2e/designer/sidepanelConfig/producerConsumerConf.cy.ts new file mode 100644 index 000000000..c6da5283a --- /dev/null +++ b/packages/ui-tests/cypress/e2e/designer/sidepanelConfig/producerConsumerConf.cy.ts @@ -0,0 +1,20 @@ +describe('Tests for producer/consumer sidebar config', () => { + beforeEach(() => { + cy.openHomePage(); + }); + + it('Check if producer/consumer properties are allowed or forbidden on route nodes', () => { + cy.uploadFixture('flows/camelRoute/consumerProducer.yaml'); + cy.openDesignPage(); + + cy.openStepConfigurationTab('amqp'); + cy.selectFormTab('All'); + cy.get('.pf-v5-c-expandable-section__toggle-text').contains('Consumer (advanced) properties').should('exist'); + cy.get('.pf-v5-c-expandable-section__toggle-text').contains('Producer (advanced) properties').should('not.exist'); + + cy.openStepConfigurationTab('activemq6'); + cy.selectFormTab('All'); + cy.get('.pf-v5-c-expandable-section__toggle-text').contains('Producer (advanced) properties').should('exist'); + cy.get('.pf-v5-c-expandable-section__toggle-text').contains('Consumer (advanced) properties').should('not.exist'); + }); +}); diff --git a/packages/ui-tests/cypress/fixtures/flows/camelRoute/consumerProducer.yaml b/packages/ui-tests/cypress/fixtures/flows/camelRoute/consumerProducer.yaml new file mode 100644 index 000000000..3b62a6e49 --- /dev/null +++ b/packages/ui-tests/cypress/fixtures/flows/camelRoute/consumerProducer.yaml @@ -0,0 +1,11 @@ +- route: + id: route-1921 + from: + id: from-2265 + uri: amqp + parameters: {} + steps: + - to: + id: to-9644 + uri: activemq6 + parameters: {}