I've made some changes to the code in order to address the
filechooserdialog treeview click issue. http://paste.ubuntu.com/6612284/ .
But I am sure its not the best way to resolve the issue. But I am still not
able to identify the treeview. Looking forward to your review comments.
On Tue, Oct 29, 2013 at 10:01 PM, Prabhendu V Senan <<email address hidden>
> wrote:
Hi Dan,
I've made some changes to the code in order to address the paste.ubuntu. com/6612284/ .
filechooserdialog treeview click issue. http://
But I am sure its not the best way to resolve the issue. But I am still not
able to identify the treeview. Looking forward to your review comments.
On Tue, Oct 29, 2013 at 10:01 PM, Prabhendu V Senan <<email address hidden>
> wrote:
> Prabhendu V Senan has proposed merging /code.launchpad .net/~senan/ ubuntu- autopilot- tests/DiskUsage Analyser/ +merge/ 193087 /code.launchpad .net/~senan/ ubuntu- autopilot- tests/DiskUsage Analyser/ +merge/ 193087 autopilot_ tests/DiskUsage Analyser' autopilot_ tests/DiskUsage Analyser/ __init_ _.py' autopilot_ tests/DiskUsage Analyser/ test_diskUsageA nalyser. py' autopilot_ tests/DiskUsage Analyser/ test_diskUsageA nalyser. py autopilot_ tests/DiskUsage Analyser/ test_diskUsageA nalyser. py erTests( AutopilotTestCa se): AnalyserTests, self).setUp( ) test_applicatio n('baobab' ) Title = self.app. select_ single( 'BaobabWindow' ) device = Pointer( Mouse.create( )) title(self) : (self.mainWindo wTitle. title,Eventuall y(Contains( 'Disk Usage local_folder( self): menu_option_ button = select_ single( BuilderName= 'menu-button' ) device. move_to_ object( self.gear_ menu_option_ button) device. click() scan_folder_ menu_item = select_ single( 'GtkModelMenuIt em',action_ name= 'win.scan-folder') device. move_to_ object( self.create_ scan_folder_ menu_item) device. click() (lambda: select_ single( 'GtkFileChooser Dialog' ).visible, Eventually( Equals( 1))) select_ single( 'GtkFileChooser Dialog' ) (dialog. title,Eventuall y(Equals( 'Select select_ many('GtkTreeVi ew')[0] device. click_object( tree_view) toggle_ button = select_ single( 'GtkToggleButto n',tooltip_ text=u' Type a file name') device. move_to_ object( self.create_ toggle_ button) device. click() type('/ home\n' ) select_ single( 'GtkLabel' ,label= '_Open' ) device. move_to_ object( self.open_ scan_dir) device. click() usage_display_ common( ) remote_ folder( self): menu_option_ button = select_ single( BuilderName= 'menu-button' ) device. move_to_ object( self.gear_ menu_option_ button) device. click() scan_remote_ folder_ menu_item = select_ single( 'GtkModelMenuIt em',action_ name= 'win.scan-remote') device. move_to_ object( self.create_ scan_remote_ folder_ menu_item) device. click() to_server_ dialog = select_ single( 'NautilusConnec tServerDialog' ) t(connect_ to_server_ dialog. title,Eventuall y(Equals( 'Connect type('smb: //foo.example. org\n') t(lambda: select_ single( 'GtkButton' ,label= 'C_onnect' ).sensitive, Eventually( Equals( 1))) t(lambda: select_ single( 'GtkToggleButto n',label= 'gtk-cancel' ).sensitive, Eventually( Equals( 1))) about_dialog( self): press_and_ release( "a") select_ single( 'GtkAboutDialog ',program_ name='baobab' ) t(self. about_dialog. title,Eventuall y(Contains( 'About t(lambda: select_ single( 'GtkToggleButto n',label= 'C_redits' ).sensitive, Eventually( Equals( 1))) t(lambda: select_ single( 'GtkToggleButto n',label= '_Licence' ).sensitive, Eventually( Equals( 1))) list(self) : button_ scan_home_ folder = select_ single( 'GtkLabel' ,label= u'<b>Home folder</b>') device. move_to_ object( self.create_ button_ scan_home_ folder) device. click() usage_display_ common( ) display_ common( self): tree_map_ button = select_ single( 'GtkRadioButton ',BuilderName= 'treemap- button' ) device. move_to_ object( self.create_ tree_map_ button) device. click() (lambda: select_ single( 'BaobabTreemap' ,BuilderName= 'treemap- chart') .visible, Eventually( Equals( 1))) ring_button = select_ single( 'GtkRadioButton ',BuilderName= 'rings- button' ) device. move_to_ object( self.create_ ring_button) device. click() (lambda: select_ single( 'BaobabRingscha rt',BuilderName ='rings- chart') .visible, Eventually( Equals( 1)))
> lp:~senan/ubuntu-autopilot-tests/DiskUsageAnalyser into
> lp:ubuntu-autopilot-tests.
>
> Requested reviews:
> Ubuntu Testcase Admins (ubuntu-testcase)
>
> For more details, see:
>
> https:/
> --
>
> https:/
> You are the owner of lp:~senan/ubuntu-autopilot-tests/DiskUsageAnalyser.
>
> === added directory 'ubuntu_
> === added file 'ubuntu_
> === added file
> 'ubuntu_
> --- ubuntu_
> 1970-01-01 00:00:00 +0000
> +++ ubuntu_
> 2013-10-29 16:26:36 +0000
> @@ -0,0 +1,95 @@
> +from autopilot.testcase import AutopilotTestCase
> +from autopilot.matchers import Eventually
> +from testtools.matchers import Equals, Contains, NotEquals
> +
> +from autopilot.input import Mouse, Pointer
> +
> +import os
> +from time import sleep
> +
> +class DiskUsageAnalys
> +
> + def setUp(self):
> + super(DiskUsage
> + self.app = self.launch_
> + self.mainWindow
> + self.pointing_
> +
> + def test_window_
> + # Verify the Disk Usage Analyzer application Title
> +
> self.assertThat
> Analyzer')))
> +
> + def test_scan_
> + self.gear_
> self.app.
> +
> self.pointing_
> + self.pointing_
> + self.create_
> self.app.
> +
> self.pointing_
> + self.pointing_
> + self.assertThat
> self.app.
> + dialog = self.app.
> + self.assertThat
> Folder')))
> + tree_view = dialog.
> + self.pointing_
> +
> + self.create_
> self.app.
> +
> self.pointing_
> + self.pointing_
> + self.keyboard.
> +
> + #Open the scan directory
> + self.open_scan_dir =
> self.app.
> + self.pointing_
> + self.pointing_
> + self.disk_
> +
> + #def test_scan_
> + ##Scan remote folder--check only the UI components
> + #self.gear_
> self.app.
> +
> #self.pointing_
> + #self.pointing_
> + #self.create_
> self.app.
> +
> #self.pointing_
> + #self.pointing_
> + #sleep(10)
> + #self.connect_
> self.app.
> +
> #self.assertTha
> to Server')))
> + #self.keyboard.
> + #self.assertTha
> self.app.
> + #self.assertTha
> self.app.
> +
> + #def test_baobab_
> + #Test about dialog
> + #press 'a' to open the file dialog
> + #self.keyboard.
> + #self.about_dialog =
> self.app.
> +
> #self.assertTha
> Baobab')))
> + #self.assertTha
> self.app.
> + #self.assertTha
> self.app.
> +
> + def test_home_
> + #scan home folder listed in the applocations start page
> + self.create_
> self.app.
> +
> self.pointing_
> + self.pointing_
> + self.disk_
> +
> + def disk_usage_
> +
> + #Toggle treemap and ring chart
> + self.create_
> self.app.
> +
> self.pointing_
> + self.pointing_
> + self.assertThat
> self.app.
> +
> + self.create_
> self.app.
> +
> self.pointing_
> + self.pointing_
> + self.assertThat
> self.app.
> +
> +
> +
> +
> +
> +
> +
>
>
>
-- senans. wordpress. com/
Regards
Senan
http://