~djfun/catchpodder/trunk

« back to all changes in this revision

Viewing changes to tests/autopilot/Catchpodder/tests/__init__.py

  • Committer: Martin Kaistra
  • Date: 2013-07-27 13:38:33 UTC
  • Revision ID: martin@djfun.de-20130727133833-nvfykhgjap80i555
updated tests using the new sdk autopilot emulator

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
from autopilot.platform import model
6
6
from autopilot.testcase import AutopilotTestCase
7
7
 
8
 
from Catchpodder.emulators.main_window import MainWindow
9
 
from Catchpodder.emulators.ubuntusdk import ubuntusdk
 
8
from ubuntuuitoolkit import emulators as toolkit_emulators
 
9
from Catchpodder import emulators
10
10
 
11
11
import SimpleHTTPServer
12
12
import SocketServer
44
44
        self.app = self.launch_test_application(
45
45
            "qmlscene",
46
46
            self.local_location,
47
 
            app_type='qt')
 
47
            app_type='qt',
 
48
            emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)
48
49
 
49
50
    def launch_test_installed(self):
50
51
        self.app = self.launch_test_application(
51
52
            "qmlscene",
52
53
            "/usr/share/Catchpodder/Cachpodder.qml",
53
54
            "--desktop_file_hint=/usr/share/applications/Catchpodder.desktop",
54
 
            app_type='qt')
 
55
            app_type='qt',
 
56
            emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)
55
57
 
56
58
    def launch_and_quit_app(self):
57
59
        self.launch_app()
66
68
        self.doCleanups()
67
69
 
68
70
    @property
69
 
    def main_window(self):
70
 
        return MainWindow(self.app)
71
 
 
72
 
    @property
73
 
    def ubuntu_sdk(self):
74
 
        return ubuntusdk(self, self.app)
 
71
    def main_view(self):
 
72
        return self.app.select_single(emulators.MainView)
75
73
 
76
74
 
77
75
class HTTPServerInAThread(threading.Thread):