From f123f64deb1061fcaf15d6a5153ea16e9aeec763 Mon Sep 17 00:00:00 2001 From: Jenn Magder Date: Fri, 11 Dec 2020 13:52:19 -0800 Subject: [PATCH] Reenable module_test_ios UI tests (#72145) --- .../FlutterUITests/FlutterUITests.m | 23 +++++++++---------- .../xcshareddata/xcschemes/Host.xcscheme | 5 ---- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/dev/integration_tests/ios_host_app/FlutterUITests/FlutterUITests.m b/dev/integration_tests/ios_host_app/FlutterUITests/FlutterUITests.m index cd6ed3e761..d52a1e5f1a 100644 --- a/dev/integration_tests/ios_host_app/FlutterUITests/FlutterUITests.m +++ b/dev/integration_tests/ios_host_app/FlutterUITests/FlutterUITests.m @@ -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]; diff --git a/dev/integration_tests/ios_host_app/Host.xcodeproj/xcshareddata/xcschemes/Host.xcscheme b/dev/integration_tests/ios_host_app/Host.xcodeproj/xcshareddata/xcschemes/Host.xcscheme index b709798724..612155f13d 100644 --- a/dev/integration_tests/ios_host_app/Host.xcodeproj/xcshareddata/xcschemes/Host.xcscheme +++ b/dev/integration_tests/ios_host_app/Host.xcodeproj/xcshareddata/xcschemes/Host.xcscheme @@ -37,11 +37,6 @@ BlueprintName = "FlutterUITests" ReferencedContainer = "container:Host.xcodeproj"> - - - -