so the test_window_title is still failing for me due to the locale issue with the spelling of analyser so i would just remove that and assert 'Disk Usage '.
Also when entering text you need explicitly make sure you get the text entry focus, by either clicking on it assert entry.is_focus = True and then type or you can use the focused_type context manager. e.g currenlty you have this
Which once you have clicked the toggle button we do not actually know if the entry is now visable and has focus before typing. So after the clicking the toggle button you need to
1) assert entry.visible == True
2) either click on the entry and assert entry.is_focus == True before typing
or use the focused_type context manager (which i prefer) which looks something like
entry = self.app.select_single('GtkFileChooserEntry')
with self.keyboard.focused_type(entry) as kb:
kb.type(key_input)
self.assertThat(entry.text, Equals(key_input)) (after typing assert it type correctly)
kb.press_and_release('Enter')
3) test you have ended where you expected :-)
So anywhere in your tests you are entering text you need to do one of the above so we know the entry has focus if we can't get focus then we have a bug :-)
One last thing all boolean values your test that are using ints need to be changed for autopilot 1.4 i.e
self.assertThat(window.visible, Equals(1)) will become self.assertThat(window.visible, Equals(True)) and all 0 values become False. If you are on saucy install autopilot from the ppa:autopilot/ppa and you will get autopilot 1.4
We need to make our tests compliant with 1.4 as soon as possible.
THank you for iterating over these tests, your doing a great job and soon you will get into the swing of it, just hang in there :-)
Senan
so the test_window_title is still failing for me due to the locale issue with the spelling of analyser so i would just remove that and assert 'Disk Usage '.
Also when entering text you need explicitly make sure you get the text entry focus, by either clicking on it assert entry.is_focus = True and then type or you can use the focused_type context manager. e.g currenlty you have this
111 + self.create_ toggle_ button = self.app. select_ single( 'GtkToggleButto n',tooltip_ text=u' Type a file name') device. move_to_ object( self.create_ toggle_ button) device. click() type(key_ input)
112 + self.pointing_
113 + self.pointing_
114 + self.keyboard.
Which once you have clicked the toggle button we do not actually know if the entry is now visable and has focus before typing. So after the clicking the toggle button you need to
1) assert entry.visible == True
2) either click on the entry and assert entry.is_focus == True before typing
or use the focused_type context manager (which i prefer) which looks something like
entry = self.app. select_ single( 'GtkFileChooser Entry') focused_ type(entry) as kb: type(key_ input) assertThat( entry.text, Equals(key_input)) (after typing assert it type correctly) press_and_ release( 'Enter' )
with self.keyboard.
kb.
self.
kb.
3) test you have ended where you expected :-)
So anywhere in your tests you are entering text you need to do one of the above so we know the entry has focus if we can't get focus then we have a bug :-)
One last thing all boolean values your test that are using ints need to be changed for autopilot 1.4 i.e
self.assertThat (window. visible, Equals(1)) will become self.assertThat (window. visible, Equals(True)) and all 0 values become False. If you are on saucy install autopilot from the ppa:autopilot/ppa and you will get autopilot 1.4
We need to make our tests compliant with 1.4 as soon as possible.
THank you for iterating over these tests, your doing a great job and soon you will get into the swing of it, just hang in there :-)
Dan