@@ -36,7 +36,7 @@ async function createGeoShardKey(
3636 await browser . clickVisible ( Selectors . GlobalWrites . ShardKeyFormSubmitButton ) ;
3737}
3838
39- async function waitForState (
39+ async function waitForGlobalWritesStatus (
4040 browser : CompassBrowser ,
4141 nextState : GeoShardingState
4242) {
@@ -82,15 +82,15 @@ describe('Global writes', function () {
8282 ) ;
8383
8484 // Initial state is loading
85- await waitForState ( browser , 'UNSHARDED' ) ;
85+ await waitForGlobalWritesStatus ( browser , 'UNSHARDED' ) ;
8686
8787 await createGeoShardKey ( browser , {
8888 secondShardKey : 'country' ,
8989 keyType : 'HASHED' ,
9090 } ) ;
9191
9292 // Wait for the shard key to be correct.
93- await waitForState ( browser , 'SHARD_KEY_CORRECT' ) ;
93+ await waitForGlobalWritesStatus ( browser , 'SHARD_KEY_CORRECT' ) ;
9494
9595 // Expectations to see the shard key in the UI
9696 const findingDocumentsText = await browser
@@ -108,7 +108,7 @@ describe('Global writes', function () {
108108 await browser . clickVisible ( Selectors . GlobalWrites . UnmanageNamespaceButton ) ;
109109
110110 // It transitions to the unmanaging state
111- await waitForState ( browser , 'UNSHARDED' ) ;
111+ await waitForGlobalWritesStatus ( browser , 'UNSHARDED' ) ;
112112 } ) ;
113113
114114 it ( 'should be able to shard an unsharded namespace and cancel the operation' , async function ( ) {
@@ -122,22 +122,22 @@ describe('Global writes', function () {
122122 ) ;
123123
124124 // Initial state is loading
125- await waitForState ( browser , 'UNSHARDED' ) ;
125+ await waitForGlobalWritesStatus ( browser , 'UNSHARDED' ) ;
126126
127127 await createGeoShardKey ( browser , {
128128 secondShardKey : 'country' ,
129129 keyType : 'UNIQUE' ,
130130 } ) ;
131131
132132 // Wait for the shard key to be correct.
133- await waitForState ( browser , 'SHARDING' ) ;
133+ await waitForGlobalWritesStatus ( browser , 'SHARDING' ) ;
134134
135135 // Cancel the sharding operation.
136136 await browser . clickConfirmationAction (
137137 Selectors . GlobalWrites . CancelShardingButton
138138 ) ;
139139
140140 // After its cancelled, it should transition back to the unsharded state
141- await waitForState ( browser , 'UNSHARDED' ) ;
141+ await waitForGlobalWritesStatus ( browser , 'UNSHARDED' ) ;
142142 } ) ;
143143} ) ;
0 commit comments