From af1a5018b092731a599491090ba0753fe16ec17d Mon Sep 17 00:00:00 2001 From: rjohanek Date: Mon, 25 Nov 2024 12:52:07 -0500 Subject: [PATCH] fails locally, but just curious if it will pass on the server --- cypress/component/DataSearch/dataset_search_table.spec.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cypress/component/DataSearch/dataset_search_table.spec.js b/cypress/component/DataSearch/dataset_search_table.spec.js index 0af56e69c..85b9e0742 100644 --- a/cypress/component/DataSearch/dataset_search_table.spec.js +++ b/cypress/component/DataSearch/dataset_search_table.spec.js @@ -64,13 +64,12 @@ describe('Dataset Search Table tests', () => { it('When a participant count filter is applied the query is updated', () => { cy.intercept( {method: 'POST', url: '**/api/dataset/search/index'}, (req) => { - return handler(req, '{"range":{"participantCount":{"gte":null,"lte":50}}}'); + // without clearing the default input, type('50') results in input of 10050 + return handler(req, '{"range":{"participantCount":{"gte":null,"lte":10050}}}'); }).as('searchIndex'); mount(); - // first clear the default value (100), without clearing first, type('50') would result in input of 10050 - cy.get('#participantCountMax-range-input').clear().type('50'); + cy.get('#participantCountMax-range-input').type('50'); // ignore first call, caused by .clear() - cy.wait('@searchIndex'); // this api call, caused by .type('50'), should have had a request that contained the searchText cy.wait('@searchIndex').then((response) => { expect(response.response.body[0]).to.equal('filtered');