Merge lp:~renatofilho/ubuntu-ui-toolkit/fix-1236464 into lp:ubuntu-ui-toolkit
- fix-1236464
- Merge into trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Cris Dywan | ||||
Approved revision: | 811 | ||||
Merged at revision: | 810 | ||||
Proposed branch: | lp:~renatofilho/ubuntu-ui-toolkit/fix-1236464 | ||||
Merge into: | lp:ubuntu-ui-toolkit | ||||
Diff against target: |
282 lines (+186/-0) 5 files modified
CHANGES (+2/-0) components.api (+2/-0) modules/Ubuntu/Components/ListItems/Empty.qml (+22/-0) tests/autopilot/ubuntuuitoolkit/emulators.py (+68/-0) tests/autopilot/ubuntuuitoolkit/tests/test_emulators.py (+92/-0) |
||||
To merge this branch: | bzr merge lp:~renatofilho/ubuntu-ui-toolkit/fix-1236464 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot | continuous-integration | Approve | |
Olivier Tilloy (community) | Approve | ||
Leo Arias (community) | autopilot code review | Approve | |
Ubuntu SDK team | Pending | ||
Review via email: mp+190496@code.launchpad.net |
Commit message
Implemented emulator for swipe to remove.
Description of the change
- 794. By Renato Araujo Oliveira Filho
-
Added more tests cases.
Fixed swipe to left. - 795. By Renato Araujo Oliveira Filho
-
Reduce the qml example used for swipe to delete emulator test.
Leo Arias (elopio) wrote : | # |
Looks really good. Thanks again.
- 796. By Renato Araujo Oliveira Filho
-
Creeated setUp function to simplify the code.
- 797. By Renato Araujo Oliveira Filho
-
Used single quotes when possible.
- 798. By Renato Araujo Oliveira Filho
-
Moved setUp to the top of the class declaration.
- 799. By Renato Araujo Oliveira Filho
-
Removed white spaces.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:793
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 800. By Renato Araujo Oliveira Filho
-
Updated API changes related files.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:799
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:800
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 801. By Renato Araujo Oliveira Filho
-
Updated components.api.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:801
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
Olivier Tilloy (osomon) wrote : | # |
pep8 reports 22 errors.
pyflakes reports 2 errors.
Olivier Tilloy (osomon) wrote : | # |
126 + if (direction == 'right'):
127 + self.pointing_
128 + else:
129 + self.pointing_
The else clause should be an "elif (direction == 'left')", and you should add an additional else clause that raises some sort of exception if the value of direction is neither 'left' nor 'right'.
Olivier Tilloy (osomon) wrote : | # |
116 + def _get_confirm_
Typo: there’s one t too many.
Olivier Tilloy (osomon) wrote : | # |
148 +class Empty(UbuntuUIT
149 + pass
150 +
151 +class Base(UbuntuUITo
152 + pass
153 +
154 +class ItemSelector(
155 + pass
[…]
In QML, Base and ItemSelector inherit Empty, wouldn’t it be possible to make the emulator classes follow the same inheritance pattern? The same would apply for all emulators, e.g. MultiValue inherit from Base, and so on…
Olivier Tilloy (osomon) wrote : | # |
241 + def test_delete_
242 + self._item.
243 + self._item.
244 + self.assertEqua
For completeness, this test should be duplicated to test the confirmation when swiped to the left.
Renato Araujo Oliveira Filho (renatofilho) wrote : | # |
> 148 +class Empty(UbuntuUIT
> 149 + pass
> 150 +
> 151 +class Base(UbuntuUITo
> 152 + pass
> 153 +
> 154 +class ItemSelector(
> SupportsSwipeTo
> 155 + pass
> […]
>
> In QML, Base and ItemSelector inherit Empty, wouldn’t it be possible to make
> the emulator classes follow the same inheritance pattern? The same would apply
> for all emulators, e.g. MultiValue inherit from Base, and so on…
This is the way the quality guys told me to go, For some reason autopilot will get confused by using what you proposal.
- 802. By Renato Araujo Oliveira Filho
-
Fixed pep8 syntax.
- 803. By Renato Araujo Oliveira Filho
-
Fixed typo buttton
- 804. By Renato Araujo Oliveira Filho
-
Raise error when trying to swipe a item to invalid direction.
Renato Araujo Oliveira Filho (renatofilho) wrote : | # |
> pep8 reports 22 errors.
> pyflakes reports 2 errors.
Fixed on rev: 802
Renato Araujo Oliveira Filho (renatofilho) wrote : | # |
> 116 + def _get_confirm_
>
> Typo: there’s one t too many.
Fixed on rev: 803
Renato Araujo Oliveira Filho (renatofilho) wrote : | # |
> 126 + if (direction == 'right'):
> 127 + self.pointing_
> 128 + else:
> 129 + self.pointing_
>
> The else clause should be an "elif (direction == 'left')", and you should add
> an additional else clause that raises some sort of exception if the value of
> direction is neither 'left' nor 'right'.
Fixed rev: 804
Renato Araujo Oliveira Filho (renatofilho) wrote : | # |
> 241 + def test_delete_
> 242 + self._item.
> 243 + self._item.
> 244 + self.assertEqua
>
> For completeness, this test should be duplicated to test the confirmation when
> swiped to the left.
Fixed on rev 804
Olivier Tilloy (osomon) wrote : | # |
> > pep8 reports 22 errors.
> > pyflakes reports 2 errors.
>
> Fixed on rev: 802
I’m now seeing 3 pyflakes errors.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:804
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 805. By Renato Araujo Oliveira Filho
-
Fixed pyflakes errors.
Olivier Tilloy (osomon) wrote : | # |
> > In QML, Base and ItemSelector inherit Empty, wouldn’t it be possible to make
> > the emulator classes follow the same inheritance pattern? The same would
> apply
> > for all emulators, e.g. MultiValue inherit from Base, and so on…
>
> This is the way the quality guys told me to go, For some reason autopilot will
> get confused by using what you proposal.
I find this awkward, and I don’t really understand why this would confuse autopilot. We’re talking about simple inheritance here. Can you please give it a shot?
- 806. By Renato Araujo Oliveira Filho
-
Use Empty as base class for swipe to delete emulator.
Olivier Tilloy (osomon) wrote : | # |
SingleValue, MultiValue and Subtitled should inherit from Base, not from Empty.
- 807. By Renato Araujo Oliveira Filho
-
Fixed class inheritance
Olivier Tilloy (osomon) wrote : | # |
The inheritance checks need to be updated in test_supported_
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:805
http://
Executed test runs:
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
UNSTABLE: http://
Click here to trigger a rebuild:
http://
- 808. By Renato Araujo Oliveira Filho
-
Fixed test_supported_
class to check the correct class.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:807
http://
Executed test runs:
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
UNSTABLE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:808
http://
Executed test runs:
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
UNSTABLE: http://
Click here to trigger a rebuild:
http://
Olivier Tilloy (osomon) wrote : | # |
Looks good to me now.
- 809. By Renato Araujo Oliveira Filho
-
Merged mainline.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:809
http://
Executed test runs:
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
UNSTABLE: http://
Click here to trigger a rebuild:
http://
- 810. By Renato Araujo Oliveira Filho
-
Merged mainline.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:810
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:810
http://
Executed test runs:
None: http://
None: http://
None: http://
None: http://
None: http://
None: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:810
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:810
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Cris Dywan (kalikiana) wrote : | # |
20:57:51.268 ERROR testresult:35 - FAIL: ubuntuuitoolkit
AssertionError: After 10.0 seconds test on Standard.
- 811. By Renato Araujo Oliveira Filho
-
Attempt to fix the swipe to delete autopilot on device.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:811
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:811
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:811
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Preview Diff
1 | === modified file 'CHANGES' |
2 | --- CHANGES 2013-10-18 02:41:30 +0000 |
3 | +++ CHANGES 2013-10-24 12:01:09 +0000 |
4 | @@ -65,6 +65,8 @@ |
5 | * ADDED IN Panel: function open() |
6 | * ADDED IN Panel: function close() |
7 | * DEPRECATED IN Panel: writable property opened. Will be made read-only. |
8 | +* ADDED IN: Empty: property bool waitingConfirmationForRemoval |
9 | +* ADDED IN: Empty: function cancelItemRemoval() |
10 | * CHANGED in CrossFadeImage: readonly property size sourceSize TO property size sourceSize |
11 | |
12 | Compatibility Breaks |
13 | |
14 | === modified file 'components.api' |
15 | --- components.api 2013-10-18 14:41:53 +0000 |
16 | +++ components.api 2013-10-24 12:01:09 +0000 |
17 | @@ -410,6 +410,7 @@ |
18 | property bool removable |
19 | property bool confirmRemoval |
20 | readonly property string swipingState |
21 | + readonly property bool waitingConfirmationForRemoval |
22 | signal itemRemoved |
23 | property int __height |
24 | property bool showDivider |
25 | @@ -418,6 +419,7 @@ |
26 | property list<Item> backgroundIndicator |
27 | property ThinDivider divider |
28 | property real __contentsMargins |
29 | + function cancelItemRemoval() |
30 | modules/Ubuntu/Components/ListItems/Header.qml |
31 | Item |
32 | property string text |
33 | |
34 | === modified file 'modules/Ubuntu/Components/ListItems/Empty.qml' |
35 | --- modules/Ubuntu/Components/ListItems/Empty.qml 2013-10-04 19:07:26 +0000 |
36 | +++ modules/Ubuntu/Components/ListItems/Empty.qml 2013-10-24 12:01:09 +0000 |
37 | @@ -109,6 +109,12 @@ |
38 | */ |
39 | readonly property alias swipingState: backgroundIndicator.state |
40 | |
41 | + /*! |
42 | + \preliminary |
43 | + \qmlproperty bool waitingConfirmationForRemoval |
44 | + Defines if the item is waiting for the user interaction during the swipe to delete |
45 | + */ |
46 | + readonly property alias waitingConfirmationForRemoval: confirmRemovalDialog.waitingForConfirmation |
47 | |
48 | /*! |
49 | \preliminary |
50 | @@ -162,6 +168,15 @@ |
51 | */ |
52 | property real __contentsMargins: units.gu(2) |
53 | |
54 | + /*! |
55 | + \preliminary |
56 | + Cancel item romoval |
57 | + */ |
58 | + function cancelItemRemoval() |
59 | + { |
60 | + priv.resetDrag() |
61 | + } |
62 | + |
63 | width: parent ? parent.width : units.gu(31) |
64 | implicitHeight: priv.removed ? 0 : __height + bottomDividerLine.height |
65 | __mouseArea.drag.axis: Drag.XAxis |
66 | @@ -218,6 +233,7 @@ |
67 | Resets the item dragging state |
68 | */ |
69 | function resetDrag() { |
70 | + confirmRemovalDialog.waitingForConfirmation = false |
71 | body.x = 0 |
72 | pressedPosition = -1 |
73 | __mouseArea.drag.target = null |
74 | @@ -304,6 +320,7 @@ |
75 | } |
76 | ScriptAction { |
77 | script: { |
78 | + confirmRemovalDialog.waitingForConfirmation = true |
79 | priv.commitDrag() |
80 | } |
81 | } |
82 | @@ -333,9 +350,13 @@ |
83 | |
84 | Item { |
85 | id: confirmRemovalDialog |
86 | + objectName: "confirmRemovalDialog" |
87 | + |
88 | + property bool waitingForConfirmation: false |
89 | |
90 | visible: false |
91 | width: units.gu(15) |
92 | + x: body.x - width - units.gu(2) |
93 | anchors { |
94 | top: parent.top |
95 | bottom: parent.bottom |
96 | @@ -374,6 +395,7 @@ |
97 | } |
98 | |
99 | MouseArea { |
100 | + visible: confirmRemovalDialog.waitingForConfirmation |
101 | anchors.fill: parent |
102 | onClicked: removeItemAnimation.start() |
103 | } |
104 | |
105 | === modified file 'tests/autopilot/ubuntuuitoolkit/emulators.py' |
106 | --- tests/autopilot/ubuntuuitoolkit/emulators.py 2013-10-18 09:37:13 +0000 |
107 | +++ tests/autopilot/ubuntuuitoolkit/emulators.py 2013-10-24 12:01:09 +0000 |
108 | @@ -340,3 +340,71 @@ |
109 | if self.checked: |
110 | self.pointing_device.click_object(self) |
111 | self.checked.wait_for(False) |
112 | + |
113 | + |
114 | +class Empty(UbuntuUIToolkitEmulatorBase): |
115 | + """Base class to emulate swipe to delete""" |
116 | + |
117 | + def _get_confirm_button(self): |
118 | + return self.select_single( |
119 | + 'QQuickItem', objectName='confirmRemovalDialog') |
120 | + |
121 | + def swipe_to_delete(self, direction='right'): |
122 | + """ Swipe the item in a specific direction """ |
123 | + if (self.removable): |
124 | + x, y, w, h = self.globalRect |
125 | + tx = x + (w / 8) |
126 | + ty = y + (h / 2) |
127 | + |
128 | + if (direction == 'right'): |
129 | + self.pointing_device.drag(tx, ty, w, ty) |
130 | + elif (direction == 'left'): |
131 | + self.pointing_device.drag(w - (w*0.1), ty, x, ty) |
132 | + else: |
133 | + raise ToolkitEmulatorException( |
134 | + 'Invalid direction "{0}" used on swipe to delete function' |
135 | + .format(direction)) |
136 | + |
137 | + self.waitingConfirmationForRemoval.wait_for(True) |
138 | + else: |
139 | + raise ToolkitEmulatorException( |
140 | + 'The item "{0}" is not removable'.format(self.objectName)) |
141 | + |
142 | + def confirm_removal(self): |
143 | + """ Comfirm item removal if this was already swiped """ |
144 | + if (self.waitingConfirmationForRemoval): |
145 | + deleteButton = self._get_confirm_button() |
146 | + self.pointing_device.click_object(deleteButton) |
147 | + self.implicitHeight.wait_for(0) |
148 | + else: |
149 | + raise ToolkitEmulatorException( |
150 | + 'The item "{0}" is not waiting for removal confirmation'. |
151 | + format(self.objectName)) |
152 | + |
153 | + |
154 | +class Base(Empty): |
155 | + pass |
156 | + |
157 | + |
158 | +class Standard(Empty): |
159 | + pass |
160 | + |
161 | + |
162 | +class ItemSelector(Empty): |
163 | + pass |
164 | + |
165 | + |
166 | +class SingleControl(Empty): |
167 | + pass |
168 | + |
169 | + |
170 | +class MultiValue(Base): |
171 | + pass |
172 | + |
173 | + |
174 | +class SingleValue(Base): |
175 | + pass |
176 | + |
177 | + |
178 | +class Subtitled(Base): |
179 | + pass |
180 | |
181 | === modified file 'tests/autopilot/ubuntuuitoolkit/tests/test_emulators.py' |
182 | --- tests/autopilot/ubuntuuitoolkit/tests/test_emulators.py 2013-10-18 14:41:53 +0000 |
183 | +++ tests/autopilot/ubuntuuitoolkit/tests/test_emulators.py 2013-10-24 12:01:09 +0000 |
184 | @@ -458,6 +458,98 @@ |
185 | self.assertFalse(mock_click.called) |
186 | |
187 | |
188 | +class SwipeToDeleteTestCase(tests.QMLStringAppTestCase): |
189 | + |
190 | + test_qml = (""" |
191 | +import QtQuick 2.0 |
192 | +import Ubuntu.Components 0.1 |
193 | +import Ubuntu.Components.ListItems 0.1 |
194 | + |
195 | + |
196 | +MainView { |
197 | + width: units.gu(48) |
198 | + height: units.gu(300) |
199 | + |
200 | + Column { |
201 | + width: parent.width |
202 | + |
203 | + Standard { |
204 | + objectName: "listitem_standard" |
205 | + confirmRemoval: true |
206 | + removable: true |
207 | + width: parent.width |
208 | + text: 'Slide to remove' |
209 | + } |
210 | + Empty { |
211 | + objectName: "listitem_empty" |
212 | + width: parent.width |
213 | + } |
214 | + } |
215 | +} |
216 | +""") |
217 | + |
218 | + def setUp(self): |
219 | + super(SwipeToDeleteTestCase, self).setUp() |
220 | + self._item = self.main_view.select_single( |
221 | + emulators.Standard, objectName='listitem_standard') |
222 | + |
223 | + def test_supported_class(self): |
224 | + self.assertTrue(issubclass( |
225 | + emulators.Base, emulators.Empty)) |
226 | + self.assertTrue(issubclass( |
227 | + emulators.ItemSelector, emulators.Empty)) |
228 | + self.assertTrue(issubclass( |
229 | + emulators.Standard, emulators.Empty)) |
230 | + self.assertTrue(issubclass( |
231 | + emulators.SingleControl, emulators.Empty)) |
232 | + self.assertTrue(issubclass( |
233 | + emulators.MultiValue, emulators.Base)) |
234 | + self.assertTrue(issubclass( |
235 | + emulators.SingleValue, emulators.Base)) |
236 | + self.assertTrue(issubclass( |
237 | + emulators.Subtitled, emulators.Base)) |
238 | + |
239 | + def test_standard_emulator(self): |
240 | + self.assertIsInstance(self._item, emulators.Standard) |
241 | + |
242 | + def test_swipe_item(self): |
243 | + self._item.swipe_to_delete() |
244 | + self.assertTrue(self._item.waitingConfirmationForRemoval) |
245 | + |
246 | + def test_swipe_item_to_right(self): |
247 | + self._item.swipe_to_delete('right') |
248 | + self.assertTrue(self._item.waitingConfirmationForRemoval) |
249 | + |
250 | + def test_swipe_item_to_left(self): |
251 | + self._item.swipe_to_delete('left') |
252 | + self.assertTrue(self._item.waitingConfirmationForRemoval) |
253 | + |
254 | + def test_swipe_item_to_wrong_direction(self): |
255 | + self.assertRaises( |
256 | + emulators.ToolkitEmulatorException, |
257 | + self._item.swipe_to_delete, 'up') |
258 | + |
259 | + def test_delete_item_moving_right(self): |
260 | + self._item.swipe_to_delete('right') |
261 | + self._item.confirm_removal() |
262 | + self.assertEqual(self._item.implicitHeight, 0) |
263 | + |
264 | + def test_delete_item_moving_left(self): |
265 | + self._item.swipe_to_delete('left') |
266 | + self._item.confirm_removal() |
267 | + self.assertEqual(self._item.implicitHeight, 0) |
268 | + |
269 | + def test_delete_non_removable_item(self): |
270 | + self._item = self.main_view.select_single( |
271 | + emulators.Empty, objectName='listitem_empty') |
272 | + self.assertRaises( |
273 | + emulators.ToolkitEmulatorException, self._item.swipe_to_delete) |
274 | + |
275 | + def test_confirm_removal_when_item_was_not_swiped(self): |
276 | + self.assertRaises( |
277 | + emulators.ToolkitEmulatorException, self._item.confirm_removal) |
278 | + |
279 | + |
280 | class PageStackTestCase(tests.QMLStringAppTestCase): |
281 | |
282 | test_qml = (""" |
<elopio> renato_: I think it would be enough to test one of the objects that inherit from SwipeToDeleteTe stCase, and then to test that all the emulators you added inherit from SwipeToDeleteTe stCase. item_swiping_ to_the_ left non_removable_ item removal_ when_item_ was_not_ swiped ight.wait_ for(0) wait_for( False)
<elopio> and that second test would be a little dumb, so I would just leave either the empty or the standard item on your test.
<elopio> renato_: every time you do select_single, and continue on the next line, you have a pep8 error there because of the extra space.
<elopio> so jenkins is going to reject your branch for that.
<elopio> renato_: you are missing some tests to cover all the possible flows:
<elopio> test_delete_item -> with default direction value
<elopio> test_delete_
<elopio> test_delete_
<elopio> test_confirm_
<elopio> renato_: and I don't like this: 109␉+ self.implicitHe
<elopio> if the dialog doesn't have a visible property that works, or an opened property or something like that, I think we should fix it to be
<elopio> self.visible.
<elopio> I say "we" as in somebody who know how to do it, not me :)
Thank you for working on this!