Merge lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/hideTheDelegate into lp:ubuntu-ui-toolkit/staging

Proposed by Cris Dywan
Status: Merged
Approved by: Cris Dywan
Approved revision: 2160
Merged at revision: 2173
Proposed branch: lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/hideTheDelegate
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 96 lines (+25/-3)
4 files modified
src/imports/Components/1.3/ListItemPopover.qml (+1/-0)
tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/popups.py (+2/-0)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_listitem.ListItemTestCase.qml (+9/-2)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_listitem.py (+13/-1)
To merge this branch: bzr merge lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/hideTheDelegate
Reviewer Review Type Date Requested Status
ubuntu-sdk-build-bot continuous-integration Approve
Tim Peeters Approve
Review via email: mp+316545@code.launchpad.net

Commit message

ListItemPopover delegate should (in)visible as per action

To post a comment you must log in.
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Tim Peeters (tpeeters) wrote :

lgtm

review: Approve
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/imports/Components/1.3/ListItemPopover.qml'
2--- src/imports/Components/1.3/ListItemPopover.qml 2015-07-01 12:06:34 +0000
3+++ src/imports/Components/1.3/ListItemPopover.qml 2017-02-13 17:16:25 +0000
4@@ -24,6 +24,7 @@
5 contentWidth: units.gu(25)
6
7 delegate: ListItem {
8+ visible: action.visible
9 contentItem.anchors {
10 leftMargin: units.gu(2)
11 rightMargin: units.gu(2)
12
13=== modified file 'tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/popups.py'
14--- tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/popups.py 2016-08-12 11:42:43 +0000
15+++ tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/popups.py 2017-02-13 17:16:25 +0000
16@@ -79,6 +79,8 @@
17 name = introspection.get_classname_from_path(path)
18 if name == b'OverflowPanel':
19 return True
20+ if name == b'ListItemPopover':
21+ return True
22
23 return False
24
25
26=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_listitem.ListItemTestCase.qml'
27--- tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_listitem.ListItemTestCase.qml 2015-03-03 13:20:06 +0000
28+++ tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_listitem.ListItemTestCase.qml 2017-02-13 17:16:25 +0000
29@@ -15,7 +15,7 @@
30 */
31
32 import QtQuick 2.0
33-import Ubuntu.Components 1.2
34+import Ubuntu.Components 1.3
35
36 MainView {
37 width: units.gu(48)
38@@ -25,7 +25,10 @@
39 Page {
40 id: testPage
41 objectName: "test_page"
42- title: listView.ViewItems.selectMode ? "In selection mode" : "No action triggered"
43+ header: PageHeader {
44+ objectName: 'test_header'
45+ title: listView.ViewItems.selectMode ? "In selection mode" : "No action triggered"
46+ }
47 ListView {
48 id: listView
49 objectName: "test_view"
50@@ -40,6 +43,10 @@
51 iconName: "delete"
52 objectName: 'delete_action'
53 onTriggered: testPage.title = objectName + " action triggered";
54+ },
55+ Action {
56+ visible: false
57+ objectName: 'invisible_action'
58 }
59 ]
60 }
61
62=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_listitem.py'
63--- tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_listitem.py 2015-09-22 15:56:35 +0000
64+++ tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_listitem.py 2017-02-13 17:16:25 +0000
65@@ -17,6 +17,7 @@
66 import os
67
68 import ubuntuuitoolkit
69+from autopilot.introspection import dbus
70 from ubuntuuitoolkit import tests
71
72
73@@ -34,7 +35,9 @@
74 'UCListItem', objectName='listitem0')
75 self.test_page = self.main_view.select_single(
76 objectName='test_page')
77- self.assertEqual(self.test_page.title, 'No action triggered')
78+ header = self.test_page.select_single(
79+ 'PageHeader', objectName='test_header')
80+ self.assertEqual(header.title, 'No action triggered')
81
82 def test_trigger_delete(self):
83 self.test_listitem.trigger_leading_action('delete_action')
84@@ -96,3 +99,12 @@
85 'UCListItem', objectName='listitem3')
86 listItem3.toggle_selected()
87 self.assertTrue(listItem3.selected)
88+
89+ def test_popover(self):
90+ self.pointing_device.click_object(self.test_listitem, button=3)
91+ popover = self.main_view.wait_select_single(
92+ 'ListItemPopover', objectName='listItemContextMenu')
93+ self.assertRaises(
94+ ubuntuuitoolkit._custom_proxy_objects._common.ToolkitException,
95+ popover.click_action_button, 'invisible_action')
96+ popover.click_action_button('delete_action')

Subscribers

People subscribed via source and target branches