Skip to content

Commit dc8e2e4

Browse files
MatteoStifanoBenediktSeidl
authored andcommitted
New test to verify used-RAM panel by service in CRE
A new test to verify the correct display of the used-RAM graph using CRE is here introduced.
1 parent 1769b37 commit dc8e2e4

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

tests/cypress/e2e/spec.cy.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,5 +279,28 @@ describe('e2e tests', () => {
279279

280280
cy.contains("Could not find 'cmk_cpu_time_by_phase'").should('be.visible'); // Assert previous graph input not visible
281281
});
282+
it('Used-RAM panel by service (single host)', {}, () => {
283+
cy.passOnException('ResizeObserver loop limit exceeded');
284+
cy.inputLocatorById(inputDatasourceId).type('Checkmk ' + CmkCRE + '{enter}');
285+
cy.contains('Checkmk ' + CmkCRE).should('be.visible');
286+
287+
cy.inputLocatorById(inputSiteId).type('{enter}'); // Site -> All Sites (first entry)
288+
289+
cy.inputLocatorById(inputHostId).type('{enter}'); // Hostname -> hostName0 (first entry)
290+
cy.contains(hostName0).should('exist');
291+
292+
cy.inputLocatorById(inputServiceId).click(); // Service -> 'Memory'
293+
cy.contains('Memory').click();
294+
cy.contains('Memory').should('exist');
295+
296+
cy.inputLocatorById(inputGraphId).click(); // Predefined graph -> 'Used RAM'
297+
cy.contains('Used RAM').click();
298+
cy.contains('Used RAM').should('exist');
299+
300+
cy.assertLegendElement('RAM used %'); // TODO: Getting 'RAM used %'. Should the graph name match the metric?
301+
302+
cy.assertHoverSelectorsOff(1);
303+
cy.assertHoverSelectorsOn(1);
304+
});
282305
});
283306
});

0 commit comments

Comments
 (0)