@@ -35,7 +35,7 @@ Item {
36 property string commentary: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus a mi vitae augue rhoncus lobortis ut rutrum metus. Curabitur tortor leo, tristique sed mollis quis, condimentum venenatis nibh.";
36 property string commentary: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus a mi vitae augue rhoncus lobortis ut rutrum metus. Curabitur tortor leo, tristique sed mollis quis, condimentum venenatis nibh.";
37 QtObject { id: screenshots; property var value: ["fake_image1.png", "fake_image2.png", "fake_image3.png"] }
37 QtObject { id: screenshots; property var value: ["fake_image1.png", "fake_image2.png", "fake_image3.png"] }
38− QtObject { id: rating; property int value: 8 }
38+ QtObject { id: rating; property real value: 0.8 }
39 QtObject { id: rated; property int value: 120 }
39 QtObject { id: rated; property int value: 120 }
40 QtObject { id: reviews; property int value: 8 }
40 QtObject { id: reviews; property int value: 8 }
41 QtObject { id: progress; property string value: "source" }
41 QtObject { id: progress; property string value: "source" }
@@ -51,7 +51,7 @@ Item {
51 property string title: "Unity App"
51 property string title: "Unity App"
52 property string appIcon: "fake_image.png"
52 property string appIcon: "fake_image.png"
53 property string description: "This is an Application description"
53 property string description: "This is an Application description"
54− property real rating: rating.value / 10.0
54+ property real rating: rating.value
55 property int numRatings: reviews.value
55 property int numRatings: reviews.value
56 property var execute: root.fake_call
56 property var execute: root.fake_call
57 property var infoMap: {
57 property var infoMap: {
@@ -88,6 +88,7 @@ Item {
88 var reviewField = findChild(appPreview, "reviewField");
88 var reviewField = findChild(appPreview, "reviewField");
89 reviewField.focus = false;
89 reviewField.focus = false;
90 reviewField.text = "";
90 reviewField.text = "";
91+ data.rating = rating.value;
93 function test_actions() {
94 function test_actions() {
@@ -148,5 +149,18 @@ Item {
148 compare(comment, comments.value[i][3], "Comment don't match");
149 compare(comment, comments.value[i][3], "Comment don't match");
153+ function test_negative_rating() {
155+ var rated = findChild(appPreview, "reviewsLabel");
156+ verify(rated.visible == false);
157+ var commentsArea = findChild(appPreview, "commentsArea");
158+ verify(commentsArea.visible == false);
159+ var appReviews = findChild(appPreview, "appReviews");
160+ verify(appReviews.visible == false);
161+ var buttons = findChild(appPreview, "gridButtons");
162+ verify(buttons.visible == true);