From c12406fa3e0507695ce971f3edd64eb0e70e3317 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Mon, 17 Apr 2023 14:38:27 +0530 Subject: [PATCH] test: fixed failing UI test --- cypress/integration/folder_navigation.js | 3 +-- cypress/integration/sidebar.js | 2 +- cypress/support/commands.js | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cypress/integration/folder_navigation.js b/cypress/integration/folder_navigation.js index c5b3a44f0d..1f2f4dfe67 100644 --- a/cypress/integration/folder_navigation.js +++ b/cypress/integration/folder_navigation.js @@ -7,8 +7,7 @@ context("Folder Navigation", () => { it("Adding Folders", () => { //Adding filter to go into the home folder - cy.get(".filter-selector > .btn").findByText("1 filter").click(); - cy.findByRole("button", { name: "Clear Filters" }).click(); + cy.get(".filter-x-button").click(); cy.get(".filter-action-buttons > .text-muted").findByText("+ Add a Filter").click(); cy.get(".fieldname-select-area > .awesomplete > .form-control:last").type("Fol{enter}"); cy.get( diff --git a/cypress/integration/sidebar.js b/cypress/integration/sidebar.js index 0b2a21aa4f..0f97cdc7fe 100644 --- a/cypress/integration/sidebar.js +++ b/cypress/integration/sidebar.js @@ -53,7 +53,7 @@ context("Sidebar", () => { ); //To check if there is no filter added to the listview - cy.get(".filter-selector > .btn").should("contain", "Filter"); + cy.get(".filter-button").should("contain", "Filter"); //To add a filter to display data into the listview cy.get(".group-by-field.show > .dropdown-menu > .group-by-item > .dropdown-item").click(); diff --git a/cypress/support/commands.js b/cypress/support/commands.js index c067974d9f..4b44a24598 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -479,7 +479,7 @@ Cypress.Commands.add("click_listview_row_item_with_text", (text) => { }); Cypress.Commands.add("click_filter_button", () => { - cy.get(".filter-selector > .btn").click(); + cy.get(".filter-button").click(); }); Cypress.Commands.add("click_listview_primary_button", (btn_name) => {