@@ -33,6 +33,11 @@ Rectangle {
3333 ScopeSettingList {
3434 id: scopeSetting
3535 width: parent.width
36+ widgetData: settingData
37+ }
38+
39+ ScopeSettingList {
40+ id: scopeSettingFresh
3641 initialValue: 2
3742 }
3843
@@ -49,19 +54,15 @@ Rectangle {
4954
5055 property var control: findChild(scopeSetting, "control")
5156
52− function initTestCase() {
53− scopeSetting.widgetData = settingData;
54− }
55−
5657 function cleanup() {
5758 control.selectedIndex = 0;
5859 spy.clear();
5960 }
6061
61− function test_0initialValue() {
62− // this works because is the first test to run
63− tryCompare(control, "selectedIndex", 2);
64− scopeSetting.initialValue = -1;
62+ function test_initialValue() {
63+ var controlFresh = findChild(scopeSettingFresh, "control");
64+ scopeSettingFresh.widgetData = settingData;
65+ tryCompare(controlFresh, "selectedIndex", 2);
6566 }
6667
6768 function test_updated_data() {