Update IosUnitTests to use iPhone 11 simulator (flutter/engine#30090)

This commit is contained in:
Jenn Magder
2021-12-03 10:49:02 -08:00
committed by GitHub
parent 315f7b888f
commit cb6cd0a3e8
3 changed files with 7 additions and 6 deletions

View File

@@ -357,9 +357,10 @@ typedef enum UIAccessibilityContrast : NSInteger {
nibName:nil
bundle:nil];
mockEngine.viewController = viewController;
[viewController updateViewportMetrics];
flutter::ViewportMetrics viewportMetrics;
OCMVerify([mockEngine updateViewportMetrics:viewportMetrics]);
OCMExpect([mockEngine updateViewportMetrics:viewportMetrics]).ignoringNonObjectArgs();
[viewController updateViewportMetrics];
OCMVerifyAll(mockEngine);
}
- (void)testViewDidLoadDoesntInvokeEngineWhenNotTheViewController {

View File

@@ -15,9 +15,9 @@ After the `ios_test_flutter` target is built you can also run the tests inside
of Xcode with `testing/ios/IosUnitTests/IosUnitTests.xcodeproj`.
When you load the test project [IosUnitTests.xcodeproj](IosUnitTests.xcodeproj)
into XCode after running `run_tests.py`, only a few basic tests will appear
initially. You have to run the test suite once in XCode for the rest to appear.
Select "iPhone 8" as the device, and press `command-u` to start all the tests
into Xcode after running `run_tests.py`, only a few basic tests will appear
initially. You have to run the test suite once in Xcode for the rest to appear.
Select "iPhone 11" as the device, and press `command-u` to start all the tests
running. Once the tests are done running, the tests that ran will appear in the
sidebar, and you can pick the specific one you want to debug/run.

View File

@@ -387,7 +387,7 @@ def RunObjcTests(ios_variant='ios_debug_sim_unopt', test_filter=None):
'xcodebuild '
'-sdk iphonesimulator '
'-scheme IosUnitTests '
"-destination platform='iOS Simulator,name=iPhone 8' "
"-destination platform='iOS Simulator,name=iPhone 11' "
'test '
'FLUTTER_ENGINE=' + ios_variant
]