Skip to content

Commit f8e559d

Browse files
authored
[quick_actions_ios]unskip XCUITests (flutter#12436)
It looks like flutter#169928 has been addressed, so the test should already been passing. See also: flutter#170180 (comment) *List which issues are fixed by this PR. You must list at least one issue.* Fixes flutter#190966 ## Pre-Review Checklist **Comment: only test change** **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
1 parent 994fff1 commit f8e559d

1 file changed

Lines changed: 14 additions & 11 deletions

File tree

‎packages/quick_actions/quick_actions_ios/example/ios/RunnerUITests/RunnerUITests.swift‎

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,16 @@ class RunnerUITests: XCTestCase {
3737
}
3838

3939
func testQuickActionWithFreshStart() throws {
40-
// See https://github.com/flutter/flutter/issues/169928
41-
throw XCTSkip("Temporarily disabled")
42-
4340
let springboard = XCUIApplication(bundleIdentifier: "com.apple.springboard")
44-
let quickActionsAppIcon = springboard.icons["quick_actions_example"]
41+
let quickActionsAppIcon = springboard.icons["Quick Actions Example"]
4542

4643
findAndTapQuickActionButton(
4744
buttonName: "Action two", quickActionsAppIcon: quickActionsAppIcon, springboard: springboard)
4845

49-
let actionTwoConfirmation = exampleApp.otherElements["action_two"]
46+
// The semantics type of this element changed between Flutter 3.44 and 3.47.
47+
// Using descendants(matching: .any) allows finding it regardless of whether
48+
// it is a staticText or otherElement.
49+
let actionTwoConfirmation = exampleApp.descendants(matching: .any)["action_two"]
5050
if !actionTwoConfirmation.waitForExistence(timeout: elementWaitingTime) {
5151
XCTFail(
5252
"Failed due to not able to find the actionTwoConfirmation in the app with \(elementWaitingTime) seconds. Springboard debug description: \(springboard.debugDescription)"
@@ -57,12 +57,12 @@ class RunnerUITests: XCTestCase {
5757
}
5858

5959
func testQuickActionWhenAppIsInBackground() throws {
60-
// See https://github.com/flutter/flutter/issues/169928
61-
throw XCTSkip("Temporarily disabled")
62-
6360
exampleApp.launch()
6461

65-
let actionsReady = exampleApp.otherElements["actions ready"]
62+
// The semantics type of this element changed between Flutter 3.44 and 3.47.
63+
// Using descendants(matching: .any) allows finding it regardless of whether
64+
// it is a staticText or otherElement.
65+
let actionsReady = exampleApp.descendants(matching: .any)["actions ready"]
6666

6767
if !actionsReady.waitForExistence(timeout: elementWaitingTime) {
6868
XCTFail(
@@ -73,7 +73,7 @@ class RunnerUITests: XCTestCase {
7373
XCUIDevice.shared.press(.home)
7474

7575
let springboard = XCUIApplication(bundleIdentifier: "com.apple.springboard")
76-
let quickActionsAppIcon = springboard.icons["quick_actions_example"]
76+
let quickActionsAppIcon = springboard.icons["Quick Actions Example"]
7777
if !quickActionsAppIcon.waitForExistence(timeout: elementWaitingTime) {
7878
XCTFail(
7979
"Failed due to not able to find the example app from springboard with \(elementWaitingTime) seconds. Springboard debug description: \(springboard.debugDescription)"
@@ -84,7 +84,10 @@ class RunnerUITests: XCTestCase {
8484
buttonName: "Action one, Action one subtitle", quickActionsAppIcon: quickActionsAppIcon,
8585
springboard: springboard)
8686

87-
let actionOneConfirmation = exampleApp.otherElements["action_one"]
87+
// The semantics type of this element changed between Flutter 3.44 and 3.47.
88+
// Using descendants(matching: .any) allows finding it regardless of whether
89+
// it is a staticText or otherElement.
90+
let actionOneConfirmation = exampleApp.descendants(matching: .any)["action_one"]
8891
if !actionOneConfirmation.waitForExistence(timeout: elementWaitingTime) {
8992
XCTFail(
9093
"Failed due to not able to find the actionOneConfirmation in the app with \(elementWaitingTime) seconds. Springboard debug description: \(springboard.debugDescription)"

0 commit comments

Comments
 (0)