Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 334e1db

Browse files
committed
try with keyValueObservingExpectationForObject instead
1 parent 624f2fc commit 334e1db

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

testing/scenario_app/ios/Scenarios/ScenariosTests/AppLifecycleTests.m

+5-4
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,10 @@ - (void)ensureApplicationIsInActiveState {
5151
[UIApplication sharedApplication].applicationState);
5252
// Don't have to inspect the notification since the typed notification itself indicates the
5353
// desired state.
54-
[self expectationForNotification:UIApplicationDidBecomeActiveNotification
55-
object:self
56-
handler:nil];
54+
// [self expectationForNotification:UIApplicationDidBecomeActiveNotification
55+
// object:self
56+
// handler:nil];
57+
[self keyValueObservingExpectationForObject:[UIApplication sharedApplication] keyPath:@"applicationState" expectedValue:nil];
5758
[self waitForExpectationsWithTimeout:30.0 handler:nil];
5859
}
5960
XCTAssertEqual([UIApplication sharedApplication].applicationState, UIApplicationStateActive);
@@ -201,7 +202,7 @@ - (void)testDismissedFlutterViewControllerNotRespondingToApplicationLifecycle {
201202
[engine destroyContext];
202203
}
203204

204-
- (void)VisibleFlutterViewControllerRespondsToApplicationLifecycle {
205+
- (void)testVisibleFlutterViewControllerRespondsToApplicationLifecycle {
205206
XCTestExpectation* engineStartedExpectation = [self expectationWithDescription:@"Engine started"];
206207

207208
// Let the engine finish booting (at the end of which the channels are properly set-up) before

0 commit comments

Comments
 (0)