Reenable module_test_ios UI tests (#72145)

This commit is contained in:
Jenn Magder
2020-12-11 13:52:19 -08:00
committed by GitHub
parent a48a57d369
commit f123f64deb
2 changed files with 11 additions and 17 deletions

View File

@@ -7,7 +7,6 @@
@interface FlutterUITests : XCTestCase
@end
// TODO(jmagman): These tests has become flaky and are disabled in the test scheme. Fix https://github.com/flutter/flutter/issues/70630 and re-enable.
@implementation FlutterUITests
- (void)setUp {
@@ -20,9 +19,9 @@
[app.buttons[@"Full Screen (Cold)"] tap];
XCTAssertTrue([app.otherElements[@"Button tapped 0 times."] waitForExistenceWithTimeout:60.0]);
XCTAssertTrue([app.staticTexts[@"Button tapped 0 times."] waitForExistenceWithTimeout:60.0]);
[app.otherElements[@"Increment via Flutter"] tap];
XCTAssertTrue([app.otherElements[@"Button tapped 1 time."] waitForExistenceWithTimeout:60.0]);
XCTAssertTrue([app.staticTexts[@"Button tapped 1 time."] waitForExistenceWithTimeout:60.0]);
// Back navigation.
[app.buttons[@"POP"] tap];
@@ -35,9 +34,9 @@
[app.buttons[@"Full Screen (Warm)"] tap];
XCTAssertTrue([app.otherElements[@"Button tapped 0 times."] waitForExistenceWithTimeout:60.0]);
XCTAssertTrue([app.staticTexts[@"Button tapped 0 times."] waitForExistenceWithTimeout:60.0]);
[app.otherElements[@"Increment via Flutter"] tap];
XCTAssertTrue([app.otherElements[@"Button tapped 1 time."] waitForExistenceWithTimeout:60.0]);
XCTAssertTrue([app.staticTexts[@"Button tapped 1 time."] waitForExistenceWithTimeout:60.0]);
// Back navigation.
[app.buttons[@"POP"] tap];
@@ -50,9 +49,9 @@
[app.buttons[@"Flutter View (Warm)"] tap];
XCTAssertTrue([app.otherElements[@"Button tapped 0 times."] waitForExistenceWithTimeout:60.0]);
XCTAssertTrue([app.staticTexts[@"Button tapped 0 times."] waitForExistenceWithTimeout:60.0]);
[app.otherElements[@"Increment via Flutter"] tap];
XCTAssertTrue([app.otherElements[@"Button tapped 1 time."] waitForExistenceWithTimeout:60.0]);
XCTAssertTrue([app.staticTexts[@"Button tapped 1 time."] waitForExistenceWithTimeout:60.0]);
// Back navigation.
[app.buttons[@"POP"] tap];
@@ -66,15 +65,15 @@
[app.buttons[@"Hybrid View (Warm)"] tap];
XCTAssertTrue([app.staticTexts[@"Flutter button tapped 0 times."] waitForExistenceWithTimeout:60.0]);
XCTAssertTrue(app.otherElements[@"Platform button tapped 0 times."].exists);
XCTAssertTrue(app.staticTexts[@"Platform button tapped 0 times."].exists);
[app.otherElements[@"Increment via Flutter"] tap];
XCTAssertTrue([app.staticTexts[@"Flutter button tapped 1 time."] waitForExistenceWithTimeout:60.0]);
XCTAssertTrue(app.otherElements[@"Platform button tapped 0 times."].exists);
XCTAssertTrue(app.staticTexts[@"Platform button tapped 0 times."].exists);
[app.buttons[@"Increment via iOS"] tap];
XCTAssertTrue([app.staticTexts[@"Flutter button tapped 1 time."] waitForExistenceWithTimeout:60.0]);
XCTAssertTrue(app.otherElements[@"Platform button tapped 1 time."].exists);
XCTAssertTrue(app.staticTexts[@"Platform button tapped 1 time."].exists);
// Back navigation.
[app.navigationBars[@"Hybrid Flutter/Native"].buttons[@"Flutter iOS Demos Home"] tap];
@@ -88,8 +87,8 @@
[app.buttons[@"Dual Flutter View (Cold)"] tap];
// There are two marquees.
XCTAssertTrue([app.otherElements[@"This is Marquee"] waitForExistenceWithTimeout:60.0]);
XCTAssertEqual([app.otherElements matchingType:XCUIElementTypeOther identifier:@"This is Marquee"].count, 2);
XCTAssertTrue([app.staticTexts[@"This is Marquee"] waitForExistenceWithTimeout:60.0]);
XCTAssertEqual([app.staticTexts matchingType:XCUIElementTypeStaticText identifier:@"This is Marquee"].count, 2);
// Back navigation.
[app.navigationBars[@"Dual Flutter Views"].buttons[@"Flutter iOS Demos Home"] tap];

View File

@@ -37,11 +37,6 @@
BlueprintName = "FlutterUITests"
ReferencedContainer = "container:Host.xcodeproj">
</BuildableReference>
<SkippedTests>
<Test
Identifier = "FlutterUITests">
</Test>
</SkippedTests>
</TestableReference>
</Testables>
</TestAction>