From 9f8c207b46e520d8d9f48bc7372b186af68123dd Mon Sep 17 00:00:00 2001 From: mattwr18 Date: Fri, 20 Dec 2019 15:39:13 +0100 Subject: [PATCH] Try using Esc to clear previous search --- cypress/integration/common/search.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cypress/integration/common/search.js b/cypress/integration/common/search.js index d6d06a77d..2b2dbc8b7 100644 --- a/cypress/integration/common/search.js +++ b/cypress/integration/common/search.js @@ -16,7 +16,9 @@ Then("the search has no results", () => { expect($li).to.have.length(1); }); cy.get(".ds-select-dropdown").should("contain", 'Nothing found'); - cy.get(".search-clear-btn").trigger("click", { force: true }); + cy.get("#search-resources") + .focus() + .type("{esc}"); }); Then("I should see the following posts in the select dropdown:", table => {