File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -178,15 +178,18 @@ describe('Collective', function() {
178178 . contains ( 'li' , 'Preexisting Collective' )
179179 . find ( '.action-item__menutoggle' )
180180 . click ( { force : true } )
181+ cy . intercept ( 'PUT' , '**/apps/circles/circles/**/leave' ) . as ( 'leaveCircle' )
181182 cy . get ( 'button.action-button' )
182183 . contains ( 'Leave collective' )
183184 . click ( )
184185 cy . get ( '.app-navigation-entry' )
185186 . contains ( 'Preexisting Collective' )
186187 . should ( 'not.be.visible' )
187- cy . wait ( 10010 ) // eslint-disable-line cypress/no-unnecessary-waiting
188- cy . get ( '.app-navigation-entry' )
189- . should ( 'not.contain' , 'Preexisting Collective' )
188+ // Wait 10 extra seconds for the request (undo period)
189+ cy . wait ( '@leaveCircle' , { requestTimeout : Cypress . config ( 'requestTimeout' ) + 10010 } )
190+ cy . get ( '.app-navigation__list' )
191+ . contains ( 'Preexisting Collective' )
192+ . should ( 'not.exist' )
190193 } )
191194 } )
192195
You can’t perform that action at this time.
0 commit comments