From ad2b08253d7d42fda9a83a8babf990b3853d3c81 Mon Sep 17 00:00:00 2001 From: Anastasiya S Date: Tue, 19 Oct 2021 16:50:34 +0300 Subject: [PATCH] test for pin counter added --- tst_statusChatInfoButton.qml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/tst_statusChatInfoButton.qml b/tst_statusChatInfoButton.qml index 5e997e0..b769eb5 100644 --- a/tst_statusChatInfoButton.qml +++ b/tst_statusChatInfoButton.qml @@ -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() + + } + }