From 6a60c0a254f5e61ccce1501346e7ac4070ffa888 Mon Sep 17 00:00:00 2001 From: Anastasiya S Date: Tue, 26 Oct 2021 11:10:09 +0300 Subject: [PATCH] chore(tst_get_started_modal.qml): enhance tests --- tst_get_started_modal.qml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tst_get_started_modal.qml b/tst_get_started_modal.qml index c3615b9..d783d13 100644 --- a/tst_get_started_modal.qml +++ b/tst_get_started_modal.qml @@ -33,8 +33,8 @@ WindowTestCase { var beforeGetStartedModal = popupComponent.createObject(window) beforeGetStartedModal.open() - legacyHelpers.target = beforeGetStartedModal - var getStartedButton = legacyHelpers.findInFooter("getStartedStatusButton") + var getStartedButton = findChild(beforeGetStartedModal, "getStartedStatusButton") + print (getStartedButton) mouseClick(getStartedButton, getStartedButton.width/2, getStartedButton.height/2, Qt.LeftButton) verify(!getStartedButton.enabled, "Get Started Button is enabled") beforeGetStartedModal.destroy() @@ -48,8 +48,9 @@ WindowTestCase { mouseClick(acknowledgeCheckBox, acknowledgeCheckBox.width/2, acknowledgeCheckBox.height/2, Qt.LeftButton) var termsOfUseCheckBox = legacyHelpers.findInContent("termsOfUseCheckBox") mouseClick(termsOfUseCheckBox, termsOfUseCheckBox.width/2, termsOfUseCheckBox.height/2, Qt.LeftButton) - var getStartedButton = legacyHelpers.findInFooter("getStartedStatusButton") - verify(!getStartedButton.enabled, "Get Started Button is enabled") + var getStartedButton = findChild(beforeGetStartedModal, "getStartedStatusButton") + verify(getStartedButton.enabled, "Get Started Button is disabled") + wait(2000) mouseClick(getStartedButton, getStartedButton.width/2, getStartedButton.height/2, Qt.LeftButton) beforeGetStartedModal.destroy() } @@ -57,15 +58,15 @@ WindowTestCase { function test_case4_beforeGetStartedModal_TOU_click() { var beforeGetStartedModal = popupComponent.createObject(window) beforeGetStartedModal.open() - legacyHelpers.target = beforeGetStartedModal - var termsOfUseLink = legacyHelpers.findInContent("termsOfUseLink") + //legacyHelpers.target = beforeGetStartedModal + var termsOfUseLink = findChild(beforeGetStartedModal, "termsOfUseCheckBox") mouseClick(termsOfUseLink, 2, 2, Qt.LeftButton) } function test_case5_beforeGetStartedModal_privacy_policy_click() { var beforeGetStartedModal = popupComponent.createObject(window) beforeGetStartedModal.open() - legacyHelpers.target = beforeGetStartedModal + //legacyHelpers.target = beforeGetStartedModal var privacyPolicyLink = findChild(beforeGetStartedModal, "privacyPolicyLink") mouseClick(privacyPolicyLink, 2, 2, Qt.LeftButton) }