Merge lp:~lderan/ubuntu-autopilot-tests/ubuntu-autopilot-tests into lp:ubuntu-autopilot-tests

Proposed by Thomas Molloy
Status: Needs review
Proposed branch: lp:~lderan/ubuntu-autopilot-tests/ubuntu-autopilot-tests
Merge into: lp:ubuntu-autopilot-tests
Diff against target: 1649 lines (+1350/-3)
52 files modified
xubuntu_autopilot_tests/abiword/__init__.py (+2/-0)
xubuntu_autopilot_tests/abiword/test_abiword.py (+65/-0)
xubuntu_autopilot_tests/catfish/__init__.py (+2/-0)
xubuntu_autopilot_tests/catfish/test_catfish.py (+51/-0)
xubuntu_autopilot_tests/evince/__init__.py (+2/-0)
xubuntu_autopilot_tests/evince/test_evince.py (+51/-0)
xubuntu_autopilot_tests/file-roller/__init__.py (+2/-0)
xubuntu_autopilot_tests/file-roller/test_file_roller.py (+51/-0)
xubuntu_autopilot_tests/gmusicbrowser/__init__.py (+2/-0)
xubuntu_autopilot_tests/gmusicbrowser/test_gmusicbrowser.py (+51/-0)
xubuntu_autopilot_tests/gnome-calculator/__init__.py (+2/-0)
xubuntu_autopilot_tests/gnome-calculator/test_gnome_calculator.py (+51/-0)
xubuntu_autopilot_tests/gnumeric/__init__.py (+2/-0)
xubuntu_autopilot_tests/gnumeric/test_gnumeric.py (+51/-0)
xubuntu_autopilot_tests/gthumb/__init__.py (+2/-0)
xubuntu_autopilot_tests/gthumb/test_gthumb.py (+51/-0)
xubuntu_autopilot_tests/gucharmap/__init__.py (+2/-0)
xubuntu_autopilot_tests/gucharmap/test_gucharmap.py (+51/-0)
xubuntu_autopilot_tests/mousepad/__init__.py (+2/-0)
xubuntu_autopilot_tests/mousepad/test_mousepad.py (+51/-0)
xubuntu_autopilot_tests/onboard/__init__.py (+2/-0)
xubuntu_autopilot_tests/onboard/test_onboard.py (+51/-0)
xubuntu_autopilot_tests/orage-calendar/__init__.py (+2/-0)
xubuntu_autopilot_tests/orage-calendar/test_orage_calendar.py (+51/-0)
xubuntu_autopilot_tests/orage-globaltime/__init__.py (+2/-0)
xubuntu_autopilot_tests/orage-globaltime/test_orage_globaltime.py (+51/-0)
xubuntu_autopilot_tests/pavucontrol/__init__.py (+2/-0)
xubuntu_autopilot_tests/pavucontrol/test_pavucontrol.py (+51/-0)
xubuntu_autopilot_tests/pidgin/__init__.py (+2/-0)
xubuntu_autopilot_tests/pidgin/test_pidgin.py (+51/-0)
xubuntu_autopilot_tests/ristretto/__init__.py (+2/-0)
xubuntu_autopilot_tests/ristretto/test_ristretto.py (+51/-0)
xubuntu_autopilot_tests/simple-scan/__init__.py (+2/-0)
xubuntu_autopilot_tests/simple-scan/test_simple_scan.py (+50/-0)
xubuntu_autopilot_tests/sudoku/__init__.py (+2/-0)
xubuntu_autopilot_tests/sudoku/test_sudoku.py (+49/-0)
xubuntu_autopilot_tests/thunderbird/__init__.py (+2/-0)
xubuntu_autopilot_tests/thunderbird/test_thunderbird.py (+49/-0)
xubuntu_autopilot_tests/transmission-gtk/__init__.py (+2/-0)
xubuntu_autopilot_tests/transmission-gtk/test_transmission_gtk.py (+49/-0)
xubuntu_autopilot_tests/xfce4-appfinder/__init__.py (+2/-0)
xubuntu_autopilot_tests/xfce4-appfinder/test_xfce4_appfinder.py (+51/-0)
xubuntu_autopilot_tests/xfce4-dict/__init__.py (+2/-0)
xubuntu_autopilot_tests/xfce4-dict/test_xfce4_dict.py (+51/-0)
xubuntu_autopilot_tests/xfce4-screenshooter/__init__.py (+2/-0)
xubuntu_autopilot_tests/xfce4-screenshooter/test_xfce4_screenshooter.py (+51/-0)
xubuntu_autopilot_tests/xfce4-settings-manager/__init__.py (+2/-0)
xubuntu_autopilot_tests/xfce4-settings-manager/test_xfce4_settings_manager.py (+66/-0)
xubuntu_autopilot_tests/xfce4-taskmanager/__init__.py (+2/-0)
xubuntu_autopilot_tests/xfce4-taskmanager/test_xfce4_taskmanager.py (+51/-0)
xubuntu_autopilot_tests/xfce4-terminal/__init__.py (+1/-1)
xubuntu_autopilot_tests/xfce4-terminal/test_terminal.py (+2/-2)
To merge this branch: bzr merge lp:~lderan/ubuntu-autopilot-tests/ubuntu-autopilot-tests
Reviewer Review Type Date Requested Status
Nicholas Skaggs (community) Needs Fixing
Review via email: mp+202335@code.launchpad.net

Description of the change

Added simple tests for Sudoku and gThumb to the Xubuntu Autopilot tests

To post a comment you must log in.
66. By Thomas Molloy

Added Simple-scan test to Xubuntu tests

67. By Thomas Molloy

gmusicbrowser simple test for Xubuntu

68. By Thomas Molloy

Added Ristretto Image Viewer test to the Xubuntu test directory

Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

Thanks for these tests! Glad to see you trying out autopilot. I'll leave a few quick comments.

You should change the author to be yourself in these tests :-)
In gmusicbrowser/__init__.py, I'm confused why you have terminalapp classes, etc. Is this correct? Actually it seems all of your __init__.py are this way. They can be blank files instead if you don't have a class to put in them :-)

In the gmusicbrowser test;

I take it you want the window to be the only one?
windows = self.app.get_windows()
self.assertTrue(len(windows) == 1)

This is ok, but note that mainWindow.title will never change as it's already set (well, the app could change it, but I don't think that's what we're looking for here :-) ) I'm not exactly sure you need the eventually here, but if so you should ensure you get the window as part of the lambda function.
mainWindow = windows[0]
self.assertThat(lambda: mainWindow.title, Eventually(Contains('gmusicbrowser')))

Reviewing several apps at once is a bit hard; ideally split these up in the future :-) Overall this is a great first start. It seems you can't get introspection to work for these apps is that correct? If so, I would still like to see a bit more of the application tested if at all possible. I know using process manager will severely limit you, but it's worthwhile to see how creative you can be. Ping me on IRC @ balloons anytime for help or further info. Looking forward to seeing your tweaks.

review: Needs Fixing
Revision history for this message
Thomas Molloy (lderan) wrote :

The __init__ must of come from my copying and pasting the terminal app folder to make the others, my apologies. Shall fix this as soon as I can. and try to expand on the tests before submitting another MP.

Revision history for this message
Thomas Molloy (lderan) wrote :

> In the gmusicbrowser test;
>
> I take it you want the window to be the only one?
> windows = self.app.get_windows()
> self.assertTrue(len(windows) == 1)
Yes, that is correct

> This is ok, but note that mainWindow.title will never change as it's already
> set (well, the app could change it, but I don't think that's what we're
> looking for here :-) ) I'm not exactly sure you need the eventually here, but
> if so you should ensure you get the window as part of the lambda function.
> mainWindow = windows[0]
> self.assertThat(lambda: mainWindow.title,
> Eventually(Contains('gmusicbrowser')))
Okay shall approach it differently :)

> Reviewing several apps at once is a bit hard; ideally split these up in the
> future :-)
Yup will do, I can get rid of this mp and do each on individually.

69. By Thomas Molloy

fixes for the xubuntu tests

70. By Thomas Molloy

working tests, need to be individually merged and if possible improved before doing so

Unmerged revisions

70. By Thomas Molloy

working tests, need to be individually merged and if possible improved before doing so

69. By Thomas Molloy

fixes for the xubuntu tests

68. By Thomas Molloy

Added Ristretto Image Viewer test to the Xubuntu test directory

67. By Thomas Molloy

gmusicbrowser simple test for Xubuntu

66. By Thomas Molloy

Added Simple-scan test to Xubuntu tests

65. By Thomas Molloy

Corrected the gThumb test text

64. By Thomas Molloy

Added simple tests for Sudoku and gThumb to the Xubuntu Autopilot tests

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added directory 'xubuntu_autopilot_tests/abiword'
=== added file 'xubuntu_autopilot_tests/abiword/__init__.py'
--- xubuntu_autopilot_tests/abiword/__init__.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/abiword/__init__.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,2 @@
1# -*- coding: utf-8 -*-
2
03
=== added file 'xubuntu_autopilot_tests/abiword/test_abiword.py'
--- xubuntu_autopilot_tests/abiword/test_abiword.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/abiword/test_abiword.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,65 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2#
3# Copyright (C) 2014
4#
5# Author: Thomas Molloy beetyrootey@gmail.com
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU Lesser General Public License as published by
9# the Free Software Foundation; version 3.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU Lesser General Public License for more details.
15#
16# You should have received a copy of the GNU Lesser General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18import os
19from autopilot.matchers import Eventually
20from testtools.matchers import Equals, Contains
21from autopilot.testcase import AutopilotTestCase
22from autopilot.process import ProcessManager
23from testtools.matchers import Equals, Contains, FileExists, DirExists, \
24 DirContains
25
26# register abiword app
27ProcessManager.register_known_application(
28 "abiword",
29 "abiword.desktop",
30 "abiword")
31
32class AbiwordWindowTests(AutopilotTestCase):
33 """ Window tests for the xfce4-screenshooter """
34
35 def setUp(self):
36 """ Basic setup instruction to run before each test """
37 super(AbiwordWindowTests, self).setUp()
38 self.manager = ProcessManager.create('BAMF')
39 self.app = self.manager.start_app("abiword")
40 # This will make sure Screenshooter window you launched is focused and ready
41 # to accept your keyboard input
42 self.assertTrue(self.app.is_active)
43
44 def test_window_visible(self):
45 """ Check to see if the main window has the proper title """
46 windows = self.app.get_windows()
47 window = windows[0]
48
49 # We must assert the window title = Untitled1
50 # It fails with assertTrue(self.app.is_focused)
51 self.assertThat(lambda: window.title, Eventually(Contains('Untitled1')))
52
53 for window in windows:
54 window.close()
55
56 def test_file_saving(self):
57 self.keyboard.press_and_release('Ctrl+Shift+s')
58 self.keyboard.type("/tmp/")
59 self.keyboard.press_and_release('Enter')
60 self.keyboard.type("test-file")
61 self.keyboard.press_and_release('Enter')
62 # Verify that test-file has been created
63 self.assertThat(lambda: '/tmp/test-file.abw', Eventually(FileExists()))
64 # Delete the file we created
65 self.addCleanup(os.remove, "/tmp/test-file.abw")
066
=== added directory 'xubuntu_autopilot_tests/catfish'
=== added file 'xubuntu_autopilot_tests/catfish/__init__.py'
--- xubuntu_autopilot_tests/catfish/__init__.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/catfish/__init__.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,2 @@
1# -*- coding: utf-8 -*-
2
03
=== added file 'xubuntu_autopilot_tests/catfish/test_catfish.py'
--- xubuntu_autopilot_tests/catfish/test_catfish.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/catfish/test_catfish.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,51 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2#
3# Copyright (C) 2014
4#
5# Author: Thomas Molloy beetyrootey@gmail.com
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU Lesser General Public License as published by
9# the Free Software Foundation; version 3.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU Lesser General Public License for more details.
15#
16# You should have received a copy of the GNU Lesser General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18from autopilot.matchers import Eventually
19from testtools.matchers import Equals, Contains
20from autopilot.testcase import AutopilotTestCase
21from autopilot.process import ProcessManager
22
23# register catfish app
24ProcessManager.register_known_application(
25 "catfish",
26 "catfish.desktop",
27 "catfish")
28
29class CatfishWindowTests(AutopilotTestCase):
30 """ Window tests for the xfce4-screenshooter """
31
32 def setUp(self):
33 """ Basic setup instruction to run before each test """
34 super(CatfishWindowTests, self).setUp()
35 self.manager = ProcessManager.create('BAMF')
36 self.app = self.manager.start_app("catfish")
37 # This will make sure Screenshooter window you launched is focused and ready
38 # to accept your keyboard input
39 self.assertTrue(self.app.is_active)
40
41 def test_window_visible(self):
42 """ Check to see if the main window has the proper title """
43 windows = self.app.get_windows()
44 window = windows[0]
45
46 # We must assert the window title = Catfish
47 # It fails with assertTrue(self.app.is_focused)
48 self.assertThat(lambda: window.title, Eventually(Contains('Catfish')))
49
50 for window in windows:
51 window.close()
052
=== added directory 'xubuntu_autopilot_tests/evince'
=== added file 'xubuntu_autopilot_tests/evince/__init__.py'
--- xubuntu_autopilot_tests/evince/__init__.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/evince/__init__.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,2 @@
1# -*- coding: utf-8 -*-
2
03
=== added file 'xubuntu_autopilot_tests/evince/test_evince.py'
--- xubuntu_autopilot_tests/evince/test_evince.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/evince/test_evince.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,51 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2#
3# Copyright (C) 2014
4#
5# Author: Thomas Molloy beetyrootey@gmail.com
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU Lesser General Public License as published by
9# the Free Software Foundation; version 3.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU Lesser General Public License for more details.
15#
16# You should have received a copy of the GNU Lesser General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18from autopilot.matchers import Eventually
19from testtools.matchers import Equals, Contains
20from autopilot.testcase import AutopilotTestCase
21from autopilot.process import ProcessManager
22
23# register evince app
24ProcessManager.register_known_application(
25 "evince",
26 "evince.desktop",
27 "evince")
28
29class EvinceWindowTests(AutopilotTestCase):
30 """ Window tests for the xfce4-screenshooter """
31
32 def setUp(self):
33 """ Basic setup instruction to run before each test """
34 super(EvinceWindowTests, self).setUp()
35 self.manager = ProcessManager.create('BAMF')
36 self.app = self.manager.start_app("evince")
37 # This will make sure Screenshooter window you launched is focused and ready
38 # to accept your keyboard input
39 self.assertTrue(self.app.is_active)
40
41 def test_window_visible(self):
42 """ Check to see if the main window has the proper title """
43 windows = self.app.get_windows()
44 window = windows[0]
45
46 # We must assert the window title = Document Viewer
47 # It fails with assertTrue(self.app.is_focused)
48 self.assertThat(lambda: window.title, Eventually(Contains('Document Viewer')))
49
50 for window in windows:
51 window.close()
052
=== added directory 'xubuntu_autopilot_tests/file-roller'
=== added file 'xubuntu_autopilot_tests/file-roller/__init__.py'
--- xubuntu_autopilot_tests/file-roller/__init__.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/file-roller/__init__.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,2 @@
1# -*- coding: utf-8 -*-
2
03
=== added file 'xubuntu_autopilot_tests/file-roller/test_file_roller.py'
--- xubuntu_autopilot_tests/file-roller/test_file_roller.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/file-roller/test_file_roller.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,51 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2#
3# Copyright (C) 2014
4#
5# Author: Thomas Molloy beetyrootey@gmail.com
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU Lesser General Public License as published by
9# the Free Software Foundation; version 3.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU Lesser General Public License for more details.
15#
16# You should have received a copy of the GNU Lesser General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18from autopilot.matchers import Eventually
19from testtools.matchers import Equals, Contains
20from autopilot.testcase import AutopilotTestCase
21from autopilot.process import ProcessManager
22
23# register file-roller app
24ProcessManager.register_known_application(
25 "file-roller",
26 "file-roller.desktop",
27 "file-roller")
28
29class FileRollerWindowTests(AutopilotTestCase):
30 """ Window tests for the xfce4-screenshooter """
31
32 def setUp(self):
33 """ Basic setup instruction to run before each test """
34 super(FileRollerWindowTests, self).setUp()
35 self.manager = ProcessManager.create('BAMF')
36 self.app = self.manager.start_app("file-roller")
37 # This will make sure Screenshooter window you launched is focused and ready
38 # to accept your keyboard input
39 self.assertTrue(self.app.is_active)
40
41 def test_window_visible(self):
42 """ Check to see if the main window has the proper title """
43 windows = self.app.get_windows()
44 window = windows[0]
45
46 # We must assert the window title = Archive Manager
47 # It fails with assertTrue(self.app.is_focused)
48 self.assertThat(lambda: window.title, Eventually(Contains('Archive Manager')))
49
50 for window in windows:
51 window.close()
052
=== added directory 'xubuntu_autopilot_tests/gmusicbrowser'
=== added file 'xubuntu_autopilot_tests/gmusicbrowser/__init__.py'
--- xubuntu_autopilot_tests/gmusicbrowser/__init__.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/gmusicbrowser/__init__.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,2 @@
1# -*- coding: utf-8 -*-
2
03
=== added file 'xubuntu_autopilot_tests/gmusicbrowser/test_gmusicbrowser.py'
--- xubuntu_autopilot_tests/gmusicbrowser/test_gmusicbrowser.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/gmusicbrowser/test_gmusicbrowser.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,51 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2#
3# Copyright (C) 2014
4#
5# Author: Thomas Molloy beetyrootey@gmail.com
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU Lesser General Public License as published by
9# the Free Software Foundation; version 3.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU Lesser General Public License for more details.
15#
16# You should have received a copy of the GNU Lesser General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18
19from autopilot.matchers import Eventually
20from testtools.matchers import Equals, Contains
21from autopilot.testcase import AutopilotTestCase
22from autopilot.process import ProcessManager
23
24# register gmusicbrowser app
25ProcessManager.register_known_application(
26 "gmusicbrowser",
27 "gmusicbrowser.desktop",
28 "gmusicbrowser")
29
30class GMusicBrowserWindowTests(AutopilotTestCase):
31 """ Window tests for the game Simple scan """
32
33 def setUp(self):
34 """ Basic setup instruction to run before each test """
35 super(GMusicBrowserWindowTests, self).setUp()
36 self.manager = ProcessManager.create('BAMF')
37 self.app = self.manager.start_app("gmusicbrowser")
38 # This will make sure Sudoku window you launched is focused and ready
39 # to accept your keyboard input
40 self.assertTrue(self.app.is_active)
41
42 def test_window_visible(self):
43 """ Basic test to see if the window opens with the correct name """
44 # We must assert the window title = gmusicbrowser here to keep focus of gmusicbrowser
45 # It fails with assertTrue(self.app.is_focused)
46 windows = self.app.get_windows()
47 self.assertTrue(len(windows) == 1)
48 mainWindow = windows[0]
49 self.assertThat(lambda: mainWindow.title, Eventually(Contains('gmusicbrowser')))
50 # We must close the window else the test fails as it is unable to close it automatically
51 mainWindow.close()
052
=== added directory 'xubuntu_autopilot_tests/gnome-calculator'
=== added file 'xubuntu_autopilot_tests/gnome-calculator/__init__.py'
--- xubuntu_autopilot_tests/gnome-calculator/__init__.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/gnome-calculator/__init__.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,2 @@
1# -*- coding: utf-8 -*-
2
03
=== added file 'xubuntu_autopilot_tests/gnome-calculator/test_gnome_calculator.py'
--- xubuntu_autopilot_tests/gnome-calculator/test_gnome_calculator.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/gnome-calculator/test_gnome_calculator.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,51 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2#
3# Copyright (C) 2014
4#
5# Author: Thomas Molloy beetyrootey@gmail.com
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU Lesser General Public License as published by
9# the Free Software Foundation; version 3.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU Lesser General Public License for more details.
15#
16# You should have received a copy of the GNU Lesser General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18from autopilot.matchers import Eventually
19from testtools.matchers import Equals, Contains
20from autopilot.testcase import AutopilotTestCase
21from autopilot.process import ProcessManager
22
23# register gnome-calculator app
24ProcessManager.register_known_application(
25 "gnome-calculator",
26 "gnome-calculator.desktop",
27 "gnome-calculator")
28
29class GnomeCalculatorWindowTests(AutopilotTestCase):
30 """ Window tests for the xfce4-screenshooter """
31
32 def setUp(self):
33 """ Basic setup instruction to run before each test """
34 super(GnomeCalculatorWindowTests, self).setUp()
35 self.manager = ProcessManager.create('BAMF')
36 self.app = self.manager.start_app("gnome-calculator")
37 # This will make sure Screenshooter window you launched is focused and ready
38 # to accept your keyboard input
39 self.assertTrue(self.app.is_active)
40
41 def test_window_visible(self):
42 """ Check to see if the main window has the proper title """
43 windows = self.app.get_windows()
44 window = windows[0]
45
46 # We must assert the window title = Calculator
47 # It fails with assertTrue(self.app.is_focused)
48 self.assertThat(lambda: window.title, Eventually(Contains('Calculator')))
49
50 for window in windows:
51 window.close()
052
=== added directory 'xubuntu_autopilot_tests/gnumeric'
=== added file 'xubuntu_autopilot_tests/gnumeric/__init__.py'
--- xubuntu_autopilot_tests/gnumeric/__init__.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/gnumeric/__init__.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,2 @@
1# -*- coding: utf-8 -*-
2
03
=== added file 'xubuntu_autopilot_tests/gnumeric/test_gnumeric.py'
--- xubuntu_autopilot_tests/gnumeric/test_gnumeric.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/gnumeric/test_gnumeric.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,51 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2#
3# Copyright (C) 2014
4#
5# Author: Thomas Molloy beetyrootey@gmail.com
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU Lesser General Public License as published by
9# the Free Software Foundation; version 3.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU Lesser General Public License for more details.
15#
16# You should have received a copy of the GNU Lesser General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18from autopilot.matchers import Eventually
19from testtools.matchers import Equals, Contains
20from autopilot.testcase import AutopilotTestCase
21from autopilot.process import ProcessManager
22
23# register gnumeric app
24ProcessManager.register_known_application(
25 "gnumeric",
26 "gnumeric.desktop",
27 "gnumeric")
28
29class GnumericWindowTests(AutopilotTestCase):
30 """ Window tests for the xfce4-screenshooter """
31
32 def setUp(self):
33 """ Basic setup instruction to run before each test """
34 super(GnumericWindowTests, self).setUp()
35 self.manager = ProcessManager.create('BAMF')
36 self.app = self.manager.start_app("gnumeric")
37 # This will make sure Screenshooter window you launched is focused and ready
38 # to accept your keyboard input
39 self.assertTrue(self.app.is_active)
40
41 def test_window_visible(self):
42 """ Check to see if the main window has the proper title """
43 windows = self.app.get_windows()
44 window = windows[0]
45
46 # We must assert the window title = Archive Manager
47 # It fails with assertTrue(self.app.is_focused)
48 self.assertThat(lambda: window.title, Eventually(Contains('Gnumeric')))
49
50 for window in windows:
51 window.close()
052
=== added directory 'xubuntu_autopilot_tests/gthumb'
=== added file 'xubuntu_autopilot_tests/gthumb/__init__.py'
--- xubuntu_autopilot_tests/gthumb/__init__.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/gthumb/__init__.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,2 @@
1# -*- coding: utf-8 -*-
2
03
=== added file 'xubuntu_autopilot_tests/gthumb/test_gthumb.py'
--- xubuntu_autopilot_tests/gthumb/test_gthumb.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/gthumb/test_gthumb.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,51 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2#
3# Copyright (C) 2014
4#
5# Author: Thomas Molloy beetyrootey@gmail.com
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU Lesser General Public License as published by
9# the Free Software Foundation; version 3.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU Lesser General Public License for more details.
15#
16# You should have received a copy of the GNU Lesser General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18from autopilot.matchers import Eventually
19from testtools.matchers import Equals, Contains
20from autopilot.testcase import AutopilotTestCase
21from autopilot.process import ProcessManager
22
23# register gThumb app
24ProcessManager.register_known_application(
25 "gthumb",
26 "gthumb.desktop",
27 "gThumb")
28
29class GThumbWindowTests(AutopilotTestCase):
30 """ Window tests for the gthumb """
31
32 def setUp(self):
33 """ Basic setup instruction to run before each test """
34 super(GThumbWindowTests, self).setUp()
35 self.manager = ProcessManager.create('BAMF')
36 self.app = self.manager.start_app("gthumb")
37 # This will make sure Mines window you launched is focused and ready
38 # to accept your keyboard input
39 self.assertTrue(self.app.is_active)
40
41 def test_window_visible(self):
42 """ Check to see if the main window has the proper title """
43 windows = self.app.get_windows()
44 window = windows[0]
45
46 # We must assert the window title = gThumb here to keep focus of Sudoku
47 # It fails with assertTrue(self.app.is_focused)
48 self.assertThat(lambda: window.title, Eventually(Contains('gThumb')))
49
50 for window in windows:
51 window.close()
052
=== added directory 'xubuntu_autopilot_tests/gucharmap'
=== added file 'xubuntu_autopilot_tests/gucharmap/__init__.py'
--- xubuntu_autopilot_tests/gucharmap/__init__.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/gucharmap/__init__.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,2 @@
1# -*- coding: utf-8 -*-
2
03
=== added file 'xubuntu_autopilot_tests/gucharmap/test_gucharmap.py'
--- xubuntu_autopilot_tests/gucharmap/test_gucharmap.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/gucharmap/test_gucharmap.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,51 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2#
3# Copyright (C) 2014
4#
5# Author: Thomas Molloy beetyrootey@gmail.com
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU Lesser General Public License as published by
9# the Free Software Foundation; version 3.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU Lesser General Public License for more details.
15#
16# You should have received a copy of the GNU Lesser General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18from autopilot.matchers import Eventually
19from testtools.matchers import Equals, Contains
20from autopilot.testcase import AutopilotTestCase
21from autopilot.process import ProcessManager
22
23# register gnumeric app
24ProcessManager.register_known_application(
25 "gucharmap",
26 "gucharmap.desktop",
27 "gucharmap")
28
29class GucharmapWindowTests(AutopilotTestCase):
30 """ Window tests for the xfce4-screenshooter """
31
32 def setUp(self):
33 """ Basic setup instruction to run before each test """
34 super(GucharmapWindowTests, self).setUp()
35 self.manager = ProcessManager.create('BAMF')
36 self.app = self.manager.start_app("gucharmap")
37 # This will make sure Screenshooter window you launched is focused and ready
38 # to accept your keyboard input
39 self.assertTrue(self.app.is_active)
40
41 def test_window_visible(self):
42 """ Check to see if the main window has the proper title """
43 windows = self.app.get_windows()
44 window = windows[0]
45
46 # We must assert the window title = Archive Manager
47 # It fails with assertTrue(self.app.is_focused)
48 self.assertThat(lambda: window.title, Eventually(Contains('Character Map')))
49
50 for window in windows:
51 window.close()
052
=== added directory 'xubuntu_autopilot_tests/mousepad'
=== added file 'xubuntu_autopilot_tests/mousepad/__init__.py'
--- xubuntu_autopilot_tests/mousepad/__init__.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/mousepad/__init__.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,2 @@
1# -*- coding: utf-8 -*-
2
03
=== added file 'xubuntu_autopilot_tests/mousepad/test_mousepad.py'
--- xubuntu_autopilot_tests/mousepad/test_mousepad.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/mousepad/test_mousepad.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,51 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2#
3# Copyright (C) 2014
4#
5# Author: Thomas Molloy beetyrootey@gmail.com
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU Lesser General Public License as published by
9# the Free Software Foundation; version 3.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU Lesser General Public License for more details.
15#
16# You should have received a copy of the GNU Lesser General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18from autopilot.matchers import Eventually
19from testtools.matchers import Equals, Contains
20from autopilot.testcase import AutopilotTestCase
21from autopilot.process import ProcessManager
22
23# register gnumeric app
24ProcessManager.register_known_application(
25 "mousepad",
26 "mousepad.desktop",
27 "mousepad")
28
29class MousepadWindowTests(AutopilotTestCase):
30 """ Window tests for the xfce4-screenshooter """
31
32 def setUp(self):
33 """ Basic setup instruction to run before each test """
34 super(MousepadWindowTests, self).setUp()
35 self.manager = ProcessManager.create('BAMF')
36 self.app = self.manager.start_app("mousepad")
37 # This will make sure Screenshooter window you launched is focused and ready
38 # to accept your keyboard input
39 self.assertTrue(self.app.is_active)
40
41 def test_window_visible(self):
42 """ Check to see if the main window has the proper title """
43 windows = self.app.get_windows()
44 window = windows[0]
45
46 # We must assert the window title = Archive Manager
47 # It fails with assertTrue(self.app.is_focused)
48 self.assertThat(lambda: window.title, Eventually(Contains('Mousepad')))
49
50 for window in windows:
51 window.close()
052
=== added directory 'xubuntu_autopilot_tests/onboard'
=== added file 'xubuntu_autopilot_tests/onboard/__init__.py'
--- xubuntu_autopilot_tests/onboard/__init__.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/onboard/__init__.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,2 @@
1# -*- coding: utf-8 -*-
2
03
=== added file 'xubuntu_autopilot_tests/onboard/test_onboard.py'
--- xubuntu_autopilot_tests/onboard/test_onboard.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/onboard/test_onboard.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,51 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2#
3# Copyright (C) 2014
4#
5# Author: Thomas Molloy beetyrootey@gmail.com
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU Lesser General Public License as published by
9# the Free Software Foundation; version 3.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU Lesser General Public License for more details.
15#
16# You should have received a copy of the GNU Lesser General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18from autopilot.matchers import Eventually
19from testtools.matchers import Equals, Contains
20from autopilot.testcase import AutopilotTestCase
21from autopilot.process import ProcessManager
22
23# register gnumeric app
24ProcessManager.register_known_application(
25 "onboard",
26 "onboard.desktop",
27 "onboard")
28
29class OnboardWindowTests(AutopilotTestCase):
30 """ Window tests for the xfce4-screenshooter """
31
32 def setUp(self):
33 """ Basic setup instruction to run before each test """
34 super(OnboardWindowTests, self).setUp()
35 self.manager = ProcessManager.create('BAMF')
36 self.app = self.manager.start_app("onboard")
37 # This will make sure Screenshooter window you launched is focused and ready
38 # to accept your keyboard input
39 self.assertTrue(self.app.is_active)
40
41 def test_window_visible(self):
42 """ Check to see if the main window has the proper title """
43 windows = self.app.get_windows()
44 window = windows[0]
45
46 # We must assert the window title = Archive Manager
47 # It fails with assertTrue(self.app.is_focused)
48 self.assertThat(lambda: window.title, Eventually(Contains('Onboard')))
49
50 for window in windows:
51 window.close()
052
=== added directory 'xubuntu_autopilot_tests/orage-calendar'
=== added file 'xubuntu_autopilot_tests/orage-calendar/__init__.py'
--- xubuntu_autopilot_tests/orage-calendar/__init__.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/orage-calendar/__init__.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,2 @@
1# -*- coding: utf-8 -*-
2
03
=== added file 'xubuntu_autopilot_tests/orage-calendar/test_orage_calendar.py'
--- xubuntu_autopilot_tests/orage-calendar/test_orage_calendar.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/orage-calendar/test_orage_calendar.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,51 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2#
3# Copyright (C) 2014
4#
5# Author: Thomas Molloy beetyrootey@gmail.com
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU Lesser General Public License as published by
9# the Free Software Foundation; version 3.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU Lesser General Public License for more details.
15#
16# You should have received a copy of the GNU Lesser General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18from autopilot.matchers import Eventually
19from testtools.matchers import Equals, Contains
20from autopilot.testcase import AutopilotTestCase
21from autopilot.process import ProcessManager
22
23# register gnumeric app
24ProcessManager.register_known_application(
25 "orage",
26 "orage.desktop",
27 "orage")
28
29class OrageCalendarWindowTests(AutopilotTestCase):
30 """ Window tests for the xfce4-screenshooter """
31
32 def setUp(self):
33 """ Basic setup instruction to run before each test """
34 super(OrageCalendarWindowTests, self).setUp()
35 self.manager = ProcessManager.create('BAMF')
36 self.app = self.manager.start_app("orage")
37 # This will make sure Screenshooter window you launched is focused and ready
38 # to accept your keyboard input
39 self.assertTrue(self.app.is_active)
40
41 def test_window_visible(self):
42 """ Check to see if the main window has the proper title """
43 windows = self.app.get_windows()
44 window = windows[0]
45
46 # We must assert the window title = Archive Manager
47 # It fails with assertTrue(self.app.is_focused)
48 self.assertThat(lambda: window.title, Eventually(Contains('Orage')))
49
50 for window in windows:
51 window.close()
052
=== added directory 'xubuntu_autopilot_tests/orage-globaltime'
=== added file 'xubuntu_autopilot_tests/orage-globaltime/__init__.py'
--- xubuntu_autopilot_tests/orage-globaltime/__init__.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/orage-globaltime/__init__.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,2 @@
1# -*- coding: utf-8 -*-
2
03
=== added file 'xubuntu_autopilot_tests/orage-globaltime/test_orage_globaltime.py'
--- xubuntu_autopilot_tests/orage-globaltime/test_orage_globaltime.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/orage-globaltime/test_orage_globaltime.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,51 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2#
3# Copyright (C) 2014
4#
5# Author: Thomas Molloy beetyrootey@gmail.com
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU Lesser General Public License as published by
9# the Free Software Foundation; version 3.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU Lesser General Public License for more details.
15#
16# You should have received a copy of the GNU Lesser General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18from autopilot.matchers import Eventually
19from testtools.matchers import Equals, Contains
20from autopilot.testcase import AutopilotTestCase
21from autopilot.process import ProcessManager
22
23# register gnumeric app
24ProcessManager.register_known_application(
25 "globaltime",
26 "globaltime.desktop",
27 "globaltime")
28
29class OrageCalendarWindowTests(AutopilotTestCase):
30 """ Window tests for the xfce4-screenshooter """
31
32 def setUp(self):
33 """ Basic setup instruction to run before each test """
34 super(OrageCalendarWindowTests, self).setUp()
35 self.manager = ProcessManager.create('BAMF')
36 self.app = self.manager.start_app("globaltime")
37 # This will make sure Screenshooter window you launched is focused and ready
38 # to accept your keyboard input
39 self.assertTrue(self.app.is_active)
40
41 def test_window_visible(self):
42 """ Check to see if the main window has the proper title """
43 windows = self.app.get_windows()
44 window = windows[0]
45
46 # We must assert the window title = Archive Manager
47 # It fails with assertTrue(self.app.is_focused)
48 self.assertThat(lambda: window.title, Eventually(Contains('Global Time')))
49
50 for window in windows:
51 window.close()
052
=== added directory 'xubuntu_autopilot_tests/pavucontrol'
=== added file 'xubuntu_autopilot_tests/pavucontrol/__init__.py'
--- xubuntu_autopilot_tests/pavucontrol/__init__.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/pavucontrol/__init__.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,2 @@
1# -*- coding: utf-8 -*-
2
03
=== added file 'xubuntu_autopilot_tests/pavucontrol/test_pavucontrol.py'
--- xubuntu_autopilot_tests/pavucontrol/test_pavucontrol.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/pavucontrol/test_pavucontrol.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,51 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2#
3# Copyright (C) 2014
4#
5# Author: Thomas Molloy beetyrootey@gmail.com
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU Lesser General Public License as published by
9# the Free Software Foundation; version 3.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU Lesser General Public License for more details.
15#
16# You should have received a copy of the GNU Lesser General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18from autopilot.matchers import Eventually
19from testtools.matchers import Equals, Contains
20from autopilot.testcase import AutopilotTestCase
21from autopilot.process import ProcessManager
22
23# register gnumeric app
24ProcessManager.register_known_application(
25 "pavucontrol",
26 "pavucontrol.desktop",
27 "pavucontrol")
28
29class PavucontrolWindowTests(AutopilotTestCase):
30 """ Window tests for the xfce4-screenshooter """
31
32 def setUp(self):
33 """ Basic setup instruction to run before each test """
34 super(PavucontrolWindowTests, self).setUp()
35 self.manager = ProcessManager.create('BAMF')
36 self.app = self.manager.start_app("pavucontrol")
37 # This will make sure Screenshooter window you launched is focused and ready
38 # to accept your keyboard input
39 self.assertTrue(self.app.is_active)
40
41 def test_window_visible(self):
42 """ Check to see if the main window has the proper title """
43 windows = self.app.get_windows()
44 window = windows[0]
45
46 # We must assert the window title = Archive Manager
47 # It fails with assertTrue(self.app.is_focused)
48 self.assertThat(lambda: window.title, Eventually(Contains('Volume Control')))
49
50 for window in windows:
51 window.close()
052
=== added directory 'xubuntu_autopilot_tests/pidgin'
=== added file 'xubuntu_autopilot_tests/pidgin/__init__.py'
--- xubuntu_autopilot_tests/pidgin/__init__.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/pidgin/__init__.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,2 @@
1# -*- coding: utf-8 -*-
2
03
=== added file 'xubuntu_autopilot_tests/pidgin/test_pidgin.py'
--- xubuntu_autopilot_tests/pidgin/test_pidgin.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/pidgin/test_pidgin.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,51 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2#
3# Copyright (C) 2014
4#
5# Author: Thomas Molloy beetyrootey@gmail.com
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU Lesser General Public License as published by
9# the Free Software Foundation; version 3.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU Lesser General Public License for more details.
15#
16# You should have received a copy of the GNU Lesser General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18from autopilot.matchers import Eventually
19from testtools.matchers import Equals, Contains
20from autopilot.testcase import AutopilotTestCase
21from autopilot.process import ProcessManager
22
23# register gnumeric app
24ProcessManager.register_known_application(
25 "pidgin",
26 "pidgin.desktop",
27 "pidgin")
28
29class PidginWindowTests(AutopilotTestCase):
30 """ Window tests for the xfce4-screenshooter """
31
32 def setUp(self):
33 """ Basic setup instruction to run before each test """
34 super(PidginWindowTests, self).setUp()
35 self.manager = ProcessManager.create('BAMF')
36 self.app = self.manager.start_app("pidgin")
37 # This will make sure Screenshooter window you launched is focused and ready
38 # to accept your keyboard input
39 self.assertTrue(self.app.is_active)
40
41 def test_window_visible(self):
42 """ Check to see if the main window has the proper title """
43 windows = self.app.get_windows()
44 window = windows[0]
45
46 # We must assert the window title = Archive Manager
47 # It fails with assertTrue(self.app.is_focused)
48 self.assertThat(lambda: window.title, Eventually(Contains('Accounts')))
49
50 for window in windows:
51 window.close()
052
=== added directory 'xubuntu_autopilot_tests/ristretto'
=== added file 'xubuntu_autopilot_tests/ristretto/__init__.py'
--- xubuntu_autopilot_tests/ristretto/__init__.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/ristretto/__init__.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,2 @@
1# -*- coding: utf-8 -*-
2
03
=== added file 'xubuntu_autopilot_tests/ristretto/test_ristretto.py'
--- xubuntu_autopilot_tests/ristretto/test_ristretto.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/ristretto/test_ristretto.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,51 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2#
3# Copyright (C) 2014
4#
5# Author: Thomas Molloy beetyrootey@gmail.com
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU Lesser General Public License as published by
9# the Free Software Foundation; version 3.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU Lesser General Public License for more details.
15#
16# You should have received a copy of the GNU Lesser General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18from autopilot.matchers import Eventually
19from testtools.matchers import Equals, Contains
20from autopilot.testcase import AutopilotTestCase
21from autopilot.process import ProcessManager
22
23# register gThumb app
24ProcessManager.register_known_application(
25 "ristretto",
26 "ristretto.desktop",
27 "ristretto")
28
29class RistrettoWindowTests(AutopilotTestCase):
30 """ Window tests for the gthumb """
31
32 def setUp(self):
33 """ Basic setup instruction to run before each test """
34 super(RistrettoWindowTests, self).setUp()
35 self.manager = ProcessManager.create('BAMF')
36 self.app = self.manager.start_app("ristretto")
37 # This will make sure Mines window you launched is focused and ready
38 # to accept your keyboard input
39 self.assertTrue(self.app.is_active)
40
41 def test_window_visible(self):
42 """ Check to see if the main window has the proper title """
43 windows = self.app.get_windows()
44 window = windows[0]
45
46 # We must assert the window title = ristretto here to keep focus of ristretto
47 # It fails with assertTrue(self.app.is_focused)
48 self.assertThat(lambda: window.title, Eventually(Contains('Image Viewer')))
49
50 for window in windows:
51 window.close()
052
=== added directory 'xubuntu_autopilot_tests/simple-scan'
=== added file 'xubuntu_autopilot_tests/simple-scan/__init__.py'
--- xubuntu_autopilot_tests/simple-scan/__init__.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/simple-scan/__init__.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,2 @@
1# -*- coding: utf-8 -*-
2
03
=== added file 'xubuntu_autopilot_tests/simple-scan/test_simple_scan.py'
--- xubuntu_autopilot_tests/simple-scan/test_simple_scan.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/simple-scan/test_simple_scan.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,50 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2#
3# Copyright (C) 2014
4#
5# Author: Thomas Molloy beetyrootey@gmail.com
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU Lesser General Public License as published by
9# the Free Software Foundation; version 3.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU Lesser General Public License for more details.
15#
16# You should have received a copy of the GNU Lesser General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18from autopilot.matchers import Eventually
19from testtools.matchers import Equals, Contains
20from autopilot.testcase import AutopilotTestCase
21from autopilot.process import ProcessManager
22
23# register Simple-scan app
24ProcessManager.register_known_application(
25 "simple-scan",
26 "simple-scan.desktop",
27 "Simple-scan")
28
29class SimpleScanWindowTests(AutopilotTestCase):
30 """ Window tests for the game Simple scan """
31
32 def setUp(self):
33 """ Basic setup instruction to run before each test """
34 super(SimpleScanWindowTests, self).setUp()
35 self.manager = ProcessManager.create('BAMF')
36 self.app = self.manager.start_app("simple-scan")
37 # This will make sure Sudoku window you launched is focused and ready
38 # to accept your keyboard input
39 self.assertTrue(self.app.is_active)
40
41 def test_window_visible(self):
42 """ Basic test to see if the window opens with the correct name """
43 # We must assert the window title = Simple Scan here to keep focus of SimpleScan
44 # It fails with assertTrue(self.app.is_focused)
45 windows = self.app.get_windows()
46 self.assertTrue(len(windows) == 1)
47 mainWindow = windows[0]
48 self.assertThat(lambda: mainWindow.title, Eventually(Contains('Simple Scan')))
49 # We must close the window else the test fails as it is unable to close it automatically
50 mainWindow.close()
0\ No newline at end of file51\ No newline at end of file
152
=== added directory 'xubuntu_autopilot_tests/sudoku'
=== added file 'xubuntu_autopilot_tests/sudoku/__init__.py'
--- xubuntu_autopilot_tests/sudoku/__init__.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/sudoku/__init__.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,2 @@
1# -*- coding: utf-8 -*-
2
03
=== added file 'xubuntu_autopilot_tests/sudoku/test_sudoku.py'
--- xubuntu_autopilot_tests/sudoku/test_sudoku.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/sudoku/test_sudoku.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,49 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2#
3# Copyright (C) 2014
4#
5# Author: Thomas Molloy beetyrootey@gmail.com
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU Lesser General Public License as published by
9# the Free Software Foundation; version 3.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU Lesser General Public License for more details.
15#
16# You should have received a copy of the GNU Lesser General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18from autopilot.matchers import Eventually
19from testtools.matchers import Equals, Contains
20from autopilot.testcase import AutopilotTestCase
21from autopilot.process import ProcessManager
22
23# register sudoku app
24ProcessManager.register_known_application(
25 "gnome-sudoku",
26 "gnome-sudoku.desktop",
27 "gnome-sudoku")
28
29class SudokuWindowTests(AutopilotTestCase):
30 """ Window tests for the game Sudoku """
31
32 def setUp(self):
33 """ Basic setup instruction to run before each test """
34 super(SudokuWindowTests, self).setUp()
35 self.manager = ProcessManager.create('BAMF')
36 self.app = self.manager.start_app("gnome-sudoku")
37 # This will make sure Sudoku window you launched is focused and ready
38 # to accept your keyboard input
39 self.assertTrue(self.app.is_active)
40
41 def test_window_visible(self):
42 # We must assert the window title = Sudoku here to keep focus of Sudoku
43 # It fails with assertTrue(self.app.is_focused)
44 windows = self.app.get_windows()
45 self.assertTrue(len(windows) == 1)
46 mainWindow = windows[0]
47 self.assertThat(lambda: mainWindow.title, Eventually(Contains('Sudoku')))
48 # We must close the window else the test fails as it is unable to close it automatically
49 mainWindow.close()
050
=== added directory 'xubuntu_autopilot_tests/thunderbird'
=== added file 'xubuntu_autopilot_tests/thunderbird/__init__.py'
--- xubuntu_autopilot_tests/thunderbird/__init__.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/thunderbird/__init__.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,2 @@
1# -*- coding: utf-8 -*-
2
03
=== added file 'xubuntu_autopilot_tests/thunderbird/test_thunderbird.py'
--- xubuntu_autopilot_tests/thunderbird/test_thunderbird.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/thunderbird/test_thunderbird.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,49 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2#
3# Copyright (C) 2014
4#
5# Author: Thomas Molloy beetyrootey@gmail.com
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU Lesser General Public License as published by
9# the Free Software Foundation; version 3.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU Lesser General Public License for more details.
15#
16# You should have received a copy of the GNU Lesser General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18from autopilot.matchers import Eventually
19from testtools.matchers import Equals, Contains
20from autopilot.testcase import AutopilotTestCase
21from autopilot.process import ProcessManager
22
23# register sudoku app
24ProcessManager.register_known_application(
25 "thunderbird",
26 "thunderbird.desktop",
27 "thunderbird")
28
29class ThunderbirdWindowTests(AutopilotTestCase):
30 """ Window tests for the game Sudoku """
31
32 def setUp(self):
33 """ Basic setup instruction to run before each test """
34 super(ThunderbirdWindowTests, self).setUp()
35 self.manager = ProcessManager.create('BAMF')
36 self.app = self.manager.start_app("thunderbird")
37 # This will make sure Sudoku window you launched is focused and ready
38 # to accept your keyboard input
39 self.assertTrue(self.app.is_active)
40
41 def test_window_visible(self):
42 # We must assert the window title = Sudoku here to keep focus of Sudoku
43 # It fails with assertTrue(self.app.is_focused)
44 windows = self.app.get_windows()
45 self.assertTrue(len(windows) == 1)
46 mainWindow = windows[0]
47 self.assertThat(lambda: mainWindow.title, Eventually(Contains('Thunderbird')))
48 # We must close the window else the test fails as it is unable to close it automatically
49 mainWindow.close()
050
=== added directory 'xubuntu_autopilot_tests/transmission-gtk'
=== added file 'xubuntu_autopilot_tests/transmission-gtk/__init__.py'
--- xubuntu_autopilot_tests/transmission-gtk/__init__.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/transmission-gtk/__init__.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,2 @@
1# -*- coding: utf-8 -*-
2
03
=== added file 'xubuntu_autopilot_tests/transmission-gtk/test_transmission_gtk.py'
--- xubuntu_autopilot_tests/transmission-gtk/test_transmission_gtk.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/transmission-gtk/test_transmission_gtk.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,49 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2#
3# Copyright (C) 2014
4#
5# Author: Thomas Molloy beetyrootey@gmail.com
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU Lesser General Public License as published by
9# the Free Software Foundation; version 3.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU Lesser General Public License for more details.
15#
16# You should have received a copy of the GNU Lesser General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18from autopilot.matchers import Eventually
19from testtools.matchers import Equals, Contains
20from autopilot.testcase import AutopilotTestCase
21from autopilot.process import ProcessManager
22
23# register sudoku app
24ProcessManager.register_known_application(
25 "transmission-gtk",
26 "transmission-gtk.desktop",
27 "transmission-gtk")
28
29class TransmissionGTKwindowTests(AutopilotTestCase):
30 """ Window tests for the game Sudoku """
31
32 def setUp(self):
33 """ Basic setup instruction to run before each test """
34 super(TransmissionGTKwindowTests, self).setUp()
35 self.manager = ProcessManager.create('BAMF')
36 self.app = self.manager.start_app("transmission-gtk")
37 # This will make sure Sudoku window you launched is focused and ready
38 # to accept your keyboard input
39 self.assertTrue(self.app.is_active)
40
41 def test_window_visible(self):
42 # We must assert the window title = Sudoku here to keep focus of Sudoku
43 # It fails with assertTrue(self.app.is_focused)
44 windows = self.app.get_windows()
45 self.assertTrue(len(windows) == 1)
46 mainWindow = windows[0]
47 self.assertThat(lambda: mainWindow.title, Eventually(Contains('Transmission')))
48 # We must close the window else the test fails as it is unable to close it automatically
49 mainWindow.close()
050
=== added directory 'xubuntu_autopilot_tests/xfce4-appfinder'
=== added file 'xubuntu_autopilot_tests/xfce4-appfinder/__init__.py'
--- xubuntu_autopilot_tests/xfce4-appfinder/__init__.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/xfce4-appfinder/__init__.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,2 @@
1# -*- coding: utf-8 -*-
2
03
=== added file 'xubuntu_autopilot_tests/xfce4-appfinder/test_xfce4_appfinder.py'
--- xubuntu_autopilot_tests/xfce4-appfinder/test_xfce4_appfinder.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/xfce4-appfinder/test_xfce4_appfinder.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,51 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2#
3# Copyright (C) 2014
4#
5# Author: Thomas Molloy beetyrootey@gmail.com
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU Lesser General Public License as published by
9# the Free Software Foundation; version 3.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU Lesser General Public License for more details.
15#
16# You should have received a copy of the GNU Lesser General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18from autopilot.matchers import Eventually
19from testtools.matchers import Equals, Contains
20from autopilot.testcase import AutopilotTestCase
21from autopilot.process import ProcessManager
22
23# register xfce4-appfinder app
24ProcessManager.register_known_application(
25 "xfce4-appfinder",
26 "xfce4-appfinder.desktop",
27 "xfce4-appfinder")
28
29class xfce4AppfinderWindowTests(AutopilotTestCase):
30 """ Window tests for the xfce4-appfinder """
31
32 def setUp(self):
33 """ Basic setup instruction to run before each test """
34 super(xfce4AppfinderWindowTests, self).setUp()
35 self.manager = ProcessManager.create('BAMF')
36 self.app = self.manager.start_app("xfce4-appfinder")
37 # This will make sure Mines window you launched is focused and ready
38 # to accept your keyboard input
39 self.assertTrue(self.app.is_active)
40
41 def test_window_visible(self):
42 """ Check to see if the main window has the proper title """
43 windows = self.app.get_windows()
44 window = windows[0]
45
46 # We must assert the window title = Application Finder
47 # It fails with assertTrue(self.app.is_focused)
48 self.assertThat(lambda: window.title, Eventually(Contains('Application Finder')))
49
50 for window in windows:
51 window.close()
052
=== added directory 'xubuntu_autopilot_tests/xfce4-dict'
=== added file 'xubuntu_autopilot_tests/xfce4-dict/__init__.py'
--- xubuntu_autopilot_tests/xfce4-dict/__init__.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/xfce4-dict/__init__.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,2 @@
1# -*- coding: utf-8 -*-
2
03
=== added file 'xubuntu_autopilot_tests/xfce4-dict/test_xfce4_dict.py'
--- xubuntu_autopilot_tests/xfce4-dict/test_xfce4_dict.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/xfce4-dict/test_xfce4_dict.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,51 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2#
3# Copyright (C) 2014
4#
5# Author: Thomas Molloy beetyrootey@gmail.com
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU Lesser General Public License as published by
9# the Free Software Foundation; version 3.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU Lesser General Public License for more details.
15#
16# You should have received a copy of the GNU Lesser General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18from autopilot.matchers import Eventually
19from testtools.matchers import Equals, Contains
20from autopilot.testcase import AutopilotTestCase
21from autopilot.process import ProcessManager
22
23# register xfce4-dict app
24ProcessManager.register_known_application(
25 "xfce4-dict",
26 "xfce4-dict.desktop",
27 "xfce4-dict")
28
29class xfce4DictWindowTests(AutopilotTestCase):
30 """ Window tests for the dict """
31
32 def setUp(self):
33 """ Basic setup instruction to run before each test """
34 super(xfce4DictWindowTests, self).setUp()
35 self.manager = ProcessManager.create('BAMF')
36 self.app = self.manager.start_app("xfce4-dict")
37 # This will make sure Mines window you launched is focused and ready
38 # to accept your keyboard input
39 self.assertTrue(self.app.is_active)
40
41 def test_window_visible(self):
42 """ Check to see if the main window has the proper title """
43 windows = self.app.get_windows()
44 window = windows[0]
45
46 # We must assert the window title = Dictionary
47 # It fails with assertTrue(self.app.is_focused)
48 self.assertThat(lambda: window.title, Eventually(Contains('Dictionary')))
49
50 for window in windows:
51 window.close()
052
=== added directory 'xubuntu_autopilot_tests/xfce4-screenshooter'
=== added file 'xubuntu_autopilot_tests/xfce4-screenshooter/__init__.py'
--- xubuntu_autopilot_tests/xfce4-screenshooter/__init__.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/xfce4-screenshooter/__init__.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,2 @@
1# -*- coding: utf-8 -*-
2
03
=== added file 'xubuntu_autopilot_tests/xfce4-screenshooter/test_xfce4_screenshooter.py'
--- xubuntu_autopilot_tests/xfce4-screenshooter/test_xfce4_screenshooter.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/xfce4-screenshooter/test_xfce4_screenshooter.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,51 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2#
3# Copyright (C) 2014
4#
5# Author: Thomas Molloy beetyrootey@gmail.com
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU Lesser General Public License as published by
9# the Free Software Foundation; version 3.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU Lesser General Public License for more details.
15#
16# You should have received a copy of the GNU Lesser General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18from autopilot.matchers import Eventually
19from testtools.matchers import Equals, Contains
20from autopilot.testcase import AutopilotTestCase
21from autopilot.process import ProcessManager
22
23# register xfce4-screenshooter app
24ProcessManager.register_known_application(
25 "xfce4-screenshooter",
26 "xfce4-screenshooter.desktop",
27 "xfce4-screenshooter")
28
29class xfce4ScreenshooterWindowTests(AutopilotTestCase):
30 """ Window tests for the xfce4-screenshooter """
31
32 def setUp(self):
33 """ Basic setup instruction to run before each test """
34 super(xfce4ScreenshooterWindowTests, self).setUp()
35 self.manager = ProcessManager.create('BAMF')
36 self.app = self.manager.start_app("xfce4-screenshooter")
37 # This will make sure Screenshooter window you launched is focused and ready
38 # to accept your keyboard input
39 self.assertTrue(self.app.is_active)
40
41 def test_window_visible(self):
42 """ Check to see if the main window has the proper title """
43 windows = self.app.get_windows()
44 window = windows[0]
45
46 # We must assert the window title = Screenshot
47 # It fails with assertTrue(self.app.is_focused)
48 self.assertThat(lambda: window.title, Eventually(Contains('Screenshot')))
49
50 for window in windows:
51 window.close()
052
=== added directory 'xubuntu_autopilot_tests/xfce4-settings-manager'
=== added file 'xubuntu_autopilot_tests/xfce4-settings-manager/__init__.py'
--- xubuntu_autopilot_tests/xfce4-settings-manager/__init__.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/xfce4-settings-manager/__init__.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,2 @@
1# -*- coding: utf-8 -*-
2
03
=== added file 'xubuntu_autopilot_tests/xfce4-settings-manager/test_xfce4_settings_manager.py'
--- xubuntu_autopilot_tests/xfce4-settings-manager/test_xfce4_settings_manager.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/xfce4-settings-manager/test_xfce4_settings_manager.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,66 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2#
3# Copyright (C) 2013
4#
5# Author: Daniel Chapman daniel@chapman-mail.com
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU Lesser General Public License as published by
9# the Free Software Foundation; version 3.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU Lesser General Public License for more details.
15#
16# You should have received a copy of the GNU Lesser General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18from autopilot.matchers import Eventually
19from testtools.matchers import Equals, Contains
20from autopilot.testcase import AutopilotTestCase
21from autopilot.process import ProcessManager
22
23# register xfce4-settings-manager app
24ProcessManager.register_known_application(
25 "xfce4-settings-manager", "xfce-settings-manager.desktop", "xfce4-settings-manager")
26
27class xfce4SettingsManagerindowTests(AutopilotTestCase):
28 """ Window tests for the xfce4-settings-manager """
29
30 def setUp(self):
31 """ Basic setup instruction to run before each test """
32 super(xfce4SettingsManagerindowTests, self).setUp()
33 self.manager = ProcessManager.create('BAMF')
34 self.app = self.manager.start_app("xfce4-settings-manager")
35 self.assertTrue(self.app.is_active)
36
37 def test_window_visible(self):
38 """ Check to see if the main window has the proper title """
39 windows = self.app.get_windows()
40 window = windows[0]
41
42 # We must assert the window title = Settings
43 # It fails with assertTrue(self.app.is_focused)
44 self.assertThat(lambda: window.title, Eventually(Contains('Settings')))
45
46 for window in windows:
47 window.close()
48
49 def test_main_menu_settings_visible(self, ):
50 windows = self.app.get_windows()
51 self.assertTrue(len(windows) == 1)
52 mainWindow = windows[0]
53 self.assertTrue(mainWindow.title == "Settings")
54 self.keyboard.type("Main menu")
55 self.keyboard.press("Enter")
56 self.keyboard.press("Enter")
57 mainMenu = self.manager.get_running_applications()
58 mainMenuFound = False
59 for menu in mainMenu:
60 if menu.name == "Main Menu":
61 mainMenuFound = True
62 mainMenuWindows = menu.get_windows()
63 for window in mainMenuWindows:
64 window.close()
65 return
66 self.assertTrue(mainMenuFound)
0\ No newline at end of file67\ No newline at end of file
168
=== added directory 'xubuntu_autopilot_tests/xfce4-taskmanager'
=== added file 'xubuntu_autopilot_tests/xfce4-taskmanager/__init__.py'
--- xubuntu_autopilot_tests/xfce4-taskmanager/__init__.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/xfce4-taskmanager/__init__.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,2 @@
1# -*- coding: utf-8 -*-
2
03
=== added file 'xubuntu_autopilot_tests/xfce4-taskmanager/test_xfce4_taskmanager.py'
--- xubuntu_autopilot_tests/xfce4-taskmanager/test_xfce4_taskmanager.py 1970-01-01 00:00:00 +0000
+++ xubuntu_autopilot_tests/xfce4-taskmanager/test_xfce4_taskmanager.py 2014-03-30 18:20:04 +0000
@@ -0,0 +1,51 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2#
3# Copyright (C) 2014
4#
5# Author: Thomas Molloy beetyrootey@gmail.com
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU Lesser General Public License as published by
9# the Free Software Foundation; version 3.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU Lesser General Public License for more details.
15#
16# You should have received a copy of the GNU Lesser General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18from autopilot.matchers import Eventually
19from testtools.matchers import Equals, Contains
20from autopilot.testcase import AutopilotTestCase
21from autopilot.process import ProcessManager
22
23# register xfce4-taskmanager app
24ProcessManager.register_known_application(
25 "xfce4-taskmanager",
26 "xfce4-taskmanager.desktop",
27 "xfce4-taskmanager")
28
29class xfce4TaskmanagerWindowTests(AutopilotTestCase):
30 """ Window tests for the xfce4-taskmanager """
31
32 def setUp(self):
33 """ Basic setup instruction to run before each test """
34 super(xfce4TaskmanagerWindowTests, self).setUp()
35 self.manager = ProcessManager.create('BAMF')
36 self.app = self.manager.start_app("xfce4-taskmanager")
37 # This will make sure Notes window you launched is focused and ready
38 # to accept your keyboard input
39 self.assertTrue(self.app.is_active)
40
41 def test_window_visible(self):
42 """ Check to see if the main window has the proper title """
43 windows = self.app.get_windows()
44 window = windows[0]
45
46 # We must assert the window title = Task Manager
47 # It fails with assertTrue(self.app.is_focused)
48 self.assertThat(lambda: window.title, Eventually(Contains('Task Manager')))
49
50 for window in windows:
51 window.close()
052
=== modified file 'xubuntu_autopilot_tests/xfce4-terminal/__init__.py'
--- xubuntu_autopilot_tests/xfce4-terminal/__init__.py 2014-01-14 19:00:17 +0000
+++ xubuntu_autopilot_tests/xfce4-terminal/__init__.py 2014-03-30 18:20:04 +0000
@@ -41,4 +41,4 @@
41 self.keyboard.type('mkdir /tmp/temp-dir\n')41 self.keyboard.type('mkdir /tmp/temp-dir\n')
42 self.keyboard.type('touch /tmp/temp-dir/a\n')42 self.keyboard.type('touch /tmp/temp-dir/a\n')
43 self.keyboard.type('touch /tmp/temp-dir/b\n')43 self.keyboard.type('touch /tmp/temp-dir/b\n')
44 self.keyboard.type('touch /tmp/temp-dir/c\n')44 self.keyboard.type('touch /tmp/temp-dir/c\n')
45\ No newline at end of file45\ No newline at end of file
4646
=== modified file 'xubuntu_autopilot_tests/xfce4-terminal/test_terminal.py'
--- xubuntu_autopilot_tests/xfce4-terminal/test_terminal.py 2014-01-14 19:00:17 +0000
+++ xubuntu_autopilot_tests/xfce4-terminal/test_terminal.py 2014-03-30 18:20:04 +0000
@@ -1,8 +1,8 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2#2#
3# Copyright (C) 20133# Copyright (C) 2014
4#4#
5# Author: Daniel Chapman daniel@chapman-mail.com5# Author: Thomas Molloy beetyrootey@gmail.com
6#6#
7# This program is free software; you can redistribute it and/or modify7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU Lesser General Public License as published by8# it under the terms of the GNU Lesser General Public License as published by

Subscribers

People subscribed via source and target branches