@@ -42,6 +42,7 @@ Item {
4242 QtObject { id: rated; property int value: 120 }
4343 QtObject { id: reviews; property int value: 8 }
4444 QtObject { id: progress; property string value: "source" }
45+ QtObject { id: publisher; property string value: "Ubuntu Developer" }
4546 QtObject { id: comments; property var value: [
4647 ["Unity User", 4, "08/20/2013", root.commentary],
4748 ["Unity User", 8, "01/15/2013", root.commentary],
@@ -62,7 +63,8 @@ Item {
6263 property var infoMap: {
6364 "more-screenshots": screenshots,
6465 "rated": rated,
65− "comments": comments
66+ "comments": comments,
67+ "publisher": publisher
6668 }
6769 property var actions: [
6870 { "id": 123, "displayName": "action1" },
@@ -84,6 +86,7 @@ Item {
8486 "more-screenshots": screenshots,
8587 "rated": rated,
8688 "comments": comments,
89+ "publisher": publisher,
8790 "progressbar_source": progressSource
8891 }
8992 property var actions: [
@@ -112,14 +115,15 @@ Item {
112115 function cleanup() {
113116 root.calls = new Array();
114117 sendPreviewSpy.clear();
115− var reviewField = findChild(appPreview, "reviewField");
116− reviewField.focus = false;
117− reviewField.text = "";
118− data.rating = rating.value;
118+ // TODO: This doesn't work right now as Reviews are disabled
119+ //var reviewField = findChild(appPreview, "reviewField");
120+ //reviewField.focus = false;
121+ //reviewField.text = "";
122+ //data.rating = rating.value;
119123 dataProgress.infoMap["progressbar_source"].value = "service";
120− var appReviews = findChild(appPreview, "appReviews");
121− appReviews.visible = false;
122− appPreview.keyboardSize = 0;
124+ //var appReviews = findChild(appPreview, "appReviews");
125+ //appReviews.visible = false;
126+ //appPreview.keyboardSize = 0;
123127 }
124128
125129 function test_actions() {
@@ -137,6 +141,14 @@ Item {
137141 }
138142 }
139143
144+ function test_check_app_info() {
145+ var appInfo = findChild(appPreview, "previewHeader");
146+ var titleLabel = findChild(appInfo, "titleLabel");
147+ var subtitleLabel = findChild(appInfo, "subtitleLabel");
148+ compare(titleLabel.text, data.title, "App Title doesn't match.");
149+ compare(subtitleLabel.text, publisher.value, "Publisher name doesn't match.");
150+ }
151+
140152 function test_rated() {
141153 var rated = findChild(appPreview, "ratedLabel");
142154 compare(rated.text, "(120)", "Rates not equal");
@@ -147,13 +159,16 @@ Item {
147159 compare(rated.text, "8 reviews", "Reviews don't match");
148160 }
149161
150− function test_send_review() {
162+ // TODO: Disabled as reviewing and commenting is currently disabled
163+/* function test_send_review() {
151164 var appReviews = findChild(appPreview, "appReviews");
152165 appReviews.sendReview("review");
153166 sendPreviewSpy.wait();
154167 }
155168
156169 function test_review_focus() {
170+ var columnReviewRating = findChild(appPreview, "columnReviewRating");
171+ columnReviewRating.visible = true;
157172 var appReviews = findChild(appPreview, "appReviews");
158173 appReviews.visible = true;
159174 var sendButton = findChild(appReviews, "sendButton");
@@ -194,6 +209,22 @@ Item {
194209 verify(buttons.visible == true);
195210 }
196211
212+ function test_automatic_scroll_on_keyboard_shown() {
213+ waitForRendering(appPreview);
214+ var appReviews = findChild(appPreview, "appReviews");
215+ appReviews.visible = true;
216+
217+ var leftFlickable = findChild(appPreview, "leftFlickable");
218+ leftFlickable.contentY = leftFlickable.contentHeight;
219+ var reviewField = findChild(appReviews, "reviewField");
220+ appPreview.keyboardSize = 400;
221+ appReviews.editing(reviewField);
222+ var newFlickPos = leftFlickable.contentY;
223+ var keyboardY = shell.height - appPreview.keyboardSize;
224+ verify(newFlickPos < keyboardY);
225+ }
226+
227+*/
197228 function test_progress_show() {
198229 appPreview.previewData = dataProgress;
199230 var progress = findChild(appPreview, "progressBar");
@@ -219,21 +250,5 @@ Item {
219250 compare(root.calls[0][0], actions[1].id, "Id of action not found.");
220251 compare(root.calls[0][1], {"error": "DOWNLOAD ERROR"}, "Data of action not found.");
221252 }
222−
223− function test_automatic_scroll_on_keyboard_shown() {
224− waitForRendering(appPreview);
225− var appReviews = findChild(appPreview, "appReviews");
226− appReviews.visible = true;
227−
228− var leftFlickable = findChild(appPreview, "leftFlickable");
229− leftFlickable.contentY = leftFlickable.contentHeight;
230− var reviewField = findChild(appReviews, "reviewField");
231− appPreview.keyboardSize = 400;
232− appReviews.editing(reviewField);
233− var newFlickPos = leftFlickable.contentY;
234− var keyboardY = shell.height - appPreview.keyboardSize;
235− verify(newFlickPos < keyboardY);
236− }
237−
238253 }
239254}