From d0556f87a2b9ee0d347a51cc8896ca6630cfce6d Mon Sep 17 00:00:00 2001 From: rjohanek Date: Fri, 22 Nov 2024 14:59:11 -0500 Subject: [PATCH] try to fix test --- cypress/component/DataSearch/dataset_search_table.spec.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cypress/component/DataSearch/dataset_search_table.spec.js b/cypress/component/DataSearch/dataset_search_table.spec.js index c6cf7b5a5..9687ea18e 100644 --- a/cypress/component/DataSearch/dataset_search_table.spec.js +++ b/cypress/component/DataSearch/dataset_search_table.spec.js @@ -3,6 +3,7 @@ import {React} from 'react'; import {mount} from 'cypress/react'; import DatasetSearchTable from '../../../src/components/data_search/DatasetSearchTable'; import {TerraDataRepo} from '../../../src/libs/ajax/TerraDataRepo'; +import {DataSet} from '../../../src/libs/ajax/DataSet'; const datasets = [ { @@ -29,6 +30,7 @@ describe('Dataset Search Table tests', () => { beforeEach(() => { cy.initApplicationConfig(); cy.stub(TerraDataRepo, 'listSnapshotsByDatasetIds').returns({}); + cy.stub(DataSet, 'searchDatasetIndex').returns({}); mount(); }); @@ -67,18 +69,18 @@ describe('Dataset Search Table tests', () => { {method: 'POST', url: '**/api/dataset/search/index'}, handler); mount(); cy.get('#participantCountMax-range-input').clear().type('50'); - cy.wait(1000).then(() => { + cy.wait(1500).then(() => { expect(filtered).to.be.true; }); }); - it('When an invalid participant count filter is applied the query represents the default value', () => { + it('When an invalid participant count filter is applied the query represents the default value', () => { searchText = '{"range":{"participantCount":{"gte":100,"lte":null}}}'; cy.intercept({method: 'POST', url: '**/api/dataset/search/index'}, handler); mount(); cy.get('#participantCountMin-range-input').clear().type('test'); - cy.wait(1000).then(() => { + cy.wait(1500).then(() => { expect(filtered).to.be.true; }); });