mirror of
https://github.com/status-im/desktop-ui-tests.git
synced 2025-02-04 17:04:01 +00:00
Merge pull request #8 from status-im/fix/test-profile-popup
Update signals and objectNames usage
This commit is contained in:
commit
023a048adf
@ -31,7 +31,7 @@ WindowTestCase {
|
|||||||
// Catching editClickedSignal
|
// Catching editClickedSignal
|
||||||
SignalSpy {
|
SignalSpy {
|
||||||
id: editClickedSpy
|
id: editClickedSpy
|
||||||
signalName: "editAvatarButtonClicked"
|
signalName: "headerImageClicked"
|
||||||
}
|
}
|
||||||
|
|
||||||
///////
|
///////
|
||||||
@ -54,7 +54,7 @@ WindowTestCase {
|
|||||||
propfilePopup.destroy()
|
propfilePopup.destroy()
|
||||||
}
|
}
|
||||||
|
|
||||||
function test_case2CurrentUser() {
|
function test_case2_current_user() {
|
||||||
profileModel.profile.pubKey = "current-user"
|
profileModel.profile.pubKey = "current-user"
|
||||||
var propfilePopup = popupComponent.createObject(window)
|
var propfilePopup = popupComponent.createObject(window)
|
||||||
wait(2000)
|
wait(2000)
|
||||||
@ -62,9 +62,9 @@ WindowTestCase {
|
|||||||
editClickedSpy.target = propfilePopup
|
editClickedSpy.target = propfilePopup
|
||||||
verify(propfilePopup.isCurrentUser, "User should be current")
|
verify(propfilePopup.isCurrentUser, "User should be current")
|
||||||
wait(5000)
|
wait(5000)
|
||||||
var editbButton = helpers.getObjectByObjectName(propfilePopup.background, "editAvatarButton")
|
var editbButton = helpers.getObjectByObjectName(propfilePopup.background, "editAvatarImage")
|
||||||
verify(!!editbButton, "object with name \"editAvatarButton\" not found")
|
verify(!!editbButton, "object with name \"editAvatarImage\" not found")
|
||||||
verify(editbButton.visible, "editAvatarButton should be visible")
|
verify(editbButton.visible, "editAvatarImage should be visible")
|
||||||
|
|
||||||
compare(editClickedSpy.count, 0)
|
compare(editClickedSpy.count, 0)
|
||||||
mouseClick(editbButton, 1, 1, Qt.LeftButton)
|
mouseClick(editbButton, 1, 1, Qt.LeftButton)
|
||||||
@ -73,16 +73,16 @@ WindowTestCase {
|
|||||||
propfilePopup.destroy()
|
propfilePopup.destroy()
|
||||||
}
|
}
|
||||||
|
|
||||||
function test_case3NotCurrentUser() {
|
function test_case3_not_current_user() {
|
||||||
profileModel.profile.pubKey = "another-user"
|
profileModel.profile.pubKey = "another-user"
|
||||||
var propfilePopup = popupComponent.createObject(window)
|
var propfilePopup = popupComponent.createObject(window)
|
||||||
wait(2000)
|
wait(2000)
|
||||||
propfilePopup.openPopup(true, "Test user", "current-user", "", "bla bla test it bitch", "Nickname")
|
propfilePopup.openPopup(true, "Test user", "current-user", "", "bla bla test it bitch", "Nickname")
|
||||||
wait(5000)
|
wait(5000)
|
||||||
verify(!propfilePopup.isCurrentUser, "User should be is not current")
|
verify(!propfilePopup.isCurrentUser, "User should be is not current")
|
||||||
var editbButton = helpers.getObjectByObjectName(propfilePopup.background, "editAvatarButton")
|
var editbButton = helpers.getObjectByObjectName(propfilePopup.background, "editAvatarImage")
|
||||||
verify(!!editbButton, "object with name \"editAvatarButton\" not found")
|
verify(!!editbButton, "object with name \"editAvatarImage\" not found")
|
||||||
verify(!editbButton.visible, "editAvatarButton should be not visible")
|
verify(!editbButton.visible, "editAvatarImage should be not visible")
|
||||||
propfilePopup.destroy()
|
propfilePopup.destroy()
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -11,10 +11,10 @@ DISTFILES += \
|
|||||||
base/Helpers.qml \
|
base/Helpers.qml \
|
||||||
base/ProfileModelData.qml \
|
base/ProfileModelData.qml \
|
||||||
base/WindowTestCase.qml \
|
base/WindowTestCase.qml \
|
||||||
tst_Modals.qml \
|
|
||||||
tst_choose_chat_name_modal.qml \
|
tst_choose_chat_name_modal.qml \
|
||||||
tst_get_started_modal.qml \
|
tst_get_started_modal.qml \
|
||||||
tst_initialtest.qml
|
tst_initialtest.qml \
|
||||||
|
tst_profile_popup.qml
|
||||||
|
|
||||||
DISTFILES += $$files("status-desktop/ui/*", true)
|
DISTFILES += $$files("status-desktop/ui/*", true)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user