File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
packages/compass-global-writes/src/store Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import type {
1313 ManagedNamespace ,
1414 ShardZoneMapping ,
1515} from '../services/atlas-global-writes-service' ;
16+ import { waitFor } from '@mongodb-js/testing-library-compass' ;
1617
1718const DB = 'test' ;
1819const COLL = 'coll' ;
@@ -153,8 +154,10 @@ describe('GlobalWritesStore Store', function () {
153154 } ,
154155 } ) ;
155156 await store . dispatch ( fetchClusterShardingData ( ) ) ;
156- // expect(store.getState().status).to.equal('SHARD_KEY_CORRECT'); // no idea why this does not work
157- expect ( store . getState ( ) . managedNamespace ) . to . equal ( managedNamespace ) ;
157+ await waitFor ( ( ) => {
158+ expect ( store . getState ( ) . status ) . to . equal ( 'SHARD_KEY_CORRECT' ) ;
159+ expect ( store . getState ( ) . managedNamespace ) . to . equal ( managedNamespace ) ;
160+ } ) ;
158161 } ) ;
159162
160163 it ( 'sends correct data to the server when creating a shard key' , async function ( ) {
You can’t perform that action at this time.
0 commit comments