mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-05 11:58:32 +00:00
Check more screens in the integration tests. Refactor flows
This commit is contained in:
committed by
Stefan Ceriu
parent
7becf6d0af
commit
569620c52f
@@ -39,6 +39,7 @@ struct RoomAttachmentPicker: View {
|
||||
} label: {
|
||||
PickerLabel(title: L10n.screenRoomAttachmentSourceGallery, icon: Image(systemName: "photo.fill"))
|
||||
}
|
||||
.accessibilityLabel(A11yIdentifiers.roomScreen.attachmentPickerPhotoLibrary)
|
||||
|
||||
Button {
|
||||
context.showAttachmentPopover = false
|
||||
@@ -46,6 +47,7 @@ struct RoomAttachmentPicker: View {
|
||||
} label: {
|
||||
PickerLabel(title: L10n.screenRoomAttachmentSourceFiles, icon: Image(systemName: "paperclip"))
|
||||
}
|
||||
.accessibilityLabel(A11yIdentifiers.roomScreen.attachmentPickerDocuments)
|
||||
|
||||
Button {
|
||||
context.showAttachmentPopover = false
|
||||
@@ -53,6 +55,7 @@ struct RoomAttachmentPicker: View {
|
||||
} label: {
|
||||
PickerLabel(title: L10n.screenRoomAttachmentSourceCamera, icon: Image(systemName: "camera.fill"))
|
||||
}
|
||||
.accessibilityLabel(A11yIdentifiers.roomScreen.attachmentPickerCamera)
|
||||
|
||||
Button {
|
||||
context.showAttachmentPopover = false
|
||||
@@ -60,6 +63,7 @@ struct RoomAttachmentPicker: View {
|
||||
} label: {
|
||||
PickerLabel(title: L10n.screenRoomAttachmentSourceLocation, icon: Image(asset: Asset.Images.locationPin))
|
||||
}
|
||||
.accessibilityLabel(A11yIdentifiers.roomScreen.attachmentPickerLocation)
|
||||
}
|
||||
.padding(.top, isPresented ? 20 : 0)
|
||||
.background {
|
||||
|
||||
@@ -119,6 +119,7 @@ struct HomeScreen: View {
|
||||
HomeScreenInvitesButton(title: L10n.actionInvitesList, hasBadge: context.viewState.hasUnreadPendingInvitations) {
|
||||
context.send(viewAction: .selectInvites)
|
||||
}
|
||||
.accessibilityLabel(A11yIdentifiers.homeScreen.invites)
|
||||
.frame(maxWidth: .infinity, alignment: .trailing)
|
||||
.padding(.vertical, -8.0)
|
||||
}
|
||||
@@ -178,6 +179,7 @@ struct HomeScreen: View {
|
||||
} label: {
|
||||
Image(systemName: "square.and.pencil")
|
||||
}
|
||||
.accessibilityLabel(A11yIdentifiers.homeScreen.startChat)
|
||||
}
|
||||
|
||||
/// Often times the scroll view's content size isn't correct yet when this method is called e.g. when cancelling a search
|
||||
|
||||
@@ -29,6 +29,7 @@ struct HomeScreenUserMenuButton: View {
|
||||
} label: {
|
||||
Label(L10n.commonSettings, systemImage: "gearshape")
|
||||
}
|
||||
.accessibilityLabel(A11yIdentifiers.homeScreen.settings)
|
||||
}
|
||||
Section {
|
||||
MatrixUserShareLink(userID: context.viewState.userID) {
|
||||
|
||||
@@ -130,6 +130,7 @@ struct InviteUsersScreen: View {
|
||||
Button(context.viewState.actionText) {
|
||||
context.send(viewAction: .proceed)
|
||||
}
|
||||
.accessibilityIdentifier(A11yIdentifiers.inviteUsersScreen.proceed)
|
||||
.disabled(context.viewState.isActionDisabled)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ struct SettingsScreen: View {
|
||||
kind: .navigationLink {
|
||||
context.send(viewAction: .developerOptions)
|
||||
})
|
||||
.accessibilityIdentifier("developerOptionsButton")
|
||||
.accessibilityLabel(A11yIdentifiers.settingsScreen.developerOptions)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ struct SettingsScreen: View {
|
||||
kind: .button {
|
||||
context.send(viewAction: .account)
|
||||
})
|
||||
.accessibilityIdentifier("notificationsButton")
|
||||
.accessibilityLabel(A11yIdentifiers.settingsScreen.account)
|
||||
}
|
||||
|
||||
// Message layout
|
||||
@@ -130,7 +130,7 @@ struct SettingsScreen: View {
|
||||
kind: .navigationLink {
|
||||
context.send(viewAction: .notifications)
|
||||
})
|
||||
.accessibilityIdentifier("notificationsButton")
|
||||
.accessibilityLabel(A11yIdentifiers.settingsScreen.notifications)
|
||||
}
|
||||
|
||||
// Analytics
|
||||
@@ -139,7 +139,7 @@ struct SettingsScreen: View {
|
||||
kind: .navigationLink {
|
||||
context.send(viewAction: .analytics)
|
||||
})
|
||||
.accessibilityIdentifier("analyticsButton")
|
||||
.accessibilityLabel(A11yIdentifiers.settingsScreen.analytics)
|
||||
|
||||
// Report Bug
|
||||
ListRow(label: .default(title: L10n.commonReportABug,
|
||||
@@ -147,7 +147,7 @@ struct SettingsScreen: View {
|
||||
kind: .navigationLink {
|
||||
context.send(viewAction: .reportBug)
|
||||
})
|
||||
.accessibilityIdentifier("reportBugButton")
|
||||
.accessibilityIdentifier(A11yIdentifiers.settingsScreen.reportBug)
|
||||
|
||||
// About
|
||||
ListRow(label: .default(title: L10n.commonAbout,
|
||||
@@ -155,7 +155,7 @@ struct SettingsScreen: View {
|
||||
kind: .navigationLink {
|
||||
context.send(viewAction: .about)
|
||||
})
|
||||
.accessibilityIdentifier("aboutButton")
|
||||
.accessibilityIdentifier(A11yIdentifiers.settingsScreen.about)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -191,6 +191,7 @@ struct SettingsScreen: View {
|
||||
|
||||
private var doneButton: some View {
|
||||
Button(L10n.actionDone, action: close)
|
||||
.accessibilityLabel(A11yIdentifiers.settingsScreen.done)
|
||||
}
|
||||
|
||||
private func close() {
|
||||
|
||||
@@ -72,6 +72,7 @@ struct StartChatScreen: View {
|
||||
.imageScale(.small)
|
||||
}
|
||||
.buttonStyle(FormButtonStyle(accessory: .navigationLink))
|
||||
.accessibilityLabel(A11yIdentifiers.startChatScreen.createRoom)
|
||||
}
|
||||
.compoundFormSection()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user