Skip to content

Commit 4a946d4

Browse files
committedMar 28, 2025
RUM-7564 Fix testRUMTapActionScenario
1 parent 814da0c commit 4a946d4

File tree

1 file changed

+6
-19
lines changed

1 file changed

+6
-19
lines changed
 

‎IntegrationTests/IntegrationScenarios/Scenarios/RUM/RUMTapActionScenarioTests.swift

+6-19
Original file line numberDiff line numberDiff line change
@@ -32,24 +32,12 @@ private extension ExampleApplication {
3232
buttons["Show various UIControls"].tap()
3333
}
3434

35-
func tapTextField() {
36-
tables.cells
35+
func tapTextField(_ text: String) {
36+
let textField = tables.cells
3737
.containing(.staticText, identifier: "UITextField")
3838
.children(matching: .textField).element
39-
.tap()
40-
}
41-
42-
func enterTextUsingKeyboard(_ text: String) {
43-
// NOTE: RUMM-740 iOS 13 Swipe typing feature presents its onboarding
44-
// That blocks the keyboard with a Continue button
45-
// it must be tapped first to get the real keyboard
46-
let swipeTypingContinueButton = buttons["Continue"]
47-
if swipeTypingContinueButton.exists {
48-
swipeTypingContinueButton.tap()
49-
}
50-
text.forEach { letter in
51-
keys[String(letter)].tap()
52-
}
39+
textField.tap()
40+
textField.typeText(text)
5341
}
5442

5543
func dismissKeyboard() {
@@ -63,7 +51,7 @@ private extension ExampleApplication {
6351
}
6452

6553
func moveSlider(to position: CGFloat) {
66-
tables.sliders["50%"].adjust(toNormalizedSliderPosition: position)
54+
tables.sliders.firstMatch.adjust(toNormalizedSliderPosition: position)
6755
}
6856

6957
func tapSegmentedControlSegment(label: String) {
@@ -96,8 +84,7 @@ class RUMTapActionScenarioTests: IntegrationTests, RUMCommonAsserts {
9684
app.tapShowUICollectionView()
9785
app.tapCollectionViewItem(atIndex: 14)
9886
app.tapShowVariousUIControls()
99-
app.tapTextField()
100-
app.enterTextUsingKeyboard("foo")
87+
app.tapTextField("foo")
10188
app.dismissKeyboard()
10289
app.tapStepperPlusButton()
10390
app.moveSlider(to: 0.25)

0 commit comments

Comments
 (0)
Failed to load comments.