on xenial help sign in
Test initialValue
commit83c8744e0c45fb4b9080739ca01272af8671da72 authorAndrea Cimitan <andrea.cimitan@gmail.com> dateTue 26 Aug 2014, 15:47 (12 years ago) parent3b316ee
1 file changed+11−1
tests/qmltests/Dash/ScopeSettings/tst_ScopeSettingList.qml+11−1
tests/qmltests/Dash/ScopeSettings/tst_ScopeSettingList.qml+11−1
@@ -32,8 +32,8 @@ Rectangle {
3232
3333 ScopeSettingList {
3434 id: scopeSetting
35− widgetData: settingData
3635 width: parent.width
36+ initialValue: 2
3737 }
3838
3939 SignalSpy {
@@ -49,11 +49,21 @@ Rectangle {
4949
5050 property var control: findChild(scopeSetting, "control")
5151
52+ function initTestCase() {
53+ scopeSetting.widgetData = settingData;
54+ }
55+
5256 function cleanup() {
5357 control.selectedIndex = 0;
5458 spy.clear();
5559 }
5660
61+ function test_0initialValue() {
62+ // this works because is the first test to run
63+ tryCompare(control, "selectedIndex", 2);
64+ scopeSetting.initialValue = -1;
65+ }
66+
5767 function test_updated_data() {
5868 return [
5969 { tag: "current", index: 0, updated: false },