Skip to content

Commit

Permalink
Updated the Discover Saved Search Tests
Browse files Browse the repository at this point in the history
Signed-off-by: Suchit Sahoo <[email protected]>
  • Loading branch information
LDrago27 committed Oct 4, 2024
1 parent fb85e41 commit e414dc4
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ describe('discover app', { scrollBehavior: false }, () => {
before(() => {
CURRENT_TENANT.newTenant = 'global';
cy.fleshTenantSettings();
// delete all saved searches
cy.deleteSavedObjectByType('search');

// import logstash functional
testFixtureHandler.importJSONDocIfNeeded(
indexSet,
Expand Down Expand Up @@ -61,7 +64,9 @@ describe('discover app', { scrollBehavior: false }, () => {
cy.fleshTenantSettings();
});

after(() => {});
after(() => {
cy.deleteSavedObjectByType('search');
});

describe('filters and queries', () => {
after(() => {
Expand Down Expand Up @@ -126,7 +131,7 @@ describe('discover app', { scrollBehavior: false }, () => {
it('should show the correct hit count', function () {
cy.loadSaveSearch(saveSearch2);
cy.setTopNavDate(DE_DEFAULT_START_TIME, DE_DEFAULT_END_TIME);
const expectedHitCount = '14,004';
const expectedHitCount = '12,891';
cy.verifyHitCount(expectedHitCount);
});

Expand Down Expand Up @@ -155,7 +160,7 @@ describe('discover app', { scrollBehavior: false }, () => {

// reset to persisted state
cy.getElementByTestId('resetSavedSearch').click();
const expectedHitCount = '14,004';
const expectedHitCount = '12,891';
cy.verifyHitCount(expectedHitCount);
});
});
Expand Down

0 comments on commit e414dc4

Please sign in to comment.