Skip to content

Commit

Permalink
fails locally, but just curious if it will pass on the server
Browse files Browse the repository at this point in the history
  • Loading branch information
raejohanek committed Nov 25, 2024
1 parent 2417d78 commit af1a501
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cypress/component/DataSearch/dataset_search_table.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(<DatasetSearchTable {...props} />);
// 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');
Expand Down

0 comments on commit af1a501

Please sign in to comment.