Merge lp:~mhr3/unity-lens-shopping/use-proper-emblems into lp:unity-lens-shopping

Proposed by Michal Hruby
Status: Merged
Approved by: Didier Roche-Tolomelli
Approved revision: 24
Merged at revision: 24
Proposed branch: lp:~mhr3/unity-lens-shopping/use-proper-emblems
Merge into: lp:unity-lens-shopping
Diff against target: 64 lines (+36/-4)
2 files modified
src/scope.vala (+23/-4)
tests/manual-tests/shopping-lens-tests.txt (+13/-0)
To merge this branch: bzr merge lp:~mhr3/unity-lens-shopping/use-proper-emblems
Reviewer Review Type Date Requested Status
Paweł Stołowski (community) Approve
Review via email: mp+126461@code.launchpad.net

Commit message

Use proper emblems on the search results

Description of the change

So far we're not using proper emblems on the search results, this ensures we do.

Trivial change, no new tests.

To post a comment you must log in.
Revision history for this message
Paweł Stołowski (stolowski) wrote :

Works fine with latest branch of Unity. +1.

review: Approve
Revision history for this message
Paweł Stołowski (stolowski) wrote :

Ahh.. can you update manual tests?

review: Needs Fixing
Revision history for this message
Unity Merger (unity-merger) wrote :

The Jenkins job https://jenkins.qa.ubuntu.com/job/automerge-unity-lens-shopping/1/console reported an error when processing this lp:~mhr3/unity-lens-shopping/use-proper-emblems branch.
Not merging it.

Revision history for this message
Unity Merger (unity-merger) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Revision history for this message
Paweł Stołowski (stolowski) wrote :

+1

review: Approve
Revision history for this message
Unity Merger (unity-merger) wrote :

The Jenkins job https://jenkins.qa.ubuntu.com/job/automerge-unity-lens-shopping/2/console reported an error when processing this lp:~mhr3/unity-lens-shopping/use-proper-emblems branch.
Not merging it.

Revision history for this message
Unity Merger (unity-merger) wrote :

The Jenkins job https://jenkins.qa.ubuntu.com/job/automerge-unity-lens-shopping/3/console reported an error when processing this lp:~mhr3/unity-lens-shopping/use-proper-emblems branch.
Not merging it.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/scope.vala'
--- src/scope.vala 2012-09-26 15:33:10 +0000
+++ src/scope.vala 2012-09-27 08:48:21 +0000
@@ -383,13 +383,32 @@
383383
384 if (image_uri != "")384 if (image_uri != "")
385 {385 {
386 // TODO: what to do if we have price but no icon?
387 var file = File.new_for_uri (image_uri);386 var file = File.new_for_uri (image_uri);
388 var icon = new AnnotatedIcon (new FileIcon (file));387 var icon = new AnnotatedIcon (new FileIcon (file));
389 // FIXME: dash doesn't like empty string as ribbon388 // FIXME: dash doesn't like empty string as ribbon
390 icon.ribbon = price == null || price == "" ? " " : price; 389 icon.ribbon = price == null || price == "" ? " " : price;
391 // FIXME: the service doesn't expose categories yet390
392 // icon.category = CategoryType.BOOK;391 unowned string category = "";
392 if (result.has_member ("category"))
393 category = result.get_string_member ("category");
394 switch (category)
395 {
396 case "application":
397 icon.category = CategoryType.APPLICATION;
398 break;
399 case "movie":
400 icon.category = CategoryType.MOVIE;
401 break;
402 case "music":
403 icon.category = CategoryType.MUSIC;
404 break;
405 case "book":
406 icon.category = CategoryType.BOOK;
407 break;
408 default:
409 icon.category = CategoryType.HOME; // will use generic icon
410 break;
411 }
393 image_uri = icon.to_string ();412 image_uri = icon.to_string ();
394 }413 }
395414
396415
=== modified file 'tests/manual-tests/shopping-lens-tests.txt'
--- tests/manual-tests/shopping-lens-tests.txt 2012-09-26 06:38:26 +0000
+++ tests/manual-tests/shopping-lens-tests.txt 2012-09-27 08:48:21 +0000
@@ -70,6 +70,19 @@
70Expected Results:70Expected Results:
71Web site for selected item is opened in web browser, with an option to complete purchase.71Web site for selected item is opened in web browser, with an option to complete purchase.
7272
73Emblems on icons provided by the Shopping lens
74----------------------------------------------------
75Whenever there are results from the shopping lens, emblems are present on the icons.
76
77Setup:
78Internet connectivity.
79
80Actions:
81Perform a search so that some results in the "More suggestions" category are displayed. (for example search for "novel")
82
83Expected Results:
84All items that are displayed have an icon categorizing the product - either a music icon, book, movie, or a generic shopping bag icon along with a price.
85
73'Disable' Shopping Lens Search86'Disable' Shopping Lens Search
74----------------------------------------------------87----------------------------------------------------
75Disabling the shopping lens should not show any result.88Disabling the shopping lens should not show any result.

Subscribers

People subscribed via source and target branches

to all changes: