From d3ed4bf4f55d7e2256527c6571598959212a07d2 Mon Sep 17 00:00:00 2001 From: Anastasiya S Date: Thu, 14 Oct 2021 12:21:46 +0300 Subject: [PATCH] tests: BeforeYouGetStarted.qml --- tst_get_started_modal.qml | 53 +++++++++++++++++++++++++++++++++++++++ ui-tests.pro | 1 + 2 files changed, 54 insertions(+) create mode 100644 tst_get_started_modal.qml diff --git a/tst_get_started_modal.qml b/tst_get_started_modal.qml new file mode 100644 index 0000000..2a13b42 --- /dev/null +++ b/tst_get_started_modal.qml @@ -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() + + } + +} + diff --git a/ui-tests.pro b/ui-tests.pro index d40cdf3..85c709a 100644 --- a/ui-tests.pro +++ b/ui-tests.pro @@ -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)