Add utility to run UI tests for Screen states, add screen states for template and finish unit test.

This commit is contained in:
David Langley
2021-09-10 16:43:31 +01:00
parent 8c9a00b688
commit c69bd99b5f
15 changed files with 332 additions and 148 deletions
@@ -67,6 +67,6 @@ struct TemplateUserProfile: View {
@available(iOS 14.0, *)
struct TemplateUserProfile_Previews: PreviewProvider {
static var previews: some View {
MockTemplateProfileUserScreenStates.screenGroup()
MockTemplateProfileUserScreenState.screenGroup()
}
}
@@ -38,6 +38,9 @@ struct TemplateUserProfileHeader: View {
VStack(spacing: 8){
Text(displayName ?? "")
.font(theme.fonts.title3)
.accessibility(identifier: "displayNameText")
.padding(.horizontal)
.lineLimit(1)
TemplateUserProfilePresenceView(presence: presence)
}
}
@@ -31,6 +31,7 @@ struct TemplateUserProfilePresenceView: View {
.frame(width: 8, height: 8)
Text(presence.title)
.font(.subheadline)
.accessibilityIdentifier("presenceText")
}
.foregroundColor(foregroundColor)
.padding(0)