Skip to content

Commit

Permalink
Updated e2e test for cache-metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
dpanshug committed Oct 4, 2022
1 parent 42349c0 commit 3aa743c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cypress/e2e/cache-metrics.cy.js
Expand Up @@ -3,26 +3,26 @@ describe('Cache Metrics Overview', () => {
cy.login(Cypress.env("username"), Cypress.env("password"), '/cache/people');
//Check for Labels
cy.contains('Metrics (Enabled)').click();
cy.contains('Current number of entries');
cy.contains('Approximate number of entries');
cy.contains('Minimum number of nodes');
cy.contains('Size of cache in off-heap memory');
cy.contains('Size of cache in heap memory');

// Check for data greater than -1
cy.get('dt[aria-label="view-cache-metrics-size"]').invoke('text').then(parseFloat).should('be.gt', -1)
cy.get('dt[aria-label="view-cache-approximate-unique-entries"]').invoke('text').then(parseFloat).should('be.gt', -1)
cy.get('dt[aria-label="view-cache-metrics-nodes"]').invoke('text').then(parseFloat).should('be.gt', -1)
})

it('successfully checks cache metrics for heap memory', () => {
cy.login(Cypress.env("username"), Cypress.env("password"), '/cache/heap-test');
cy.contains('Metrics (Enabled)').click();
cy.contains('Size of cache in heap memory');
cy.get('dt[aria-label="view-cache-metrics-heap"]').invoke('text').then(parseFloat).should('be.gt', -1)

})

it('successfully checks cache metrics for off-heap memory', () => {
cy.login(Cypress.env("username"), Cypress.env("password"), '/cache/off-heap-test');
cy.contains('Metrics (Enabled)').click();
cy.contains('Size of cache in off-heap memory');
cy.get('dt[aria-label="view-cache-metrics-off-heap"]').invoke('text').then(parseFloat).should('be.gt', -1)
})

Expand Down

0 comments on commit 3aa743c

Please sign in to comment.