Merge lp:~laney/autopilot-gtk/tests-wait-not-visible into lp:autopilot-gtk

Proposed by Iain Lane on 2015-08-24
Status: Merged
Approved by: Marco Trevisan (Treviño) on 2015-08-26
Approved revision: 78
Merged at revision: 77
Proposed branch: lp:~laney/autopilot-gtk/tests-wait-not-visible
Merge into: lp:autopilot-gtk
Diff against target: 16 lines (+4/-1)
1 file modified
tests/autopilot/tests/test_actions.py (+4/-1)
To merge this branch: bzr merge lp:~laney/autopilot-gtk/tests-wait-not-visible
Reviewer Review Type Date Requested Status
Max Brustkern (community) Approve on 2015-08-28
Brendan Donegan (community) Approve on 2015-08-28
PS Jenkins bot continuous-integration Needs Fixing on 2015-08-26
Marco Trevisan (Treviño) 2015-08-24 Approve on 2015-08-25
Review via email: mp+268928@code.launchpad.net

Commit message

Wait until the dialog actually goes away before checking for its disappearance to fix failing test.

Description of the change

Wait until the dialog actually goes away before checking for its disappearance. Supersedes

  https://code.launchpad.net/~canonical-platform-qa/autopilot-gtk/fix-failing-mouse-test_1483815/+merge/268869

Maybe the second assert is unnecessary now?

To post a comment you must log in.
Marco Trevisan (Treviño) (3v1n0) wrote :

Change looks fine to me, CI failures aren't related to this.

review: Approve
Marco Trevisan (Treviño) (3v1n0) wrote :

Err, shouldn't the visibilty checked before trying to push the button (as for the comment on the previous review)?

Iain Lane (laney) wrote :

On Tue, Aug 25, 2015 at 11:17:27AM -0000, Marco Trevisan (Treviño) wrote:
> Err, shouldn't the visibilty checked before trying to push the button (as for the comment on the previous review)?

I think it was wrong. If we can select the dialog then it's visible.

Did you try running it?

If you want we could make it wait_select_single('GtkButton', visible=True)

--
Iain Lane [ <email address hidden> ]
Debian Developer [ <email address hidden> ]
Ubuntu Developer [ <email address hidden> ]

Marco Trevisan (Treviño) (3v1n0) wrote :

> On Tue, Aug 25, 2015 at 11:17:27AM -0000, Marco Trevisan (Treviño) wrote:
> Did you try running it?

Yeah, it was fine, but then I read your previous comment and you know AP might be very unstable when handling time-dependent things.

> If you want we could make it wait_select_single('GtkButton', visible=True)

Well, this might be better to avoid any false positive.

78. By Iain Lane on 2015-08-26

Make sure we have the dialog

Iain Lane (laney) wrote :

On Wed, Aug 26, 2015 at 12:41:33PM -0000, Marco Trevisan (Treviño) wrote:
> > On Tue, Aug 25, 2015 at 11:17:27AM -0000, Marco Trevisan (Treviño) wrote:
> > Did you try running it?
>
> Yeah, it was fine, but then I read your previous comment and you know AP might be very unstable when handling time-dependent things.
>
> > If you want we could make it wait_select_single('GtkButton', visible=True)
>
> Well, this might be better to avoid any false positive.

pushed, try that.

--
Iain Lane [ <email address hidden> ]
Debian Developer [ <email address hidden> ]
Ubuntu Developer [ <email address hidden> ]

Max Brustkern (nuclearbob) wrote :

With the silo 19 PPA installed, I see test failures on unity8 I didn't see on trunk. We can investigate further.

Marco Trevisan (Treviño) (3v1n0) wrote :

I guess this can't cause u8 failures.

Iain Lane (laney) wrote :

On Wed, Aug 26, 2015 at 07:14:51PM -0000, Max Brustkern wrote:
> With the silo 19 PPA installed, I see test failures on unity8 I didn't see on trunk. We can investigate further.

Details please - as Marco says, this is suspicious - the only changes
that aren't straight rebuilds are test fixes.

--
Iain Lane [ <email address hidden> ]
Debian Developer [ <email address hidden> ]
Ubuntu Developer [ <email address hidden> ]

Brendan Donegan (brendan-donegan) wrote :

Given that the failures in Jenkins couldn't be caused by this MP, I'll approve, but they should be looked at - I'll file a bug

review: Approve
Max Brustkern (nuclearbob) wrote :

FWIW, I've also completed the browser testing and found no errors, and the uuit testing looks good so far.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/autopilot/tests/test_actions.py'
2--- tests/autopilot/tests/test_actions.py 2013-12-18 10:48:35 +0000
3+++ tests/autopilot/tests/test_actions.py 2015-08-26 12:58:20 +0000
4@@ -121,8 +121,11 @@
5 None)
6
7 # close the dialog
8- btn = md.select_single('GtkButton')
9+ btn = md.wait_select_single('GtkButton', visible=True)
10 self.mouse.click_object(btn)
11+ # We don't have Eventually(raises(... support, so wait until the second
12+ # assert should be okay to test.
13+ self.assertThat(md.visible, Eventually(Equals(False)))
14 self.assertThat(
15 lambda: self.app.select_single('GtkMessageDialog', visible=True),
16 raises(StateNotFoundError)

Subscribers

People subscribed via source and target branches

to all changes: