Make the attachment menu an actual menu. (#2199)

There was a bug with the sheet/popover when overriding the colour scheme where the button renders in light mode when the app is in dark mode.
This commit is contained in:
Doug
2023-12-05 11:14:16 +00:00
committed by GitHub
parent 123b39e0ea
commit 9df3139ac7
14 changed files with 65 additions and 86 deletions

View File

@@ -59,13 +59,13 @@ class UserFlowTests: XCTestCase {
for identifier in [A11yIdentifiers.roomScreen.attachmentPickerPhotoLibrary,
A11yIdentifiers.roomScreen.attachmentPickerDocuments,
A11yIdentifiers.roomScreen.attachmentPickerLocation] {
tapOnButton(A11yIdentifiers.roomScreen.composerToolbar.openComposeOptions)
tapOnMenu(A11yIdentifiers.roomScreen.composerToolbar.openComposeOptions)
tapOnButton(identifier)
tapOnButton("Cancel")
}
// Open attachments picker
tapOnButton(A11yIdentifiers.roomScreen.composerToolbar.openComposeOptions)
tapOnMenu(A11yIdentifiers.roomScreen.composerToolbar.openComposeOptions)
// Open photo library picker
tapOnButton(A11yIdentifiers.roomScreen.attachmentPickerPhotoLibrary)
@@ -169,6 +169,12 @@ class UserFlowTests: XCTestCase {
button.tap()
}
private func tapOnMenu(_ identifier: String) {
let button = app.buttons[identifier]
XCTAssertTrue(button.waitForExistence(timeout: 10.0))
button.forceTap()
}
/// 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