Code review comment for lp:~jonas-drange/ubuntu-system-settings/call-fwd-wait-dual-sim

Revision history for this message
Leo Arias (elopio) wrote :

<elopio> jgdx: we have helpers for switches, so you won't have to check if they are checked before clicking them.
<elopio> http://bazaar.launchpad.net/~ubuntu-sdk-team/ubuntu-ui-toolkit/trunk/view/head:/tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_checkbox.py
--> mehow_ (~Adium@90.197.64.5) has joined #ubuntu-app-devel
<elopio> you use them like this: self.wait_select_single(ubuntuuitoolkit.Checkbox,
<elopio> objectName="callWaitingSwitch")
<elopio> also one for textfields: http://bazaar.launchpad.net/~ubuntu-sdk-team/ubuntu-ui-toolkit/trunk/view/head:/tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_textfield.py
<elopio> jgdx: you could do
<elopio> text_field = self.wait_select_single(ubuntuuitoolkit.TextField, objectName='destNumberField')
<elopio> text_field.write('...')
<elopio> it will take care of focusing the field, of using the right input device and of checking that it was written.
<jgdx> elopio, thanks!
<elopio> jgdx: I think you are not asserting the calls to the mocks anywhere.
<elopio> I got to go for a while. I'll leave this and a couple of other comments on the branch.
<elopio> thanks again jgdx. Nice work with this.

Using the helpers from the toolkit it's important because if they change the behaviour or the design, the change will be transparent for your tests.

« Back to merge proposal