mirror of
https://github.com/status-im/desktop-ui-tests.git
synced 2025-01-11 21:34:15 +00:00
Merge pull request #34 from status-im/feat/pickerbtn_test
Add test for StatusPickerButton
This commit is contained in:
commit
df3663eeab
@ -14,5 +14,6 @@
|
|||||||
<file>tst_statuslistitem.qml</file>
|
<file>tst_statuslistitem.qml</file>
|
||||||
<file>tst_statusexpandableitem.qml</file>
|
<file>tst_statusexpandableitem.qml</file>
|
||||||
<file>tst_status_switch.qml</file>
|
<file>tst_status_switch.qml</file>
|
||||||
|
<file>tst_status_picker_button.qml</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
29
tst_status_picker_button.qml
Normal file
29
tst_status_picker_button.qml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
import QtQuick 2.14
|
||||||
|
import QtTest 1.14
|
||||||
|
|
||||||
|
import "base"
|
||||||
|
|
||||||
|
import StatusQ.Controls 0.1
|
||||||
|
|
||||||
|
WindowTestCase {
|
||||||
|
name: "StatusPickerButton test"
|
||||||
|
|
||||||
|
SignalSpy {
|
||||||
|
id: clickedSpy
|
||||||
|
target: pickerButton
|
||||||
|
signalName: "clicked"
|
||||||
|
}
|
||||||
|
|
||||||
|
StatusPickerButton {
|
||||||
|
id: pickerButton
|
||||||
|
parent: windowContent
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_clickOnPickerButton() {
|
||||||
|
verify(clickedSpy.valid, "Signal not valid")
|
||||||
|
|
||||||
|
compare(clickedSpy.count, 0, "Signal spy is not cleared")
|
||||||
|
mouseClick(pickerButton, 1, 1, Qt.LeftButton)
|
||||||
|
compare(clickedSpy.count, 1, "StatusPickerButton is not emit clicked")
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user