@@ -72,29 +72,29 @@ Item {
7272 name: "AppReviews"
7373 when: windowShown
7474
75− function test_state_nothing() {
76− appReviews.state = "";
75+ function cleanup() {
76+ sendReviewSpy.clear();
7777 var reviewField = findChild(appReviews, "reviewField");
78− var sendButton = findChild(appReviews, "sendButton");
79− compare(reviewField.width, appReviews.width, "ReviewField width don't match");
80− compare(sendButton.opacity, 0, "SendButton opacity should be 0");
78+ reviewField.focus = false;
79+ reviewField.text = "";
8180 }
8281
8382 function test_send_review() {
84− sendReviewSpy.clear();
8583 var sendButton = findChild(appReviews, "sendButton");
8684 mouseClick(sendButton, 1, 1);
87− compare(sendReviewSpy.count, 1, "SendReview signal not emitted");
85+ sendReviewSpy.wait();
8886 }
8987
9088 function test_review_focus() {
91− sendReviewSpy.clear();
9289 var sendButton = findChild(appReviews, "sendButton");
9390 var reviewField = findChild(appReviews, "reviewField");
94− var animation = findChild(appReviews, "editingAnimation");
9591
9692 compare(reviewField.focus, false, "ReviewField shouldn't have focus");
9793 compare(appReviews.state, "", "State should be empty");
94+
95+ mouseClick(reviewField, reviewField.width/2, reviewField.height/2);
96+ compare(reviewField.focus, true, "Review Field should have focus");
97+ compare(appReviews.state, "editing", "State should be 'editing'");
9898 }
9999
100100 function test_comments() {