Merge pull request #23 from status-im/tests_ChatInfoButton.qml

tests: StatusChatInfoButton.qml
This commit is contained in:
Boris Melnik 2021-10-19 19:40:17 +03:00 committed by GitHub
commit bbca8abbb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 1 deletions

View File

@ -49,7 +49,7 @@ WindowTestCase {
function test_case1_statusChatInfoButton_clicked() {
var statusChatInfoButton = popupComponent.createObject(window)
statusChatInfoButton.title = "Status Chat Info Button"
statusChatInfoButton.title = "Status-Chat-Info-Button"
wait(2000)
statusChatInfoButtonClickedSpy.target = statusChatInfoButton
compare(statusChatInfoButtonClickedSpy.count, 0)
@ -73,5 +73,22 @@ WindowTestCase {
statusChatInfoButton.destroy()
}
function test_case3_statusChatInfoButton_pinned() {
var statusChatInfoButton = popupComponent.createObject(window)
statusChatInfoButton.title = "#community-channel"
statusChatInfoButton.muted = false
statusChatInfoButton.pinnedMessagesCount = 2
wait(2000)
var pinButtonCounter = helpers.getObjectByObjectName(statusChatInfoButton, "pinMessagesCounter")
pinnedMessagesClickedSpy.target = statusChatInfoButton
compare(pinnedMessagesClickedSpy.count, 0)
mouseClick(pinButtonCounter, 1, 1, Qt.LeftButton)
wait(2000)
compare(pinnedMessagesClickedSpy.count, 1, "Pin counter is not clicked")
statusChatInfoButton.destroy()
}
}