From f9e0a6d6e5a26e898ce71aa0920a1cbcb86efac8 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Wed, 2 Nov 2022 17:54:05 -0700 Subject: [PATCH] Add test cases for filter of aggregation view feature (#357) (#364) Signed-off-by: Ryan Liang Signed-off-by: Ryan Liang (cherry picked from commit 37134e97372709057bd17b1bf2e205c1766d5727) Co-authored-by: Ryan Liang <109499885+RyanL1997@users.noreply.github.com> --- .../aggregation_view.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/cypress/integration/plugins/security-dashboards-plugin/aggregation_view.js b/cypress/integration/plugins/security-dashboards-plugin/aggregation_view.js index 8c5750a96..f8c9b9c44 100644 --- a/cypress/integration/plugins/security-dashboards-plugin/aggregation_view.js +++ b/cypress/integration/plugins/security-dashboards-plugin/aggregation_view.js @@ -69,6 +69,23 @@ if (Cypress.env('SECURITY_ENABLED') && Cypress.env('AGGREGATION_VIEW')) { cy.contains('a', 'se*'); }); + it('should check the saved objects by applying filter', () => { + CURRENT_TENANT.newTenant = 'global'; + cy.visit(SAVED_OBJECTS_PATH); + cy.contains('a', 'Saved objects'); + + cy.get('span[title="Tenant"]').first().click({ force: true }); + cy.get('span').contains('Private').click(); + cy.contains('a', 's*'); + cy.contains('a', 'se*').should('not.exist'); + + cy.wait(3000); + + cy.get('span').contains('test').click(); + cy.contains('a', 's*'); + cy.contains('a', 'se*'); + }); + it('should login as test1 and check saved object', () =>{ CURRENT_TENANT.newTenant = 'private'; ADMIN_AUTH.newUser = userName1;