Remove the integration tests tapOnMenu as it's the same as tapOnButton (#4656)

This commit is contained in:
Stefan Ceriu
2025-10-27 11:58:49 +02:00
committed by GitHub
parent f3415e4ef1
commit d6f4054634
+4 -10
View File
@@ -78,7 +78,7 @@ class UserFlowTests: XCTestCase {
sleep(10) // Wait for the message to be sent sleep(10) // Wait for the message to be sent
// Switch to the rich text editor // Switch to the rich text editor
tapOnMenu(A11yIdentifiers.roomScreen.composerToolbar.openComposeOptions) tapOnButton(A11yIdentifiers.roomScreen.composerToolbar.openComposeOptions)
tapOnButton(A11yIdentifiers.roomScreen.attachmentPickerTextFormatting) tapOnButton(A11yIdentifiers.roomScreen.attachmentPickerTextFormatting)
composerTextField = app.textViews[A11yIdentifiers.roomScreen.messageComposer].firstMatch composerTextField = app.textViews[A11yIdentifiers.roomScreen.messageComposer].firstMatch
@@ -96,7 +96,7 @@ class UserFlowTests: XCTestCase {
} }
private func checkPhotoSharing() { private func checkPhotoSharing() {
tapOnMenu(A11yIdentifiers.roomScreen.composerToolbar.openComposeOptions) tapOnButton(A11yIdentifiers.roomScreen.composerToolbar.openComposeOptions)
tapOnButton(A11yIdentifiers.roomScreen.attachmentPickerPhotoLibrary) tapOnButton(A11yIdentifiers.roomScreen.attachmentPickerPhotoLibrary)
sleep(10) // Wait for the picker to load sleep(10) // Wait for the picker to load
@@ -114,7 +114,7 @@ class UserFlowTests: XCTestCase {
} }
private func checkDocumentSharing() { private func checkDocumentSharing() {
tapOnMenu(A11yIdentifiers.roomScreen.composerToolbar.openComposeOptions) tapOnButton(A11yIdentifiers.roomScreen.composerToolbar.openComposeOptions)
tapOnButton(A11yIdentifiers.roomScreen.attachmentPickerDocuments) tapOnButton(A11yIdentifiers.roomScreen.attachmentPickerDocuments)
sleep(10) // Wait for the picker to load sleep(10) // Wait for the picker to load
@@ -123,7 +123,7 @@ class UserFlowTests: XCTestCase {
} }
private func checkLocationSharing() { private func checkLocationSharing() {
tapOnMenu(A11yIdentifiers.roomScreen.composerToolbar.openComposeOptions) tapOnButton(A11yIdentifiers.roomScreen.composerToolbar.openComposeOptions)
tapOnButton(A11yIdentifiers.roomScreen.attachmentPickerLocation) tapOnButton(A11yIdentifiers.roomScreen.attachmentPickerLocation)
sleep(10) // Wait for the picker to load sleep(10) // Wait for the picker to load
@@ -253,12 +253,6 @@ class UserFlowTests: XCTestCase {
} }
} }
private func tapOnMenu(_ identifier: String) {
let button = app.buttons[identifier]
XCTAssertTrue(button.waitForExistence(timeout: 10.0))
button.tap(.center)
}
/// Taps on a back button that the system configured with a label but no identifier. /// Taps on a back button that the system configured with a label but no identifier.
/// ///
/// When there are multiple buttons with the same label in the hierarchy, all the buttons we created /// When there are multiple buttons with the same label in the hierarchy, all the buttons we created