コード例 #1
0
    def setUp(self):
        super(ClickAppTestCase, self).setUp()
        self.pointing_device = input.Pointer(self.input_device_class.create())

        self.home_dir = self._patch_home()

        self.launch_application()

        self.assertThat(self.main_view.visible, Eventually(Equals(True)))
コード例 #2
0
ファイル: __init__.py プロジェクト: xinpengliu/checkbox
 def setUp(self):
     super(ClickAppTestCase, self).setUp()
     self.pointing_device = input.Pointer(self.input_device_class.create())
     if self.launcher:
         link = '/tmp/checkbox_autopilot_launcher'
         target = os.path.abspath(os.path.join('launchers', self.launcher))
         if os.path.lexists(link):
             os.unlink(link)
         os.symlink(target, link)
     self.launch_application()
     self.assertThat(self.main_view.visible, Eventually(Equals(True)))
コード例 #3
0
ファイル: _common.py プロジェクト: vanyasem/ubuntu-ui-toolkit
def get_pointing_device():
    """Return the pointing device depending on the platform.

    If the platform is `Desktop`, the pointing device will be a `Mouse`.
    If not, the pointing device will be `Touch`.

    """
    if platform.model() == 'Desktop':
        input_device_class = input.Mouse
    else:
        input_device_class = input.Touch
    return input.Pointer(device=input_device_class.create())
コード例 #4
0
    def setUp(self):
        super(ClickAppTestCase, self).setUp()
        self.pointing_device = input.Pointer(self.input_device_class.create())

        #backup and wipe db's before testing
        self.temp_move_sqlite_db()
        self.addCleanup(self.restore_sqlite_db)

        #turn off the OSK so it doesn't block screen elements
        if model() != 'Desktop':
            os.system("stop maliit-server")
            # adding cleanup step seems to restart
            # service immediately; disabling for now
            # self.addCleanup(os.system("start maliit-server"))

        if os.path.exists(self.local_location):
            self.launch_test_local()
        elif os.path.exists(self.installed_location):
            self.launch_test_installed()
        else:
            self.launch_test_click()
コード例 #5
0
ファイル: base.py プロジェクト: ubports/ubuntuone-credentials
 def setUp(self):
     super(TestCaseWithQMLWrapper, self).setUp()
     self.pointing_device = input.Pointer(self.input_device_class.create())
     self.use_qml2_import_path_for_fake_wrapper()
     self.launch_application()