mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-26 19:34:25 +02:00
Updates based on comments.
This commit is contained in:
+17
@@ -72,6 +72,23 @@ extension ComposerCreateAction {
|
||||
}
|
||||
}
|
||||
|
||||
var accessibilityIdentifier: String {
|
||||
switch self {
|
||||
case .photoLibrary:
|
||||
return "photoLibraryAction"
|
||||
case .stickers:
|
||||
return "stickersAction"
|
||||
case .attachments:
|
||||
return "attachmentsAction"
|
||||
case .polls:
|
||||
return "pollsAction"
|
||||
case .location:
|
||||
return "locationAction"
|
||||
case .camera:
|
||||
return "cameraAction"
|
||||
}
|
||||
}
|
||||
|
||||
var icon: String {
|
||||
switch self {
|
||||
case .photoLibrary:
|
||||
|
||||
+4
-4
@@ -21,14 +21,14 @@ class ComposerCreateActionListUITests: MockScreenTestCase {
|
||||
func testFullList() throws {
|
||||
app.goToScreenWithIdentifier(MockComposerCreateActionListScreenState.fullList.title)
|
||||
|
||||
XCTAssert(app.staticTexts["Photo Library"].exists)
|
||||
XCTAssert(app.staticTexts["Location"].exists)
|
||||
XCTAssert(app.staticTexts[ComposerCreateAction.photoLibrary.accessibilityIdentifier].exists)
|
||||
XCTAssert(app.staticTexts[ComposerCreateAction.location.accessibilityIdentifier].exists)
|
||||
}
|
||||
|
||||
func testPartialList() throws {
|
||||
app.goToScreenWithIdentifier(MockComposerCreateActionListScreenState.partialList.title)
|
||||
|
||||
XCTAssert(app.staticTexts["Photo Library"].exists)
|
||||
XCTAssertFalse(app.staticTexts["Location"].exists)
|
||||
XCTAssert(app.staticTexts[ComposerCreateAction.photoLibrary.accessibilityIdentifier].exists)
|
||||
XCTAssertFalse(app.staticTexts[ComposerCreateAction.location.accessibilityIdentifier].exists)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ struct ComposerCreateActionList: View {
|
||||
Text(action.title)
|
||||
.foregroundColor(theme.colors.primaryContent)
|
||||
.font(theme.fonts.body)
|
||||
.accessibilityIdentifier(action.accessibilityIdentifier)
|
||||
Spacer()
|
||||
}
|
||||
.contentShape(Rectangle())
|
||||
@@ -46,6 +47,7 @@ struct ComposerCreateActionList: View {
|
||||
}
|
||||
.padding(.horizontal, 16)
|
||||
.padding(.vertical, 12)
|
||||
|
||||
}
|
||||
}
|
||||
.padding(.top, 16)
|
||||
|
||||
Reference in New Issue
Block a user