This repository was archived by the owner on Aug 8, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed
platform/ios/Integration Tests Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -801,6 +801,7 @@ - (void)waitFor:(NSTimeInterval)seconds {
801801- (void )waitForCollisionDetectionToRun {
802802 XCTAssertNil (self.renderFinishedExpectation , @" Incorrect test setup" );
803803
804+ [self .mapView setNeedsRerender ];
804805 self.renderFinishedExpectation = [self expectationWithDescription: @" Map view should be rendered" ];
805806 XCTestExpectation *timerExpired = [self expectationWithDescription: @" Timer expires" ];
806807
Original file line number Diff line number Diff line change 2626
2727@interface MGLMapViewIntegrationTest : XCTestCase <MGLMapViewDelegate>
2828@property (nonatomic ) MGLMapView *mapView;
29+ @property (nonatomic ) UIWindow *window;
2930@property (nonatomic ) MGLStyle *style;
3031@property (nonatomic ) XCTestExpectation *styleLoadingExpectation;
3132@property (nonatomic ) XCTestExpectation *renderFinishedExpectation;
Original file line number Diff line number Diff line change @@ -44,9 +44,9 @@ - (void)setUp {
4444
4545 UIView *superView = [[UIView alloc ] initWithFrame: UIScreen.mainScreen.bounds];
4646 [superView addSubview: self .mapView];
47- UIWindow * window = [[UIWindow alloc ] initWithFrame: UIScreen.mainScreen.bounds];
48- [window addSubview: superView];
49- [window makeKeyAndVisible ];
47+ self. window = [[UIWindow alloc ] initWithFrame: UIScreen.mainScreen.bounds];
48+ [self . window addSubview: superView];
49+ [self . window makeKeyAndVisible ];
5050
5151 if (!self.mapView .style ) {
5252 [self waitForMapViewToFinishLoadingStyleWithTimeout: 10 ];
@@ -58,6 +58,7 @@ - (void)tearDown {
5858 self.renderFinishedExpectation = nil ;
5959 self.mapView = nil ;
6060 self.style = nil ;
61+ self.window = nil ;
6162 [MGLAccountManager setAccessToken: nil ];
6263
6364 [super tearDown ];
@@ -137,6 +138,7 @@ - (void)waitForMapViewToBeRenderedWithTimeout:(NSTimeInterval)timeout {
137138 [self .mapView setNeedsRerender ];
138139 self.renderFinishedExpectation = [self expectationWithDescription: @" Map view should be rendered" ];
139140 [self waitForExpectations: @[self .renderFinishedExpectation] timeout: timeout];
141+ self.renderFinishedExpectation = nil ;
140142}
141143
142144- (void )waitForExpectations : (NSArray <XCTestExpectation *> *)expectations timeout : (NSTimeInterval )seconds {
You can’t perform that action at this time.
0 commit comments