diff --git a/tst_Modals.qml b/tst_profile_popup.qml similarity index 82% rename from tst_Modals.qml rename to tst_profile_popup.qml index d44dac2..662ca32 100644 --- a/tst_Modals.qml +++ b/tst_profile_popup.qml @@ -31,7 +31,7 @@ WindowTestCase { // Catching editClickedSignal SignalSpy { id: editClickedSpy - signalName: "editAvatarButtonClicked" + signalName: "headerImageClicked" } /////// @@ -54,7 +54,7 @@ WindowTestCase { propfilePopup.destroy() } - function test_case2CurrentUser() { + function test_case2_current_user() { profileModel.profile.pubKey = "current-user" var propfilePopup = popupComponent.createObject(window) wait(2000) @@ -62,9 +62,9 @@ WindowTestCase { editClickedSpy.target = propfilePopup verify(propfilePopup.isCurrentUser, "User should be current") wait(5000) - var editbButton = helpers.getObjectByObjectName(propfilePopup.background, "editAvatarButton") - verify(!!editbButton, "object with name \"editAvatarButton\" not found") - verify(editbButton.visible, "editAvatarButton should be visible") + var editbButton = helpers.getObjectByObjectName(propfilePopup.background, "editAvatarImage") + verify(!!editbButton, "object with name \"editAvatarImage\" not found") + verify(editbButton.visible, "editAvatarImage should be visible") compare(editClickedSpy.count, 0) mouseClick(editbButton, 1, 1, Qt.LeftButton) @@ -73,16 +73,16 @@ WindowTestCase { propfilePopup.destroy() } - function test_case3NotCurrentUser() { + function test_case3_not_current_user() { profileModel.profile.pubKey = "another-user" var propfilePopup = popupComponent.createObject(window) wait(2000) propfilePopup.openPopup(true, "Test user", "current-user", "", "bla bla test it bitch", "Nickname") wait(5000) verify(!propfilePopup.isCurrentUser, "User should be is not current") - var editbButton = helpers.getObjectByObjectName(propfilePopup.background, "editAvatarButton") - verify(!!editbButton, "object with name \"editAvatarButton\" not found") - verify(!editbButton.visible, "editAvatarButton should be not visible") + var editbButton = helpers.getObjectByObjectName(propfilePopup.background, "editAvatarImage") + verify(!!editbButton, "object with name \"editAvatarImage\" not found") + verify(!editbButton.visible, "editAvatarImage should be not visible") propfilePopup.destroy() } } diff --git a/ui-tests.pro b/ui-tests.pro index 85c709a..6c2e81e 100644 --- a/ui-tests.pro +++ b/ui-tests.pro @@ -11,10 +11,10 @@ DISTFILES += \ base/Helpers.qml \ base/ProfileModelData.qml \ base/WindowTestCase.qml \ - tst_Modals.qml \ tst_choose_chat_name_modal.qml \ tst_get_started_modal.qml \ - tst_initialtest.qml + tst_initialtest.qml \ + tst_profile_popup.qml DISTFILES += $$files("status-desktop/ui/*", true)