Skip to content

Commit

Permalink
Add query and filter syncing up
Browse files Browse the repository at this point in the history
Signed-off-by: Qingyang(Abby) Hu <[email protected]>
  • Loading branch information
abbyhu2000 committed Sep 17, 2024
1 parent 0e11e06 commit ff85936
Showing 1 changed file with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,32 @@ describe('discover app', { scrollBehavior: false }, () => {

after(() => {});

describe('filters and queries', () => {
after(() => {
cy.get('[data-test-subj~="filter-key-extension.raw"]').click();
cy.getElementByTestId(`deleteFilter`).click();
cy.switchDiscoverTable('legacy');
});
it('should persist across refresh', function () {
// Set up query and filter
cy.setTopNavQuery('response:200');
cy.submitFilterFromDropDown('extension.raw', 'is one of', 'jpg');
cy.reload();
cy.getElementByTestId(`queryInput`).should('have.text', 'response:200');
cy.get('[data-test-subj~="filter-key-extension.raw"]').should(
'be.visible'
);
});

it('should persist across switching table', function () {
cy.switchDiscoverTable('new');
cy.getElementByTestId(`queryInput`).should('have.text', 'response:200');
cy.get('[data-test-subj~="filter-key-extension.raw"]').should(
'be.visible'
);
});
});

describe('save search', () => {
const saveSearch1 = 'Save Search # 1';
const saveSearch2 = 'Modified Save Search # 1';
Expand Down

0 comments on commit ff85936

Please sign in to comment.