Skip to content

Commit

Permalink
revert last change
Browse files Browse the repository at this point in the history
  • Loading branch information
raejohanek committed Nov 25, 2024
1 parent af1a501 commit 24ca3b1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cypress/component/DataSearch/dataset_search_table.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,13 @@ 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) => {
// without clearing the default input, type('50') results in input of 10050
return handler(req, '{"range":{"participantCount":{"gte":null,"lte":10050}}}');
return handler(req, '{"range":{"participantCount":{"gte":null,"lte":50}}}');
}).as('searchIndex');
mount(<DatasetSearchTable {...props} />);
cy.get('#participantCountMax-range-input').type('50');
// 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');
// 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');
Expand Down

0 comments on commit 24ca3b1

Please sign in to comment.