Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
69ea91bf
Unverified
Commit
69ea91bf
authored
Jul 01, 2021
by
Jenn Magder
Committed by
GitHub
Jul 01, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wait for iOS UI buttons to exist before tapping (#85650)
parent
568ea462
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
FlutterUITests.m
...ration_tests/ios_host_app/FlutterUITests/FlutterUITests.m
+15
-6
No files found.
dev/integration_tests/ios_host_app/FlutterUITests/FlutterUITests.m
View file @
69ea91bf
...
@@ -17,7 +17,9 @@
...
@@ -17,7 +17,9 @@
XCUIApplication
*
app
=
[[
XCUIApplication
alloc
]
init
];
XCUIApplication
*
app
=
[[
XCUIApplication
alloc
]
init
];
[
app
launch
];
[
app
launch
];
[
app
.
buttons
[
@"Full Screen (Cold)"
]
tap
];
XCUIElement
*
coldButton
=
app
.
buttons
[
@"Full Screen (Cold)"
];
XCTAssertTrue
([
coldButton
waitForExistenceWithTimeout
:
60
.
0
]);
[
coldButton
tap
];
XCTAssertTrue
([
app
.
staticTexts
[
@"Button tapped 0 times."
]
waitForExistenceWithTimeout
:
60
.
0
]);
XCTAssertTrue
([
app
.
staticTexts
[
@"Button tapped 0 times."
]
waitForExistenceWithTimeout
:
60
.
0
]);
[
app
.
otherElements
[
@"Increment via Flutter"
]
tap
];
[
app
.
otherElements
[
@"Increment via Flutter"
]
tap
];
...
@@ -32,7 +34,9 @@
...
@@ -32,7 +34,9 @@
XCUIApplication
*
app
=
[[
XCUIApplication
alloc
]
init
];
XCUIApplication
*
app
=
[[
XCUIApplication
alloc
]
init
];
[
app
launch
];
[
app
launch
];
[
app
.
buttons
[
@"Full Screen (Warm)"
]
tap
];
XCUIElement
*
warmButton
=
app
.
buttons
[
@"Full Screen (Warm)"
];
XCTAssertTrue
([
warmButton
waitForExistenceWithTimeout
:
60
.
0
]);
[
warmButton
tap
];
XCTAssertTrue
([
app
.
staticTexts
[
@"Button tapped 0 times."
]
waitForExistenceWithTimeout
:
60
.
0
]);
XCTAssertTrue
([
app
.
staticTexts
[
@"Button tapped 0 times."
]
waitForExistenceWithTimeout
:
60
.
0
]);
[
app
.
otherElements
[
@"Increment via Flutter"
]
tap
];
[
app
.
otherElements
[
@"Increment via Flutter"
]
tap
];
...
@@ -47,7 +51,9 @@
...
@@ -47,7 +51,9 @@
XCUIApplication
*
app
=
[[
XCUIApplication
alloc
]
init
];
XCUIApplication
*
app
=
[[
XCUIApplication
alloc
]
init
];
[
app
launch
];
[
app
launch
];
[
app
.
buttons
[
@"Flutter View (Warm)"
]
tap
];
XCUIElement
*
warmButton
=
app
.
buttons
[
@"Flutter View (Warm)"
];
XCTAssertTrue
([
warmButton
waitForExistenceWithTimeout
:
60
.
0
]);
[
warmButton
tap
];
XCTAssertTrue
([
app
.
staticTexts
[
@"Button tapped 0 times."
]
waitForExistenceWithTimeout
:
60
.
0
]);
XCTAssertTrue
([
app
.
staticTexts
[
@"Button tapped 0 times."
]
waitForExistenceWithTimeout
:
60
.
0
]);
[
app
.
otherElements
[
@"Increment via Flutter"
]
tap
];
[
app
.
otherElements
[
@"Increment via Flutter"
]
tap
];
...
@@ -62,7 +68,9 @@
...
@@ -62,7 +68,9 @@
XCUIApplication
*
app
=
[[
XCUIApplication
alloc
]
init
];
XCUIApplication
*
app
=
[[
XCUIApplication
alloc
]
init
];
[
app
launch
];
[
app
launch
];
[
app
.
buttons
[
@"Hybrid View (Warm)"
]
tap
];
XCUIElement
*
warmButton
=
app
.
buttons
[
@"Hybrid View (Warm)"
];
XCTAssertTrue
([
warmButton
waitForExistenceWithTimeout
:
60
.
0
]);
[
warmButton
tap
];
XCTAssertTrue
([
app
.
staticTexts
[
@"Flutter button tapped 0 times."
]
waitForExistenceWithTimeout
:
60
.
0
]);
XCTAssertTrue
([
app
.
staticTexts
[
@"Flutter button tapped 0 times."
]
waitForExistenceWithTimeout
:
60
.
0
]);
XCTAssertTrue
(
app
.
staticTexts
[
@"Platform button tapped 0 times."
].
exists
);
XCTAssertTrue
(
app
.
staticTexts
[
@"Platform button tapped 0 times."
].
exists
);
...
@@ -87,8 +95,9 @@
...
@@ -87,8 +95,9 @@
[
app
.
buttons
[
@"Dual Flutter View (Cold)"
]
tap
];
[
app
.
buttons
[
@"Dual Flutter View (Cold)"
]
tap
];
// There are two marquees.
// There are two marquees.
XCTAssertTrue
([
app
.
staticTexts
[
@"This is Marquee"
]
waitForExistenceWithTimeout
:
60
.
0
]);
XCUIElementQuery
*
marqueeQuery
=
[
app
.
staticTexts
matchingIdentifier
:
@"This is Marquee"
];
XCTAssertEqual
([
app
.
staticTexts
matchingType
:
XCUIElementTypeStaticText
identifier
:
@"This is Marquee"
].
count
,
2
);
[
self
expectationForPredicate
:[
NSPredicate
predicateWithFormat
:
@"count = 2"
]
evaluatedWithObject
:
marqueeQuery
handler
:
nil
];
[
self
waitForExpectationsWithTimeout
:
30
.
0
handler
:
nil
];
// Back navigation.
// Back navigation.
[
app
.
navigationBars
[
@"Dual Flutter Views"
].
buttons
[
@"Flutter iOS Demos Home"
]
tap
];
[
app
.
navigationBars
[
@"Dual Flutter Views"
].
buttons
[
@"Flutter iOS Demos Home"
]
tap
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment