tests: GenKeyModalTests
This commit is contained in:
parent
c441df8c42
commit
490e294ed2
|
@ -0,0 +1,96 @@
|
||||||
|
import QtQuick 2.14
|
||||||
|
import QtQuick.Window 2.14
|
||||||
|
import QtTest 1.14
|
||||||
|
|
||||||
|
import "base"
|
||||||
|
import "status-desktop/ui/onboarding" as DesktopComponents
|
||||||
|
|
||||||
|
|
||||||
|
WindowTestCase {
|
||||||
|
name: "ChooseChatName"
|
||||||
|
when: windowShown
|
||||||
|
|
||||||
|
Helpers { id: helpers }
|
||||||
|
|
||||||
|
|
||||||
|
ChatsModelData {
|
||||||
|
id: chatsModel
|
||||||
|
}
|
||||||
|
|
||||||
|
ListModel {
|
||||||
|
id: onboardingModel
|
||||||
|
|
||||||
|
ListElement {
|
||||||
|
username: "Three-Words-Name-1"
|
||||||
|
identicon: "https://cdn.impactinit.com/cdn/x/x@e7f13f160e/https://s52.impactinit.com/smsimg30//pv/ingimagecontributors/ing_47129_48199.jpg"
|
||||||
|
keyUid: "0x00192fb10df37c9fb26829eb2cc623cd1bf599e8"
|
||||||
|
address: "0x00192fb10df37c9fb26829eb2cc623cd1bf599e8"
|
||||||
|
}
|
||||||
|
|
||||||
|
ListElement {
|
||||||
|
username: "Three-Words-Name-2"
|
||||||
|
identicon: "https://cdn.impactinit.com/cdn/x/x@e7f13f160e/https://s52.impactinit.com/smsimg30//pv/ingimagecontributors/ing_47129_48199.jpg"
|
||||||
|
keyUid: "0x2efcF85B1a4Ebb49CED4AebFe08d059a6aa755B3"
|
||||||
|
address: "0x00192fb10df37c9fb26829eb2cc623cd1bf599e8"
|
||||||
|
}
|
||||||
|
|
||||||
|
ListElement {
|
||||||
|
username: "Three-Words-Name-3"
|
||||||
|
identicon: "https://cdn.impactinit.com/cdn/x/x@e7f13f160e/https://s52.impactinit.com/smsimg30//pv/ingimagecontributors/ing_47129_48199.jpg"
|
||||||
|
keyUid: "0x2efcF85B1a4Ebb49CED4AebFe08d059a6aa755B3"
|
||||||
|
address: "0x00192fb10df37c9fb26829eb2cc623cd1bf599e8"
|
||||||
|
}
|
||||||
|
|
||||||
|
ListElement {
|
||||||
|
username: "Three-Words-Name-4"
|
||||||
|
identicon: "https://cdn.impactinit.com/cdn/x/x@e7f13f160e/https://s52.impactinit.com/smsimg30//pv/ingimagecontributors/ing_47129_48199.jpg"
|
||||||
|
keyUid: "0x2efcF85B1a4Ebb49CED4AebFe08d059a6aa755B3"
|
||||||
|
address: "0x00192fb10df37c9fb26829eb2cc623cd1bf599e8"
|
||||||
|
}
|
||||||
|
|
||||||
|
ListElement {
|
||||||
|
username: "Three-Words-Name-5"
|
||||||
|
identicon: "https://cdn.impactinit.com/cdn/x/x@e7f13f160e/https://s52.impactinit.com/smsimg30//pv/ingimagecontributors/ing_47129_48199.jpg"
|
||||||
|
keyUid: "0x2efcF85B1a4Ebb49CED4AebFe08d059a6aa755B3"
|
||||||
|
address: "0x00192fb10df37c9fb26829eb2cc623cd1bf599e8"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Component {
|
||||||
|
id: popupComponent
|
||||||
|
DesktopComponents.GenKeyModal {
|
||||||
|
id: chooseChatNameModal
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Catching Signal when Submit arrow button is clicked
|
||||||
|
|
||||||
|
SignalSpy {
|
||||||
|
id: submitArrowClickedSpy
|
||||||
|
signalName: "submitArrowButtonClicked"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function initTestCase() {
|
||||||
|
window.show()
|
||||||
|
}
|
||||||
|
|
||||||
|
function cleanupTestCase() {
|
||||||
|
window.close()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function test_case_ChooseChatNameModal_height_width() {
|
||||||
|
|
||||||
|
var genKeyModal = popupComponent.createObject(window)
|
||||||
|
genKeyModal.open()
|
||||||
|
wait(2000)
|
||||||
|
compare(genKeyModal.height, 504, "height should be 504")
|
||||||
|
compare(genKeyModal.width, 480, "width should be 480")
|
||||||
|
genKeyModal.destroy()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
import QtQuick 2.0
|
||||||
|
|
||||||
|
Item {
|
||||||
|
|
||||||
|
}
|
|
@ -12,6 +12,7 @@ DISTFILES += \
|
||||||
base/ProfileModelData.qml \
|
base/ProfileModelData.qml \
|
||||||
base/WindowTestCase.qml \
|
base/WindowTestCase.qml \
|
||||||
tst_Modals.qml \
|
tst_Modals.qml \
|
||||||
|
tst_choose_chat_name_modal.qml \
|
||||||
tst_initialtest.qml
|
tst_initialtest.qml
|
||||||
|
|
||||||
DISTFILES += $$files("status-desktop/ui/*", true)
|
DISTFILES += $$files("status-desktop/ui/*", true)
|
||||||
|
|
Loading…
Reference in New Issue