Example #1
0
 def launch_test_local(self):
     return self.launch_test_application(
         base.get_qmlscene_launch_command(),
         self.local_location,
         app_type='qt',
         emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase
     )
Example #2
0
 def launch_test_installed(self):
     return self.launch_test_application(
         base.get_qmlscene_launch_command(),
         self.installed_location_qml,
         "-I", self.installed_location_backend,
         app_type='qt',
         emulator_base=ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase)
Example #3
0
 def launch_test_local(self):
     return self.launch_test_application(
         base.get_qmlscene_launch_command(),
         self.local_location_qml,
         app_type="qt",
         emulator_base=ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase,
     )
Example #4
0
 def launch_test_installed(self):
     return self.launch_test_application(
         base.get_qmlscene_launch_command(),
         self.installed_location,
         "debug",
         app_type='qt',
         emulator_base=ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase)
Example #5
0
 def launch_test_local(self):
     return self.launch_test_application(
         base.get_qmlscene_launch_command(),
         self.local_location,
         "debug",
         app_type='qt',
         emulator_base=ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase)
Example #6
0
 def launch_test_installed(self):
     return self.launch_test_application(
         base.get_qmlscene_launch_command(),
         "/usr/share/sudoku-app/sudoku-app.qml",
         "--desktop_file_hint=/usr/share/applications/sudoku-app.desktop",
         app_type='qt',
         emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase
     )
 def launch_test_installed(self):
     self.app = self.launch_test_application(
         base.get_qmlscene_launch_command(),
         self.installed_location,
         "--desktop_file_hint=/usr/share/applications/"
         "project-dashboard.desktop",
         app_type='qt',
         emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)
Example #8
0
 def _launch_application_from_desktop(self):
     app_qml_source_location = self._get_app_qml_source_path()
     if os.path.exists(app_qml_source_location):
         self.app = self.launch_test_application(
             base.get_qmlscene_launch_command(),
             '-I' + _get_module_include_path(),
             app_qml_source_location,
             app_type='qt',
             emulator_base=emulators.UbuntuUIToolkitEmulatorBase)
     else:
         raise NotImplementedError(
             "On desktop we can't install click packages yet, so we can "
             "only run from source.")
Example #9
0
 def _launch_application_from_desktop(self):
     app_qml_source_location = self._get_app_qml_source_path()
     if os.path.exists(app_qml_source_location):
         self.app = self.launch_test_application(
             base.get_qmlscene_launch_command(),
             '-I' + _get_module_include_path(),
             app_qml_source_location,
             app_type='qt',
             emulator_base=emulators.UbuntuUIToolkitEmulatorBase)
     else:
         raise NotImplementedError(
             "On desktop we can't install click packages yet, so we can "
             "only run from source.")
Example #10
0
    def _start_qml_script(self, script_contents):
        """Launch a qml script."""
        qml_path = tempfile.mktemp(suffix='.qml')
        open(qml_path, 'w').write(script_contents)
        self.addCleanup(os.remove, qml_path)

        desktop_file = self._write_test_desktop_file()
        return self.launch_test_application(
            base.get_qmlscene_launch_command(),
            qml_path,
            '--desktop_file_hint=%s' % desktop_file,
            app_type='qt',
        )
    def test_launch_fake_application_with_qmlscene(self):
        fake_application = fixture_setup.FakeApplication()
        self.useFixture(fake_application)

        application = self.launch_test_application(
            base.get_qmlscene_launch_command(),
            fake_application.qml_file_path,
            '--desktop_file_hint={0}'.format(
                fake_application.desktop_file_path),
            app_type='qt')

        # We can select a component from the application.
        application.select_single('Label', objectName='testLabel')
    def _start_qml_script(self, script_contents):
        """Launch a qml script."""
        qml_path = tempfile.mktemp(suffix='.qml')
        open(qml_path, 'w').write(script_contents)
        self.addCleanup(os.remove, qml_path)

        # Use installed desktop file so that Mir allows us to connect with
        # our test QML apps
        desktop_file = "/usr/share/applications/ubuntu-keyboard-tester.desktop"
        return self.launch_test_application(
            base.get_qmlscene_launch_command(),
            qml_path,
            '--desktop_file_hint=%s' % desktop_file,
            app_type='qt',
        )
Example #13
0
 def _launch_application_from_source(self, app_qml_source_location):
     return self.launch_test_application(
         base.get_qmlscene_launch_command(),
         app_qml_source_location,
         app_type='qt',
         emulator_base=ApplicationCustomProxyObject)
Example #14
0
 def _launch_application_from_source(self, app_qml_source_location):
     return self.launch_test_application(
         base.get_qmlscene_launch_command(),
         app_qml_source_location,
         app_type='qt',
         emulator_base=ApplicationCustomProxyObject)
Example #15
0
 def launch_test_local(self):
     self.app = self.launch_test_application(
         base.get_qmlscene_launch_command(),
         self.local_location,
         app_type='qt',
         emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)