mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
add screenshots for UI test
This commit is contained in:
@@ -30,6 +30,7 @@ struct A11yIdentifiers {
|
|||||||
static let softLogoutScreen = SoftLogoutScreen()
|
static let softLogoutScreen = SoftLogoutScreen()
|
||||||
static let startChatScreen = StartChatScreen()
|
static let startChatScreen = StartChatScreen()
|
||||||
static let roomMemberDetailsScreen = RoomMemberDetailsScreen()
|
static let roomMemberDetailsScreen = RoomMemberDetailsScreen()
|
||||||
|
static let createRoomScreen = CreateRoomScreen()
|
||||||
static let invitesScreen = InvitesScreen()
|
static let invitesScreen = InvitesScreen()
|
||||||
|
|
||||||
struct AnalyticsPromptScreen {
|
struct AnalyticsPromptScreen {
|
||||||
@@ -130,4 +131,9 @@ struct A11yIdentifiers {
|
|||||||
let inviteFriends = "start_chat-invite_friends"
|
let inviteFriends = "start_chat-invite_friends"
|
||||||
let searchNoResults = "start_chat-search_no_results"
|
let searchNoResults = "start_chat-search_no_results"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct CreateRoomScreen {
|
||||||
|
let roomName = "create-room-room-name"
|
||||||
|
let roomTopic = "create-room-room-topic"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,10 +39,8 @@ struct CreateRoomScreen: View {
|
|||||||
roomSection
|
roomSection
|
||||||
topicSection
|
topicSection
|
||||||
if !context.viewState.selectedUsers.isEmpty {
|
if !context.viewState.selectedUsers.isEmpty {
|
||||||
// TODO: check clipping outside form
|
|
||||||
selectedUsersSection
|
selectedUsersSection
|
||||||
}
|
}
|
||||||
// TODO: Spacer not working properly
|
|
||||||
Spacer()
|
Spacer()
|
||||||
.listRowBackground(Color.clear)
|
.listRowBackground(Color.clear)
|
||||||
securitySection
|
securitySection
|
||||||
@@ -67,6 +65,7 @@ struct CreateRoomScreen: View {
|
|||||||
text: $context.roomName,
|
text: $context.roomName,
|
||||||
prompt: Text(L10n.screenCreateRoomRoomNamePlaceholder),
|
prompt: Text(L10n.screenCreateRoomRoomNamePlaceholder),
|
||||||
axis: .horizontal)
|
axis: .horizontal)
|
||||||
|
.accessibilityIdentifier(A11yIdentifiers.createRoomScreen.roomName)
|
||||||
.padding(EdgeInsets(top: 10, leading: 16, bottom: 10, trailing: 16))
|
.padding(EdgeInsets(top: 10, leading: 16, bottom: 10, trailing: 16))
|
||||||
.background(Color.element.formRowBackground)
|
.background(Color.element.formRowBackground)
|
||||||
.clipShape(RoundedRectangle(cornerRadius: 8))
|
.clipShape(RoundedRectangle(cornerRadius: 8))
|
||||||
@@ -84,6 +83,7 @@ struct CreateRoomScreen: View {
|
|||||||
text: $context.roomTopic,
|
text: $context.roomTopic,
|
||||||
prompt: Text(L10n.screenCreateRoomTopicPlaceholder),
|
prompt: Text(L10n.screenCreateRoomTopicPlaceholder),
|
||||||
axis: .vertical)
|
axis: .vertical)
|
||||||
|
.accessibilityIdentifier(A11yIdentifiers.createRoomScreen.roomTopic)
|
||||||
.lineLimit(3, reservesSpace: false)
|
.lineLimit(3, reservesSpace: false)
|
||||||
} header: {
|
} header: {
|
||||||
Text(L10n.screenCreateRoomTopicLabel)
|
Text(L10n.screenCreateRoomTopicLabel)
|
||||||
|
|||||||
@@ -27,4 +27,23 @@ class CreateRoomScreenUITests: XCTestCase {
|
|||||||
let app = Application.launch(.createRoomNoUsers)
|
let app = Application.launch(.createRoomNoUsers)
|
||||||
app.assertScreenshot(.createRoom, step: 1)
|
app.assertScreenshot(.createRoom, step: 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func testLongInputNameText() {
|
||||||
|
let app = Application.launch(.createRoom)
|
||||||
|
let roomName: String
|
||||||
|
if UIDevice.current.userInterfaceIdiom == .pad {
|
||||||
|
roomName = "Room name very very very very very very very very very very very very very very very very long"
|
||||||
|
} else {
|
||||||
|
roomName = "Room name very very very very long"
|
||||||
|
}
|
||||||
|
app.textFields[A11yIdentifiers.createRoomScreen.roomName].clearAndTypeText(roomName)
|
||||||
|
app.assertScreenshot(.createRoom, step: 2)
|
||||||
|
}
|
||||||
|
|
||||||
|
func testLongInputTopicText() {
|
||||||
|
let app = Application.launch(.createRoom)
|
||||||
|
let roomTopic = "Room topic\nvery\nvery\nvery long"
|
||||||
|
app.textViews[A11yIdentifiers.createRoomScreen.roomTopic].clearAndTypeText(roomTopic)
|
||||||
|
app.assertScreenshot(.createRoom, step: 3)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:2ce58d664380c881e9f793d01897229f4f9afce1b6d6e2614274c780e4105606
|
||||||
|
size 140709
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:dd40abfd78340148ab9640d9f57329381e177782364085eefe063782b76451a3
|
||||||
|
size 117434
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:338157168cdf237955f64908627432319487871fd5e81824664a7f65293ce1bc
|
||||||
|
size 212991
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:0197617ed76b9a17cde9d22323bbe374d78fbe9596e2c31928e2991482a7128a
|
||||||
|
size 212483
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:3cdecb8eda71e1142725931aafed538e61b01ee571c2bac0fc64500cc5b64af4
|
||||||
|
size 188211
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:6ced89105404a17c6cbd117ff64639d2a0ffe688a99d289e142d76c3ad031187
|
||||||
|
size 157443
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:28f3f129db6a100cc7c24c1419ecdd319820d1b5b23dfcd942648fc51469152d
|
||||||
|
size 208353
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:5f29aefa3158b91801ab7291edc7ad824de57a016ed151358fb1a0a15b9e4840
|
||||||
|
size 211860
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:d76422f5c7ca9259dd0af19766553c089a4af147277ba6d9b046daaed833021d
|
||||||
|
size 170045
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:ef2da36c0dc9db449d0e370df85e2794258c29fc4dea1c2b9b778fda171e61b7
|
||||||
|
size 146542
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:152202a96a2bd27fa7075b8b6daf87c8e1221ae5b49ff5bdac6f5bcde05e0ac5
|
||||||
|
size 240605
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:543af442458cb4292c3b0cd22a56cb7376d69776fdc80e0b0eefeb6b8ce867ea
|
||||||
|
size 240524
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:baf8dfb833a68eb3424121895619d6cdb62d3684784f4990f1d22397cab84f7e
|
||||||
|
size 236641
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:3076f5da83494b9c375bfa6a632806c475603cccd8408407f3020da00a645db3
|
||||||
|
size 212717
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:af0eec1935090fd30bcc49522e7f8c43502d975313ea3b45ccc3c335effd0f54
|
||||||
|
size 222778
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:8789a81c437710854ab852b937cdfaeca3d9852337f370a31c0235f587c0002e
|
||||||
|
size 223291
|
||||||
Reference in New Issue
Block a user