MOBILE-3833 behat: use ngZone
Using changeDetector caused some flaky tests throwing errors trying to use undefined variables. ngZone seems to work better.
This commit is contained in:
		
							parent
							
								
									55fdad447b
								
							
						
					
					
						commit
						3b5d57e02b
					
				@ -849,7 +849,7 @@ class behat_app extends behat_base {
 | 
				
			|||||||
        );
 | 
					        );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // Trigger Angular change detection
 | 
					        // Trigger Angular change detection
 | 
				
			||||||
        $session->executeScript($this->islegacy ? 'appRef.tick();' : 'changeDetector.detectChanges();');
 | 
					        $session->executeScript($this->islegacy ? 'appRef.tick();' : 'ngZone.run(() => {});');
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
@ -862,7 +862,7 @@ class behat_app extends behat_base {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        $this->spin(
 | 
					        $this->spin(
 | 
				
			||||||
            function() use ($session) {
 | 
					            function() use ($session) {
 | 
				
			||||||
                $session->executeScript($this->islegacy ? 'appRef.tick();' : 'changeDetector.detectChanges();');
 | 
					                $session->executeScript($this->islegacy ? 'appRef.tick();' : 'ngZone.run(() => {});');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                $nodes = $this->find_all('css', 'core-loading ion-spinner');
 | 
					                $nodes = $this->find_all('css', 'core-loading ion-spinner');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user