Merge lp:~stolowski/unity-scope-click/apps-new-search-semantics into lp:unity-scope-click

Proposed by Paweł Stołowski
Status: Merged
Approved by: dobey
Approved revision: 400
Merged at revision: 430
Proposed branch: lp:~stolowski/unity-scope-click/apps-new-search-semantics
Merge into: lp:unity-scope-click
Diff against target: 514 lines (+132/-57)
13 files modified
libclickscope/click/index.cpp (+2/-2)
libclickscope/click/index.h (+1/-1)
libclickscope/click/interface.cpp (+1/-1)
libclickscope/tests/integration/webclient_integration.cpp (+1/-1)
libclickscope/tests/test_index.cpp (+9/-9)
scope/clickapps/apps-query.cpp (+3/-5)
scope/clickstore/store-query.cpp (+18/-2)
scope/clickstore/store-query.h (+1/-0)
scope/tests/test_apps_query.cpp (+34/-18)
scope/tests/test_helpers.h (+22/-4)
scope/tests/test_query.cpp (+40/-12)
tests/scope-harness/tests/test_apps.py (+0/-1)
tests/scope-harness/tests/test_store.py (+0/-1)
To merge this branch: bzr merge lp:~stolowski/unity-scope-click/apps-new-search-semantics
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
dobey (community) Approve
Review via email: mp+276634@code.launchpad.net

Commit message

Always push departments (departments should be available also in search mode) and allow searching inside departments.

Description of the change

Always push departments (departments should be available also in search mode) and allow searching inside departments.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
dobey (dobey) wrote :

Looks ok to me.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
401. By Paweł Stołowski

Merged trunk

402. By Paweł Stołowski

Fix test

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libclickscope/click/index.cpp'
2--- libclickscope/click/index.cpp 2016-01-21 23:25:38 +0000
3+++ libclickscope/click/index.cpp 2016-03-09 13:08:23 +0000
4@@ -147,11 +147,11 @@
5 return std::pair<Packages, Packages>(pl, recommends);
6 }
7
8-click::web::Cancellable Index::search (const std::string& query,
9+click::web::Cancellable Index::search (const std::string& query, const std::string& department,
10 std::function<void(click::Packages search_results, click::Packages recommendations)> callback)
11 {
12 click::web::CallParams params;
13- const std::string built_query(build_index_query(query, ""));
14+ const std::string built_query(build_index_query(query, department));
15 params.add(click::QUERY_ARGNAME, built_query.c_str());
16 QSharedPointer<click::web::Response> response(client->call(
17 get_base_url() + click::SEARCH_PATH, "GET", true, build_headers(), "", params));
18
19=== modified file 'libclickscope/click/index.h'
20--- libclickscope/click/index.h 2015-11-24 18:23:23 +0000
21+++ libclickscope/click/index.h 2016-03-09 13:08:23 +0000
22@@ -79,7 +79,7 @@
23 Index(const QSharedPointer<click::web::Client>& client,
24 const QSharedPointer<Configuration> configuration=QSharedPointer<Configuration>(new Configuration()));
25 virtual std::pair<Packages, Packages> package_lists_from_json(const std::string& json);
26- virtual click::web::Cancellable search (const std::string& query, std::function<void(Packages, Packages)> callback);
27+ virtual click::web::Cancellable search (const std::string& query, const std::string& department, std::function<void(Packages, Packages)> callback);
28 virtual click::web::Cancellable get_details(const std::string& package_name, std::function<void(PackageDetails, Error)> callback);
29 virtual click::web::Cancellable bootstrap(std::function<void(const DepartmentList&, const HighlightList&, Error, int)> callback);
30 virtual click::web::Cancellable departments(const std::string& department_href, std::function<void(const DepartmentList&, const HighlightList&, Error, int)> callback);
31
32=== modified file 'libclickscope/click/interface.cpp'
33--- libclickscope/click/interface.cpp 2016-03-07 14:10:22 +0000
34+++ libclickscope/click/interface.cpp 2016-03-09 13:08:23 +0000
35@@ -274,7 +274,7 @@
36 {
37 //
38 // only apply department filtering if not in root of all departments.
39- bool apply_department_filter = (search_query.empty() && !current_department.empty());
40+ bool apply_department_filter = !current_department.empty();
41
42 // get the set of packages that belong to current deparment;
43 std::unordered_set<std::string> packages_in_department;
44
45=== modified file 'libclickscope/tests/integration/webclient_integration.cpp'
46--- libclickscope/tests/integration/webclient_integration.cpp 2014-06-24 17:18:53 +0000
47+++ libclickscope/tests/integration/webclient_integration.cpp 2016-03-09 13:08:23 +0000
48@@ -103,7 +103,7 @@
49 new click::web::Client(namPtr));
50 click::Index index(clientPtr);
51 click::Packages packages;
52- index.search("qr", [&, this](click::Packages found_packages,
53+ index.search("qr", "", [&, this](click::Packages found_packages,
54 click::Packages){
55 packages = found_packages;
56 Quit();
57
58=== modified file 'libclickscope/tests/test_index.cpp'
59--- libclickscope/tests/test_index.cpp 2016-01-21 23:25:38 +0000
60+++ libclickscope/tests/test_index.cpp 2016-03-09 13:08:23 +0000
61@@ -109,7 +109,7 @@
62 .Times(1)
63 .WillOnce(Return(response));
64
65- indexPtr->search("", [](click::Packages, click::Packages) {});
66+ indexPtr->search("", "", [](click::Packages, click::Packages) {});
67 }
68
69 MATCHER_P(QueryContains, query, "")
70@@ -132,7 +132,7 @@
71 .Times(1)
72 .WillOnce(Return(response));
73
74- indexPtr->search("FooBar", [](click::Packages, click::Packages) {});
75+ indexPtr->search("FooBar", "", [](click::Packages, click::Packages) {});
76 }
77
78
79@@ -151,7 +151,7 @@
80 .Times(1)
81 .WillOnce(Return(response));
82
83- indexPtr->search("", [](click::Packages, click::Packages) {});
84+ indexPtr->search("", "", [](click::Packages, click::Packages) {});
85 }
86
87 TEST_F(IndexTest, testBootstrapSignsCall)
88@@ -206,7 +206,7 @@
89 .Times(1)
90 .WillOnce(Return(response));
91
92- indexPtr->search("", [](click::Packages, click::Packages) {});
93+ indexPtr->search("", "", [](click::Packages, click::Packages) {});
94 }
95
96 TEST_F(IndexTest, testSearchCallbackIsCalled)
97@@ -229,7 +229,7 @@
98 .WillOnce(Return(response));
99 EXPECT_CALL(*this, search_callback(_, _)).Times(1);
100
101- indexPtr->search("", [this](click::Packages packages,
102+ indexPtr->search("", "", [this](click::Packages packages,
103 click::Packages recommends){
104 search_callback(packages, recommends);
105 });
106@@ -257,7 +257,7 @@
107 click::Packages empty_package_list;
108 EXPECT_CALL(*this, search_callback(empty_package_list, _)).Times(1);
109
110- indexPtr->search("", [this](click::Packages packages,
111+ indexPtr->search("", "", [this](click::Packages packages,
112 click::Packages recommends){
113 search_callback(packages, recommends);
114 });
115@@ -293,7 +293,7 @@
116 };
117 EXPECT_CALL(*this, search_callback(single_package_list, _)).Times(1);
118
119- indexPtr->search("", [this](click::Packages packages,
120+ indexPtr->search("", "", [this](click::Packages packages,
121 click::Packages recommends){
122 search_callback(packages, recommends);
123 });
124@@ -315,7 +315,7 @@
125 .Times(1)
126 .WillOnce(Return(response));
127
128- auto search_operation = indexPtr->search("", [](click::Packages,
129+ auto search_operation = indexPtr->search("", "", [](click::Packages,
130 click::Packages) {});
131 EXPECT_CALL(reply.instance, abort()).Times(1);
132 search_operation.cancel();
133@@ -341,7 +341,7 @@
134 .Times(1)
135 .WillOnce(Return(response));
136 EXPECT_CALL(reply.instance, errorString()).Times(1).WillOnce(Return("fake error"));
137- indexPtr->search("", [this](click::Packages packages,
138+ indexPtr->search("", "", [this](click::Packages packages,
139 click::Packages recommends){
140 search_callback(packages, recommends);
141 });
142
143=== modified file 'scope/clickapps/apps-query.cpp'
144--- scope/clickapps/apps-query.cpp 2016-02-19 03:35:43 +0000
145+++ scope/clickapps/apps-query.cpp 2016-03-09 13:08:23 +0000
146@@ -412,11 +412,9 @@
147 auto const ignoredApps = impl->configuration.get_ignored_apps();
148 auto const localResults = clickInterfaceInstance().find_installed_apps(querystr, ignoredApps, current_dept, impl->depts_db);
149
150- if (querystr.empty()) {
151- if (impl->depts_db)
152- {
153- push_local_departments(searchReply, localResults);
154- }
155+ if (impl->depts_db)
156+ {
157+ push_local_departments(searchReply, localResults);
158 }
159
160 if (show_top_apps)
161
162=== modified file 'scope/clickstore/store-query.cpp'
163--- scope/clickstore/store-query.cpp 2016-01-06 18:08:33 +0000
164+++ scope/clickstore/store-query.cpp 2016-03-09 13:08:23 +0000
165@@ -429,6 +429,20 @@
166 }
167 }
168
169+void click::Query::push_departments(scopes::SearchReplyProxy const& searchReply)
170+{
171+ auto rootdep = impl->department_lookup.get_department_info("");
172+ if (!rootdep)
173+ {
174+ qWarning() << "No department information available";
175+ return;
176+ }
177+
178+ auto subdepts = rootdep->sub_departments();
179+ auto root = populate_departments(subdepts, "");
180+ push_departments(searchReply, root);
181+}
182+
183 //
184 // push highlights and departments
185 // use cached highlights for root department, otherwise run an async job for highlights of current department.
186@@ -559,7 +573,8 @@
187 else
188 {
189 qDebug() << "starting search of" << QString::fromStdString(query().query_string());
190- impl->search_operation = impl->index.search(query().query_string(), search_cb);
191+ push_departments(searchReply);
192+ impl->search_operation = impl->index.search(query().query_string(), query().department_id(), search_cb);
193 }
194 }
195 });
196@@ -573,7 +588,8 @@
197 else // normal search
198 {
199 qDebug() << "starting search of" << QString::fromStdString(query().query_string());
200- impl->search_operation = impl->index.search(query().query_string(), search_cb);
201+ push_departments(searchReply);
202+ impl->search_operation = impl->index.search(query().query_string(), query().department_id(), search_cb);
203 }
204 }
205 });
206
207=== modified file 'scope/clickstore/store-query.h'
208--- scope/clickstore/store-query.h 2015-11-24 18:23:23 +0000
209+++ scope/clickstore/store-query.h 2016-03-09 13:08:23 +0000
210@@ -88,6 +88,7 @@
211 virtual unity::scopes::Department::SPtr populate_departments(const click::DepartmentList& depts, const std::string& current_department_id);
212 virtual void store_departments(const click::DepartmentList& depts);
213 virtual void push_departments(const scopes::SearchReplyProxy& searchReply, const scopes::Department::SCPtr& root);
214+ virtual void push_departments(scopes::SearchReplyProxy const& searchReply);
215 virtual void add_highlights(scopes::SearchReplyProxy const& searchReply, const PackageSet& installedPackages);
216 virtual void add_available_apps(const scopes::SearchReplyProxy &searchReply, const PackageSet &installedPackages, const std::string &category);
217 virtual click::Interface& clickInterfaceInstance();
218
219=== modified file 'scope/tests/test_apps_query.cpp'
220--- scope/tests/test_apps_query.cpp 2016-02-19 03:35:43 +0000
221+++ scope/tests/test_apps_query.cpp 2016-03-09 13:08:23 +0000
222@@ -172,24 +172,6 @@
223 q.add_fake_store_app(reply);
224 }
225
226-// this matcher expects a list of department ids in depts:
227-// first on the list is the root, followed by children ids.
228-// the arg of the matcher is unity::scopes::Department ptr.
229-MATCHER_P(MatchesDepartments, depts, "") {
230- auto it = depts.begin();
231- if (arg->id() != *it)
232- return false;
233- auto const subdeps = arg->subdepartments();
234- if (subdeps.size() != depts.size() - 1)
235- return false;
236- for (auto const& sub: subdeps)
237- {
238- if (sub->id() != *(++it))
239- return false;
240- }
241- return true;
242-}
243-
244 class DepartmentsTest : public ::testing::Test {
245 protected:
246 virtual void SetUp() override
247@@ -323,3 +305,37 @@
248 q.run(reply);
249 }
250 }
251+
252+TEST_F(DepartmentsTest, testSearchInDepartment)
253+{
254+ auto clickif = std::make_shared<MockClickInterface>();
255+ auto ptrCat = std::make_shared<FakeCategory>("id", "", "", renderer);
256+ auto depts_db = std::make_shared<MockDepartmentsDb>(":memory:", true);
257+
258+ // query for a leaf department
259+ {
260+ const unity::scopes::CannedQuery query("foo.scope", "Fooo", "games");
261+
262+ MockAppsQuery q(query, depts_db, metadata, clickif);
263+
264+ scopes::testing::MockSearchReply mock_reply;
265+ scopes::SearchReplyProxy reply(&mock_reply, [](unity::scopes::SearchReply*){});
266+
267+ std::list<std::string> expected_departments({"", "games"});
268+
269+ EXPECT_CALL(*clickif, find_installed_apps("Fooo", _, "games", _)).WillOnce(Return(installed_apps));
270+ EXPECT_CALL(mock_reply, register_category("local", StrEq(""), _, _)).WillOnce(Return(ptrCat));
271+ EXPECT_CALL(mock_reply, register_category("store", _, _, _)).WillOnce(Return(ptrCat));
272+ EXPECT_CALL(*depts_db, get_department_name("games", expected_locales)).WillOnce(Return("Games"));
273+ EXPECT_CALL(*depts_db, get_children_departments("games")).WillOnce(Return(
274+ std::list<click::DepartmentsDb::DepartmentInfo>({})
275+ ));
276+
277+ EXPECT_CALL(mock_reply, register_departments(MatchesDepartments(expected_departments)));
278+
279+ EXPECT_CALL(mock_reply, push(Matcher<unity::scopes::CategorisedResult const&>(_))).Times(3).WillRepeatedly(Return(true));
280+
281+ q.run(reply);
282+ }
283+
284+}
285
286=== modified file 'scope/tests/test_helpers.h'
287--- scope/tests/test_helpers.h 2014-08-07 15:34:47 +0000
288+++ scope/tests/test_helpers.h 2016-03-09 13:08:23 +0000
289@@ -6,6 +6,7 @@
290 #include "click/index.h"
291 #include <click/interface.h>
292 #include <click/package.h>
293+#include <gtest/gtest.h>
294
295 namespace click
296 {
297@@ -16,6 +17,23 @@
298 static const std::string FAKE_QUERY {"FAKE_QUERY"};
299 static const std::string FAKE_CATEGORY_TEMPLATE {"{}"};
300
301+// this matcher expects a list of department ids in depts:
302+// first on the list is the root, followed by children ids.
303+// the arg of the matcher is unity::scopes::Department ptr.
304+MATCHER_P(MatchesDepartments, depts, "") {
305+ auto it = depts.begin();
306+ if (arg->id() != *it)
307+ return false;
308+ auto const subdeps = arg->subdepartments();
309+ if (subdeps.size() != depts.size() - 1)
310+ return false;
311+ for (auto const& sub: subdeps)
312+ {
313+ if (sub->id() != *(++it))
314+ return false;
315+ }
316+ return true;
317+}
318
319 class MockIndex : public click::Index {
320 click::Packages packages;
321@@ -35,9 +53,9 @@
322
323 }
324
325- click::web::Cancellable search(const std::string &query, std::function<void (click::Packages, click::Packages)> callback) override
326+ click::web::Cancellable search(const std::string &query, const std::string &department, std::function<void (click::Packages, click::Packages)> callback) override
327 {
328- do_search(query, callback);
329+ do_search(query, department, callback);
330 callback(packages, recommends);
331 return click::web::Cancellable();
332 }
333@@ -48,8 +66,8 @@
334 return click::web::Cancellable();
335 }
336
337- MOCK_METHOD2(do_search,
338- void(const std::string&,
339+ MOCK_METHOD3(do_search,
340+ void(const std::string&, const std::string&,
341 std::function<void(click::Packages, click::Packages)>));
342 };
343
344
345=== modified file 'scope/tests/test_query.cpp'
346--- scope/tests/test_query.cpp 2015-07-31 20:06:49 +0000
347+++ scope/tests/test_query.cpp 2016-03-09 13:08:23 +0000
348@@ -141,7 +141,7 @@
349 PackageSet no_installed_packages;
350 const unity::scopes::CannedQuery query("foo.scope", FAKE_QUERY, "");
351 MockQuery q(query, mock_index, dept_lookup, nullptr, highlights, metadata, pay_pkg);
352- EXPECT_CALL(mock_index, do_search(FAKE_QUERY, _)).Times(1);
353+ EXPECT_CALL(mock_index, do_search(FAKE_QUERY, _, _)).Times(1);
354
355 scopes::testing::MockSearchReply mock_reply;
356 scopes::SearchReplyProxy reply(&mock_reply, [](unity::scopes::SearchReply*){});
357@@ -168,7 +168,7 @@
358 PackageSet no_installed_packages;
359 const unity::scopes::CannedQuery query("foo.scope", FAKE_QUERY, "");
360 MockQuery q(query, mock_index, dept_lookup, nullptr, highlights, metadata, pay_pkg);
361- EXPECT_CALL(mock_index, do_search(FAKE_QUERY, _));
362+ EXPECT_CALL(mock_index, do_search(FAKE_QUERY, _, _));
363
364 scopes::CategoryRenderer renderer("{}");
365 auto ptrCat = std::make_shared<FakeCategory>("id", "", "", renderer);
366@@ -199,7 +199,7 @@
367 PackageSet no_installed_packages;
368 const unity::scopes::CannedQuery query("foo.scope", FAKE_QUERY, "");
369 MockQuery q(query, mock_index, dept_lookup, nullptr, highlights, metadata, pay_pkg);
370- EXPECT_CALL(mock_index, do_search(FAKE_QUERY, _));
371+ EXPECT_CALL(mock_index, do_search(FAKE_QUERY, _, _));
372
373 scopes::CategoryRenderer renderer("{}");
374 auto ptrCat = std::make_shared<FakeCategory>("id", "", "", renderer);
375@@ -254,7 +254,7 @@
376 MockPayPackage pay_pkg;
377 const unity::scopes::CannedQuery query("foo.scope", FAKE_QUERY, "");
378 MockQuery q(query, mock_index, dept_lookup, nullptr, highlights, metadata, pay_pkg);
379- EXPECT_CALL(mock_index, do_search(FAKE_QUERY, _));
380+ EXPECT_CALL(mock_index, do_search(FAKE_QUERY, _, _));
381
382 scopes::CategoryRenderer renderer("{}");
383 auto ptrCat = std::make_shared<FakeCategory>("id", "", "", renderer);
384@@ -286,7 +286,7 @@
385 MockPayPackage pay_pkg;
386 const unity::scopes::CannedQuery query("foo.scope", FAKE_QUERY, "");
387 MockQuery q(query, mock_index, dept_lookup, nullptr, highlights, metadata, pay_pkg);
388- EXPECT_CALL(mock_index, do_search(FAKE_QUERY, _));
389+ EXPECT_CALL(mock_index, do_search(FAKE_QUERY, _, _));
390
391 scopes::CategoryRenderer renderer("{}");
392 auto ptrCat = std::make_shared<FakeCategory>("id", "", "", renderer);
393@@ -325,7 +325,7 @@
394 MockPayPackage pay_pkg;
395 const unity::scopes::CannedQuery query("foo.scope", FAKE_QUERY, "");
396 MockQuery q(query, mock_index, dept_lookup, depts_db, highlights, metadata, pay_pkg);
397- EXPECT_CALL(mock_index, do_search(FAKE_QUERY, _));
398+ EXPECT_CALL(mock_index, do_search(FAKE_QUERY, _, _));
399
400 scopes::CategoryRenderer renderer("{}");
401 auto ptrCat = std::make_shared<FakeCategory>("id", "", "", renderer);
402@@ -337,6 +337,34 @@
403 q.wrap_add_available_apps(reply, one_installed_package, FAKE_CATEGORY_TEMPLATE);
404 }
405
406+TEST(QueryTest, testSearchInDepartment)
407+{
408+ auto dept1 = std::make_shared<click::Department>("1", "Department one", "http://one.com", true);
409+ DepartmentList init_departments({dept1});
410+ auto depts_db = std::make_shared<MockDepartmentsDb>(":memory:", true);
411+
412+ MockIndex mock_index(click::Packages(), click::DepartmentList(), init_departments);
413+ scopes::SearchMetadata metadata("en_EN", "phone");
414+
415+ click::DepartmentLookup dept_lookup;
416+ click::HighlightList highlights;
417+ MockPayPackage pay_pkg;
418+ const unity::scopes::CannedQuery query("foo.scope", FAKE_QUERY, "1");
419+ MockQuery q(query, mock_index, dept_lookup, depts_db, highlights, metadata, pay_pkg);
420+ EXPECT_CALL(mock_index, do_search(FAKE_QUERY, "1", _));
421+
422+ scopes::CategoryRenderer renderer("{}");
423+ auto ptrCat = std::make_shared<FakeCategory>("id", "", "", renderer);
424+ EXPECT_CALL(q, register_category(_, _, _, _, _)).Times(2).WillRepeatedly(Return(ptrCat));
425+
426+ std::list<std::string> expected_departments({"", "1"});
427+ scopes::testing::MockSearchReply mock_reply;
428+ EXPECT_CALL(mock_reply, register_departments(MatchesDepartments(expected_departments)));
429+ scopes::SearchReplyProxy reply(&mock_reply, [](unity::scopes::SearchReply*){});
430+ EXPECT_CALL(q, finished(_)).Times(1);
431+ q.wrap_add_available_apps(reply, PackageSet(), FAKE_CATEGORY_TEMPLATE);
432+}
433+
434 class FakeInterface : public click::Interface
435 {
436 public:
437@@ -385,7 +413,7 @@
438 const unity::scopes::CannedQuery query("foo.scope", FAKE_QUERY, "");
439 MockQuery q(query, mock_index, dept_lookup, nullptr, highlights, metadata, pay_pkg);
440 q.purchased_apps.insert({"name"});
441- EXPECT_CALL(mock_index, do_search(FAKE_QUERY, _));
442+ EXPECT_CALL(mock_index, do_search(FAKE_QUERY, _, _));
443
444 scopes::CategoryRenderer renderer("{}");
445 auto ptrCat = std::make_shared<FakeCategory>("id", "", "", renderer);
446@@ -421,7 +449,7 @@
447 const unity::scopes::CannedQuery query("foo.scope", FAKE_QUERY, "");
448 MockQuery q(query, mock_index, dept_lookup, nullptr, highlights, metadata, pay_pkg);
449 q.purchased_apps.insert({"name"});
450- EXPECT_CALL(mock_index, do_search(FAKE_QUERY, _));
451+ EXPECT_CALL(mock_index, do_search(FAKE_QUERY, _, _));
452
453 scopes::CategoryRenderer renderer("{}");
454 auto ptrCat = std::make_shared<FakeCategory>("id", "", "", renderer);
455@@ -456,7 +484,7 @@
456 MockPayPackage pay_pkg;
457 const unity::scopes::CannedQuery query("foo.scope", FAKE_QUERY, "");
458 MockQuery q(query, mock_index, dept_lookup, nullptr, highlights, metadata, pay_pkg);
459- EXPECT_CALL(mock_index, do_search(FAKE_QUERY, _));
460+ EXPECT_CALL(mock_index, do_search(FAKE_QUERY, _, _));
461
462 scopes::CategoryRenderer renderer("{}");
463 auto ptrCat = std::make_shared<FakeCategory>("id", "", "", renderer);
464@@ -488,7 +516,7 @@
465 MockPayPackage pay_pkg;
466 const unity::scopes::CannedQuery query("foo.scope", FAKE_QUERY, "");
467 MockQuery q(query, mock_index, dept_lookup, nullptr, highlights, metadata, pay_pkg);
468- EXPECT_CALL(mock_index, do_search(FAKE_QUERY, _));
469+ EXPECT_CALL(mock_index, do_search(FAKE_QUERY, _, _));
470
471 scopes::CategoryRenderer renderer("{}");
472 auto ptrCat = std::make_shared<FakeCategory>("id", "", "", renderer);
473@@ -521,7 +549,7 @@
474 MockPayPackage pay_pkg;
475 const unity::scopes::CannedQuery query("foo.scope", FAKE_QUERY, "");
476 MockQuery q(query, mock_index, dept_lookup, nullptr, highlights, metadata, pay_pkg);
477- EXPECT_CALL(mock_index, do_search(FAKE_QUERY, _));
478+ EXPECT_CALL(mock_index, do_search(FAKE_QUERY, _, _));
479
480 scopes::CategoryRenderer renderer("{}");
481 auto ptrCat = std::make_shared<FakeCategory>("id", "", "", renderer);
482@@ -617,7 +645,7 @@
483 MockPayPackage pay_pkg;
484 const unity::scopes::CannedQuery query("foo.scope", FAKE_QUERY, "");
485 MockQuery q(query, mock_index, dept_lookup, nullptr, highlights, metadata, pay_pkg);
486- EXPECT_CALL(mock_index, do_search(FAKE_QUERY, _));
487+ EXPECT_CALL(mock_index, do_search(FAKE_QUERY, _, _));
488
489 scopes::CategoryRenderer renderer("{}");
490 auto ptrCat = std::make_shared<FakeCategory>("id", "", "", renderer);
491
492=== modified file 'tests/scope-harness/tests/test_apps.py'
493--- tests/scope-harness/tests/test_apps.py 2015-06-22 17:05:41 +0000
494+++ tests/scope-harness/tests/test_apps.py 2016-03-09 13:08:23 +0000
495@@ -107,7 +107,6 @@
496 departments = self.view.browse_department('')
497
498 self.assertTrue(self.view.has_departments)
499- self.assertFalse(self.view.has_alt_departments)
500
501 # TODO: list all expected departments (depending on installed apps)
502 match = DepartmentMatcher() \
503
504=== modified file 'tests/scope-harness/tests/test_store.py'
505--- tests/scope-harness/tests/test_store.py 2015-04-03 18:33:10 +0000
506+++ tests/scope-harness/tests/test_store.py 2016-03-09 13:08:23 +0000
507@@ -111,7 +111,6 @@
508 departments = self.view.browse_department('')
509
510 self.assertTrue(self.view.has_departments)
511- self.assertFalse(self.view.has_alt_departments)
512
513 match = DepartmentMatcher() \
514 .mode(DepartmentMatcherMode.STARTS_WITH) \

Subscribers

People subscribed via source and target branches