Skip to content

Commit

Permalink
Fix end to end tests for saptune
Browse files Browse the repository at this point in the history
  • Loading branch information
dottorblaster committed Aug 9, 2024
1 parent 6913a12 commit 2f0c5ba
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/e2e/cypress/e2e/hosts_overview.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,15 @@ context('Hosts Overview', () => {
});

it('should change the health to warning if saptune is not installed', () => {
cy.contains('button', '2').click();
cy.loadScenario(`host-${hostWithSap}-saptune-uninstalled`);
cy.contains('tr', hostWithSap).within(() => {
cy.get('td:nth-child(1) svg').should('have.class', 'fill-yellow-500');
});
});

it('should change the health to warning if saptune version is unsupported', () => {
cy.contains('button', '2').click();
cy.loadScenario(`host-${hostWithSap}-saptune-unsupported`);
cy.contains('tr', hostWithSap).within(() => {
cy.get('td:nth-child(1) svg').should('have.class', 'fill-yellow-500');
Expand Down Expand Up @@ -217,21 +219,23 @@ context('Hosts Overview', () => {
},
].forEach(({ state, scenario, health, icon }) => {
it(`should change the health to ${health} if saptune tuning state is ${state}`, () => {
cy.contains('button', '2').click();
cy.loadScenario(`host-${hostWithSap}-saptune-${scenario}`);
cy.contains('tr', hostWithSap).within(() => {
cy.get('td:nth-child(1) svg').should('have.class', icon);
});
});
});
});

describe('Health is changed to critical when the heartbeat is not sent', () => {
before(() => {
cy.visit('/hosts');
cy.task('stopAgentsHeartbeat');
});
it('should show health status of the entire cluster of 27 hosts with critical health', () => {
cy.get('.tn-health-container .tn-health-critical', {
timeout: 15000,
timeout: 30000,
}).should('contain', 27);
});

Expand Down

0 comments on commit 2f0c5ba

Please sign in to comment.