diff --git a/dev/integration_tests/flutter_gallery/ios/GalleryUITests/GalleryUITests.m b/dev/integration_tests/flutter_gallery/ios/GalleryUITests/GalleryUITests.m index 8d36f2861f..92dde33f29 100644 --- a/dev/integration_tests/flutter_gallery/ios/GalleryUITests/GalleryUITests.m +++ b/dev/integration_tests/flutter_gallery/ios/GalleryUITests/GalleryUITests.m @@ -5,20 +5,22 @@ #import @interface GalleryUITests : XCTestCase +@property (strong) XCUIApplication *app; @end @implementation GalleryUITests - (void)setUp { self.continueAfterFailure = NO; + + XCUIApplication *app = [[XCUIApplication alloc] init]; + [app launch]; + self.app = app; } - (void)testLaunch { - XCUIApplication *app = [[XCUIApplication alloc] init]; - [app launch]; - // Basic smoke test that the app launched and any element was loaded. - XCTAssertTrue([app.otherElements.firstMatch waitForExistenceWithTimeout:60.0]); + XCTAssertTrue([self.app.otherElements.firstMatch waitForExistenceWithTimeout:60.0]); } @end