|
| 1 | +/** |
| 2 | + * Check that SSL attributes in JGroups are shown as expected |
| 3 | + */ |
| 4 | +describe("TESTS: JGroups => SSL configuration", () => { |
| 5 | + let managementEndpoint: string; |
| 6 | + |
| 7 | + /** |
| 8 | + * Start server with standalone-ha-insecure.xml |
| 9 | + */ |
| 10 | + before(function () { |
| 11 | + cy.startWildflyContainer({ configuration: "standalone-ha-insecure.xml" }).then((result) => { |
| 12 | + managementEndpoint = result as string; |
| 13 | + }); |
| 14 | + }); |
| 15 | + |
| 16 | + /** |
| 17 | + * stop server |
| 18 | + */ |
| 19 | + after(() => { |
| 20 | + cy.task("stop:containers"); |
| 21 | + }); |
| 22 | + |
| 23 | + /** |
| 24 | + * Check that SSL Context attributes are shown in TCP transport settings |
| 25 | + */ |
| 26 | + it("TCP test", () => { |
| 27 | + cy.navigateTo(managementEndpoint, "jgroups"); |
| 28 | + cy.get('#jgroups-stack-item a.clickable').click(); |
| 29 | + cy.get('#jgroups-stack-table') |
| 30 | + .contains('tr', 'tcp') |
| 31 | + .contains('button', 'Transport') |
| 32 | + .click(); |
| 33 | + cy.get('#transport-form-links') |
| 34 | + .find('a[data-operation="edit"]') |
| 35 | + .should('be.visible') |
| 36 | + .click(); |
| 37 | + cy.get('[data-form-item-group="transport-form-client-ssl-context-editing"]') |
| 38 | + .should('exist') |
| 39 | + .within(() => { |
| 40 | + cy.get('label').should('contain.text', 'Client SSL Context'); |
| 41 | + cy.get('input').should('have.attr', 'type', 'password'); |
| 42 | + }); |
| 43 | + cy.get('[data-form-item-group="transport-form-server-ssl-context-editing"]') |
| 44 | + .should('exist') |
| 45 | + .within(() => { |
| 46 | + cy.get('label').should('contain.text', 'Server SSL Context'); |
| 47 | + cy.get('input').should('have.attr', 'type', 'password'); |
| 48 | + }); |
| 49 | + }); |
| 50 | + |
| 51 | + /** |
| 52 | + * Check that SSL Context attributes are not shown in UDP transport settings |
| 53 | + */ |
| 54 | + it("UDP test", () => { |
| 55 | + cy.navigateTo(managementEndpoint, "jgroups"); |
| 56 | + cy.get('#jgroups-stack-item a.clickable').click(); |
| 57 | + cy.get('#jgroups-stack-table') |
| 58 | + .contains('tr', 'udp') |
| 59 | + .contains('button', 'Transport') |
| 60 | + .click(); |
| 61 | + cy.get('#transport-form-links') |
| 62 | + .find('a[data-operation="edit"]') |
| 63 | + .should('be.visible') |
| 64 | + .click(); |
| 65 | + cy.get('[data-form-item-group="transport-form-client-ssl-context-editing"]') |
| 66 | + .should('not.exist'); |
| 67 | + cy.get('[data-form-item-group="transport-form-server-ssl-context-editing"]') |
| 68 | + .should('not.exist'); |
| 69 | + }); |
| 70 | +}); |
0 commit comments