Merge pull request #2968 from NoelDeMartin/MOBILE-3833
MOBILE-3833: Expose ngZone service to automated tests
This commit is contained in:
		
						commit
						1145b3fa52
					
				| @ -12,17 +12,18 @@ | ||||
| // See the License for the specific language governing permissions and
 | ||||
| // limitations under the License.
 | ||||
| 
 | ||||
| import { ApplicationRef } from '@angular/core'; | ||||
| import { ApplicationRef, NgZone as NgZoneService } from '@angular/core'; | ||||
| import { CorePushNotifications, CorePushNotificationsProvider } from '@features/pushnotifications/services/pushnotifications'; | ||||
| import { CoreApp, CoreAppProvider } from '@services/app'; | ||||
| import { CoreCronDelegate, CoreCronDelegateService } from '@services/cron'; | ||||
| import { CoreCustomURLSchemes, CoreCustomURLSchemesProvider } from '@services/urlschemes'; | ||||
| import { Application } from '@singletons'; | ||||
| import { Application, NgZone } from '@singletons'; | ||||
| 
 | ||||
| type AutomatedTestsWindow = Window & { | ||||
|     appRef?: ApplicationRef; | ||||
|     appProvider?: CoreAppProvider; | ||||
|     cronProvider?: CoreCronDelegateService; | ||||
|     ngZone?: NgZoneService; | ||||
|     pushNotifications?: CorePushNotificationsProvider; | ||||
|     urlSchemes?: CoreCustomURLSchemesProvider; | ||||
| }; | ||||
| @ -31,6 +32,7 @@ function initializeAutomatedTestsWindow(window: AutomatedTestsWindow) { | ||||
|     window.appRef = Application.instance; | ||||
|     window.appProvider = CoreApp.instance; | ||||
|     window.cronProvider = CoreCronDelegate.instance; | ||||
|     window.ngZone = NgZone.instance; | ||||
|     window.pushNotifications = CorePushNotifications.instance; | ||||
|     window.urlSchemes = CoreCustomURLSchemes.instance; | ||||
| } | ||||
|  | ||||
| @ -1,7 +1,7 @@ | ||||
| @app @javascript @performance | ||||
| Feature: Measure performance. | ||||
| 
 | ||||
| Scenario: First Contentful Paint | ||||
|   Scenario: First Contentful Paint | ||||
|     Given I start measuring "First Contentful Paint" | ||||
|     When I launch the app runtime | ||||
|     Then I should find "Welcome to the Moodle App!" in the app | ||||
| @ -9,7 +9,7 @@ Scenario: First Contentful Paint | ||||
|     When I stop measuring "First Contentful Paint" | ||||
|     Then "First Contentful Paint" should have taken less than 6 seconds | ||||
| 
 | ||||
| Scenario: Time to Interactive | ||||
|   Scenario: Time to Interactive | ||||
|     Given I start measuring "Time to Interactive" | ||||
|     When I launch the app runtime | ||||
|     Then I should find "Welcome to the Moodle App!" in the app | ||||
| @ -21,7 +21,7 @@ Scenario: Time to Interactive | ||||
|     When I stop measuring "Time to Interactive" | ||||
|     Then "Time to Interactive" should have taken less than 7 seconds | ||||
| 
 | ||||
| Scenario: Total Blocking Time | ||||
|   Scenario: Total Blocking Time | ||||
|     Given I launch the app runtime | ||||
|     Then I should find "Welcome to the Moodle App!" in the app | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user