desktop-ui-tests/tst_get_started_modal.qml

57 lines
1.3 KiB
QML
Raw Normal View History

2021-10-14 09:21:46 +00:00
import QtQuick 2.14
import QtQuick.Window 2.14
import QtTest 1.14
import "base"
2021-10-18 12:31:21 +00:00
import "status-desktop/ui/app/AppLayouts/Onboarding/popups" as DesktopComponents
2021-10-14 09:21:46 +00:00
WindowTestCase {
name: "GetStartedModal"
when: windowShown
Helpers { id: helpers }
ChatsModelData {
id: chatsModel
}
Component {
id: popupComponent
DesktopComponents.BeforeGetStartedModal {
id: beforeGetStartedModal
}
}
2021-10-15 14:06:35 +00:00
function test_case1_BeforeGetStartedModal_height_width() {
2021-10-14 09:21:46 +00:00
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")
2021-10-15 14:06:35 +00:00
beforeGetStartedModal.destroy()
}
2021-10-15 12:48:53 +00:00
2021-10-15 14:06:35 +00:00
function test_case2_BeforeGetStartedModal_button() {
2021-10-15 12:48:53 +00:00
2021-10-15 14:06:35 +00:00
var beforeGetStartedModal = popupComponent.createObject(window)
beforeGetStartedModal.open()
beforeGetStartedModal.title = "Before you get started ..."
wait(2000)
var getStartedButtonExists = helpers.checkIfItemExists(beforeGetStartedModal, 340, 260)
verify(getStartedButtonExists, true)
2021-10-14 09:21:46 +00:00
beforeGetStartedModal.destroy()
2021-10-15 14:06:35 +00:00
}
2021-10-14 09:21:46 +00:00
}