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
=== modified file 'src/imports/Components/1.3/ListItemPopover.qml'
--- src/imports/Components/1.3/ListItemPopover.qml 2015-07-01 12:06:34 +0000
+++ src/imports/Components/1.3/ListItemPopover.qml 2017-02-13 17:16:25 +0000
@@ -24,6 +24,7 @@
24 contentWidth: units.gu(25)24 contentWidth: units.gu(25)
2525
26 delegate: ListItem {26 delegate: ListItem {
27 visible: action.visible
27 contentItem.anchors {28 contentItem.anchors {
28 leftMargin: units.gu(2)29 leftMargin: units.gu(2)
29 rightMargin: units.gu(2)30 rightMargin: units.gu(2)
3031
=== modified file 'tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/popups.py'
--- tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/popups.py 2016-08-12 11:42:43 +0000
+++ tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/popups.py 2017-02-13 17:16:25 +0000
@@ -79,6 +79,8 @@
79 name = introspection.get_classname_from_path(path)79 name = introspection.get_classname_from_path(path)
80 if name == b'OverflowPanel':80 if name == b'OverflowPanel':
81 return True81 return True
82 if name == b'ListItemPopover':
83 return True
8284
83 return False85 return False
8486
8587
=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_listitem.ListItemTestCase.qml'
--- tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_listitem.ListItemTestCase.qml 2015-03-03 13:20:06 +0000
+++ tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_listitem.ListItemTestCase.qml 2017-02-13 17:16:25 +0000
@@ -15,7 +15,7 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 1.218import Ubuntu.Components 1.3
1919
20MainView {20MainView {
21 width: units.gu(48)21 width: units.gu(48)
@@ -25,7 +25,10 @@
25 Page {25 Page {
26 id: testPage26 id: testPage
27 objectName: "test_page"27 objectName: "test_page"
28 title: listView.ViewItems.selectMode ? "In selection mode" : "No action triggered"28 header: PageHeader {
29 objectName: 'test_header'
30 title: listView.ViewItems.selectMode ? "In selection mode" : "No action triggered"
31 }
29 ListView {32 ListView {
30 id: listView33 id: listView
31 objectName: "test_view"34 objectName: "test_view"
@@ -40,6 +43,10 @@
40 iconName: "delete"43 iconName: "delete"
41 objectName: 'delete_action'44 objectName: 'delete_action'
42 onTriggered: testPage.title = objectName + " action triggered";45 onTriggered: testPage.title = objectName + " action triggered";
46 },
47 Action {
48 visible: false
49 objectName: 'invisible_action'
43 }50 }
44 ]51 ]
45 }52 }
4653
=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_listitem.py'
--- tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_listitem.py 2015-09-22 15:56:35 +0000
+++ tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_listitem.py 2017-02-13 17:16:25 +0000
@@ -17,6 +17,7 @@
17import os17import os
1818
19import ubuntuuitoolkit19import ubuntuuitoolkit
20from autopilot.introspection import dbus
20from ubuntuuitoolkit import tests21from ubuntuuitoolkit import tests
2122
2223
@@ -34,7 +35,9 @@
34 'UCListItem', objectName='listitem0')35 'UCListItem', objectName='listitem0')
35 self.test_page = self.main_view.select_single(36 self.test_page = self.main_view.select_single(
36 objectName='test_page')37 objectName='test_page')
37 self.assertEqual(self.test_page.title, 'No action triggered')38 header = self.test_page.select_single(
39 'PageHeader', objectName='test_header')
40 self.assertEqual(header.title, 'No action triggered')
3841
39 def test_trigger_delete(self):42 def test_trigger_delete(self):
40 self.test_listitem.trigger_leading_action('delete_action')43 self.test_listitem.trigger_leading_action('delete_action')
@@ -96,3 +99,12 @@
96 'UCListItem', objectName='listitem3')99 'UCListItem', objectName='listitem3')
97 listItem3.toggle_selected()100 listItem3.toggle_selected()
98 self.assertTrue(listItem3.selected)101 self.assertTrue(listItem3.selected)
102
103 def test_popover(self):
104 self.pointing_device.click_object(self.test_listitem, button=3)
105 popover = self.main_view.wait_select_single(
106 'ListItemPopover', objectName='listItemContextMenu')
107 self.assertRaises(
108 ubuntuuitoolkit._custom_proxy_objects._common.ToolkitException,
109 popover.click_action_button, 'invisible_action')
110 popover.click_action_button('delete_action')

Subscribers

People subscribed via source and target branches