Add test for status expandable item
This commit is contained in:
parent
bbca8abbb1
commit
428f57948c
|
@ -13,5 +13,6 @@
|
|||
<file>base/WindowTestCase.qml</file>
|
||||
<file>tst_chatinfotoolbar.qml</file>
|
||||
<file>tst_statuslistitem.qml</file>
|
||||
<file>tst_statusexpandableitem.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
import QtQuick 2.14
|
||||
import QtTest 1.14
|
||||
|
||||
import "base"
|
||||
|
||||
import StatusQ.Components 0.1
|
||||
|
||||
WindowTestCase {
|
||||
name: "StatusExpandableItem test"
|
||||
when: windowShown
|
||||
|
||||
StatusExpandableItem {
|
||||
id: expandableItem
|
||||
parent: windowContent
|
||||
|
||||
primaryText: "primary text"
|
||||
secondaryText: "secondary text"
|
||||
additionalText: "additional text"
|
||||
|
||||
expandable: true
|
||||
|
||||
expandableComponent: Rectangle {
|
||||
width: 1000
|
||||
height: 300
|
||||
}
|
||||
}
|
||||
|
||||
function initTestCase() {
|
||||
window.show()
|
||||
}
|
||||
|
||||
function cleanupTestCase() {
|
||||
window.close()
|
||||
}
|
||||
|
||||
function test_expand() {
|
||||
verify(!expandableItem.expanded)
|
||||
|
||||
mouseClick(expandableItem, expandableItem.width / 2, expandableItem.height / 2, Qt.LeftButton)
|
||||
|
||||
verify(expandableItem.expanded)
|
||||
wait(400) // transition duration
|
||||
compare(expandableItem.height, 82 + 300 + 22)
|
||||
}
|
||||
}
|
16
ui-tests.pro
16
ui-tests.pro
|
@ -6,21 +6,9 @@ DESTDIR += $${PWD}/bin
|
|||
|
||||
DEFINES += PROJECT_PATH=\"$${PWD}\"
|
||||
|
||||
DISTFILES += \
|
||||
base/ChatsModelData.qml \
|
||||
base/Helpers.qml \
|
||||
base/LegacyModalsHelpers.qml \
|
||||
base/ModalHelpers.qml \
|
||||
base/ProfileModelData.qml \
|
||||
base/WindowTestCase.qml \
|
||||
tst_choose_chat_name_modal.qml \
|
||||
tst_get_started_modal.qml \
|
||||
tst_initialtest.qml \
|
||||
tst_profile_popup.qml \
|
||||
tst_statusButton.qml \
|
||||
tst_statusChatInfoButton.qml
|
||||
#DISTFILES += $$
|
||||
|
||||
DISTFILES += $$files("status-desktop/ui/*", true)
|
||||
DISTFILES += $$files("$$PWD/*", true)
|
||||
|
||||
QML_IMPORT_PATH += status-desktop/ui/StatusQ/src
|
||||
|
||||
|
|
Loading…
Reference in New Issue