tests: BeforeYouGetStarted.qml

This commit is contained in:
Anastasiya S 2021-10-14 12:21:46 +03:00
parent 44eff234f8
commit d3ed4bf4f5
2 changed files with 54 additions and 0 deletions

53
tst_get_started_modal.qml Normal file
View File

@ -0,0 +1,53 @@
import QtQuick 2.14
import QtQuick.Window 2.14
import QtTest 1.14
import "base"
import "status-desktop/ui/onboarding" as DesktopComponents
WindowTestCase {
name: "GetStartedModal"
when: windowShown
Helpers { id: helpers }
ChatsModelData {
id: chatsModel
}
Component {
id: popupComponent
DesktopComponents.BeforeGetStartedModal {
id: beforeGetStartedModal
}
}
function initTestCase() {
window.show()
}
function cleanupTestCase() {
window.close()
}
function test_case_BeforeGetStartedModal_height_width() {
var beforeGetStartedModal = popupComponent.createObject(window)
beforeGetStartedModal.open()
beforeGetStartedModal.title = "Before you get started ..."
wait(2000)
compare(beforeGetStartedModal.height, 318, "height should be 318")
compare(beforeGetStartedModal.width, 480, "width should be 480")
beforeGetStartedModal.destroy()
}
}

View File

@ -13,6 +13,7 @@ DISTFILES += \
base/WindowTestCase.qml \
tst_Modals.qml \
tst_choose_chat_name_modal.qml \
tst_get_started_modal.qml \
tst_initialtest.qml
DISTFILES += $$files("status-desktop/ui/*", true)