diff --git a/test/e2e/cypress/e2e/hana_cluster_details.cy.js b/test/e2e/cypress/e2e/hana_cluster_details.cy.js index be719253f0..463dd5f3e6 100644 --- a/test/e2e/cypress/e2e/hana_cluster_details.cy.js +++ b/test/e2e/cypress/e2e/hana_cluster_details.cy.js @@ -343,7 +343,7 @@ context('HANA cluster details', () => { }); describe('Check Execution', () => { - it('should forbid check execution when the correct user abilities are missing', () => { + it('should forbid check execution when the correct user abilities are missing in details and settings', () => { cy.get('@user').then((user) => { cy.createUserWithAbilities(user, []); cy.login(user.username, password); @@ -358,6 +358,16 @@ context('HANA cluster details', () => { cy.contains('span', 'You are not authorized for this action').should( 'be.visible' ); + + cy.visit(`/clusters/${availableHanaCluster.id}`); + + cy.contains('button', 'Start Execution').should('be.disabled'); + + cy.contains('button', 'Start Execution').click({ force: true }); + + cy.contains('span', 'You are not authorized for this action').should( + 'be.visible' + ); }); it('should enable check execution button when the correct user abilities are present', () => { diff --git a/test/e2e/cypress/e2e/host_details.cy.js b/test/e2e/cypress/e2e/host_details.cy.js index 063a167a2f..b3080b9d8b 100644 --- a/test/e2e/cypress/e2e/host_details.cy.js +++ b/test/e2e/cypress/e2e/host_details.cy.js @@ -492,7 +492,7 @@ context('Host Details', () => { }); describe('Check Execution', () => { - it('should forbid check execution when the correct user abilities are not present', () => { + it('should forbid check execution when the correct user abilities are not present in both settings and details', () => { cy.get('@user').then((user) => { cy.createUserWithAbilities(user, []); cy.login(user.username, password); @@ -503,6 +503,15 @@ context('Host Details', () => { cy.contains('button', 'Start Execution').click({ force: true }); + cy.contains('span', 'You are not authorized for this action').should( + 'be.visible' + ); + cy.visit(`/hosts/${selectedHost.agentId}`); + + cy.contains('button', 'Start Execution').should('be.disabled'); + + cy.contains('button', 'Start Execution').click({ force: true }); + cy.contains('span', 'You are not authorized for this action').should( 'be.visible' );