@@ -25,6 +25,9 @@ Item {
25 width: units.gu(60)
25 width: units.gu(60)
26 height: units.gu(80)
26 height: units.gu(80)
29+ QtObject { id: shell; property int height: appPreview.height }
28 property var calls: []
31 property var calls: []
30 SignalSpy {
33 SignalSpy {
@@ -114,6 +117,9 @@ Item {
114 reviewField.text = "";
117 reviewField.text = "";
115 data.rating = rating.value;
118 data.rating = rating.value;
116 dataProgress.infoMap["progressbar_source"].value = "service";
119 dataProgress.infoMap["progressbar_source"].value = "service";
120+ var appReviews = findChild(appPreview, "appReviews");
121+ appReviews.visible = false;
122+ appPreview.keyboardSize = 0;
119 function test_actions() {
125 function test_actions() {
@@ -149,6 +155,7 @@ Item {
150 function test_review_focus() {
156 function test_review_focus() {
151 var appReviews = findChild(appPreview, "appReviews");
157 var appReviews = findChild(appPreview, "appReviews");
158+ appReviews.visible = true;
152 var sendButton = findChild(appReviews, "sendButton");
159 var sendButton = findChild(appReviews, "sendButton");
153 var reviewField = findChild(appReviews, "reviewField");
160 var reviewField = findChild(appReviews, "reviewField");
@@ -213,5 +220,20 @@ Item {
213 compare(root.calls[0][1], {"error": "DOWNLOAD ERROR"}, "Data of action not found.");
220 compare(root.calls[0][1], {"error": "DOWNLOAD ERROR"}, "Data of action not found.");
223+ function test_automatic_scroll_on_keyboard_shown() {
224+ waitForRendering(appPreview);
225+ var appReviews = findChild(appPreview, "appReviews");
226+ appReviews.visible = true;
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);