on xenial help sign in
Fix tst_PageHeaderLabel.qml
commit11dfaf4b54ee693d2a1701d6928b25f2d94167fc authorAlbert Astals <albert.astals@canonical.com> dateTue 13 May 2014, 10:17 (12 years ago) parent90026e4
2 files changed+4−4
tests/mocks/Unity/fake_scope.h+1−1 tests/qmltests/Components/tst_PageHeaderLabel.qml+3−3
tests/mocks/Unity/fake_scope.h+1−1
@@ -53,7 +53,7 @@ public:
5353 void setNoResultsHint(const QString& hint) override;
5454 void setFormFactor(const QString& form_factor) override;
5555 void setActive(const bool) override;
56− void setSearchInProgress(const bool inProg);
56+ Q_INVOKABLE void setSearchInProgress(const bool inProg); // This is not invokable in the Interface, here for testing benefits
5757
5858 Q_INVOKABLE void activate(QVariant const& result) override;
5959 Q_INVOKABLE PreviewStack* preview(QVariant const& result) override;
tests/qmltests/Components/tst_PageHeaderLabel.qml+3−3
@@ -148,17 +148,17 @@ Item {
148148
149149 pageHeader.triggerSearch()
150150
151− scopeMock.searchInProgress = false
151+ scopeMock.setSearchInProgress(false);
152152 compare(searchIndicator.running, false, "Search indicator is running.")
153153 tryCompare(primaryImage, "visible", true)
154154
155− scopeMock.searchInProgress = true
155+ scopeMock.setSearchInProgress(true);
156156 compare(searchIndicator.running, true, "Search indicator isn't running.")
157157 tryCompare(primaryImage, "visible", false)
158158 }
159159
160160 function cleanup() {
161− scopeMock.searchInProgress = false;
161+ scopeMock.setSearchInProgress(false);
162162 pageHeader.resetSearch();
163163 }
164164