Skip to content

Commit dd56462

Browse files
author
Alexey Alter-Pesotskiy
committed
Unlock typing indicator test
1 parent b5cbcb9 commit dd56462

File tree

3 files changed

+5
-12
lines changed

3 files changed

+5
-12
lines changed

Sources/StreamChatSwiftUI/ChatChannel/MessageList/MessageListView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,9 +405,9 @@ struct TypingIndicatorBottomView: View {
405405
Color(colors.background)
406406
.opacity(0.9)
407407
)
408+
.accessibilityIdentifier("TypingIndicatorBottomView")
408409
}
409410
.accessibilityElement(children: .contain)
410-
.accessibilityIdentifier("TypingIndicatorBottomView")
411411
}
412412
}
413413

StreamChatSwiftUITestsAppTests/Pages/MessageListPage.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class MessageListPage {
2828
}
2929

3030
static var typingIndicator: XCUIElement {
31-
app.otherElements["TypingIndicatorBottomView"].staticTexts.firstMatch
31+
app.staticTexts["TypingIndicatorBottomView"].firstMatch
3232
}
3333

3434
static var scrollToBottomButton: XCUIElement {

StreamChatSwiftUITestsAppTests/Tests/MessageList_Tests.swift

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,7 @@ final class MessageList_Tests: StreamTestCase {
203203
func test_typingIndicator() throws {
204204
linkToScenario(withId: 358)
205205

206-
throw XCTSkip("Check out SWUI-251")
207-
208-
let isIpad = UIDevice.current.userInterfaceIdiom == .pad
209-
let typingIndicatorTimeout = isIpad ? 10 : XCUIElement.waitTimeout
210-
let typingEventsTimeout: Double = 3
206+
let typingEventsTimeout: Double = 4
211207

212208
GIVEN("user opens the channel") {
213209
userRobot.login().openChannel()
@@ -217,16 +213,13 @@ final class MessageList_Tests: StreamTestCase {
217213
}
218214
THEN("user observes typing indicator is shown") {
219215
let typingUserName = UserDetails.userName(for: participantRobot.currentUserId)
220-
userRobot.assertTypingIndicatorShown(
221-
typingUserName: typingUserName,
222-
waitTimeout: typingIndicatorTimeout
223-
)
216+
userRobot.assertTypingIndicatorShown(typingUserName: typingUserName)
224217
}
225218
WHEN("participant stops typing") {
226219
participantRobot.wait(typingEventsTimeout).stopTyping()
227220
}
228221
THEN("user observes typing indicator has disappeared") {
229-
userRobot.assertTypingIndicatorHidden(waitTimeout: typingIndicatorTimeout)
222+
userRobot.assertTypingIndicatorHidden()
230223
}
231224
}
232225

0 commit comments

Comments
 (0)