mirror of
https://github.com/element-hq/element-x-ios.git
synced 2025-03-10 21:39:12 +00:00
add screenshots for UI test
This commit is contained in:
parent
f8b7b86641
commit
da0b35ea6f
@ -30,6 +30,7 @@ struct A11yIdentifiers {
|
||||
static let softLogoutScreen = SoftLogoutScreen()
|
||||
static let startChatScreen = StartChatScreen()
|
||||
static let roomMemberDetailsScreen = RoomMemberDetailsScreen()
|
||||
static let createRoomScreen = CreateRoomScreen()
|
||||
static let invitesScreen = InvitesScreen()
|
||||
|
||||
struct AnalyticsPromptScreen {
|
||||
@ -130,4 +131,9 @@ struct A11yIdentifiers {
|
||||
let inviteFriends = "start_chat-invite_friends"
|
||||
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
|
||||
topicSection
|
||||
if !context.viewState.selectedUsers.isEmpty {
|
||||
// TODO: check clipping outside form
|
||||
selectedUsersSection
|
||||
}
|
||||
// TODO: Spacer not working properly
|
||||
Spacer()
|
||||
.listRowBackground(Color.clear)
|
||||
securitySection
|
||||
@ -67,6 +65,7 @@ struct CreateRoomScreen: View {
|
||||
text: $context.roomName,
|
||||
prompt: Text(L10n.screenCreateRoomRoomNamePlaceholder),
|
||||
axis: .horizontal)
|
||||
.accessibilityIdentifier(A11yIdentifiers.createRoomScreen.roomName)
|
||||
.padding(EdgeInsets(top: 10, leading: 16, bottom: 10, trailing: 16))
|
||||
.background(Color.element.formRowBackground)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 8))
|
||||
@ -84,6 +83,7 @@ struct CreateRoomScreen: View {
|
||||
text: $context.roomTopic,
|
||||
prompt: Text(L10n.screenCreateRoomTopicPlaceholder),
|
||||
axis: .vertical)
|
||||
.accessibilityIdentifier(A11yIdentifiers.createRoomScreen.roomTopic)
|
||||
.lineLimit(3, reservesSpace: false)
|
||||
} header: {
|
||||
Text(L10n.screenCreateRoomTopicLabel)
|
||||
|
@ -27,4 +27,23 @@ class CreateRoomScreenUITests: XCTestCase {
|
||||
let app = Application.launch(.createRoomNoUsers)
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.createRoom-0.png
(Stored with Git LFS)
Normal file
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.createRoom-0.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.createRoom-1.png
(Stored with Git LFS)
Normal file
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.createRoom-1.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.createRoom-2.png
(Stored with Git LFS)
Normal file
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.createRoom-2.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.createRoom-3.png
(Stored with Git LFS)
Normal file
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.createRoom-3.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.createRoom-0.png
(Stored with Git LFS)
Normal file
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.createRoom-0.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.createRoom-1.png
(Stored with Git LFS)
Normal file
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.createRoom-1.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.createRoom-2.png
(Stored with Git LFS)
Normal file
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.createRoom-2.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.createRoom-3.png
(Stored with Git LFS)
Normal file
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.createRoom-3.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.createRoom-0.png
(Stored with Git LFS)
Normal file
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.createRoom-0.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.createRoom-1.png
(Stored with Git LFS)
Normal file
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.createRoom-1.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.createRoom-2.png
(Stored with Git LFS)
Normal file
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.createRoom-2.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.createRoom-3.png
(Stored with Git LFS)
Normal file
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.createRoom-3.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.createRoom-0.png
(Stored with Git LFS)
Normal file
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.createRoom-0.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.createRoom-1.png
(Stored with Git LFS)
Normal file
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.createRoom-1.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.createRoom-2.png
(Stored with Git LFS)
Normal file
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.createRoom-2.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.createRoom-3.png
(Stored with Git LFS)
Normal file
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.createRoom-3.png
(Stored with Git LFS)
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user