@@ -35,7 +35,10 @@ import os.path
35import subprocess
35import subprocess
37from testtools.matchers import Equals
37from testtools.matchers import Equals
38+from ubuntuuitoolkit import (
38−from ubuntuuitoolkit import fixture_setup as toolkit_fixtures
39+ fixture_setup as toolkit_fixtures,
40from unity8 import (
43from unity8 import (
41 get_lib_path,
44 get_lib_path,
@@ -405,13 +408,15 @@ class UnityTestCase(AutopilotTestCase):
406class DashBaseTestCase(AutopilotTestCase):
409class DashBaseTestCase(AutopilotTestCase):
408− scenarios = _get_device_emulation_scenarios()
411+ scenarios = ubuntu_scenarios.get_device_simulation_scenarios()
409 qml_mock_enabled = True
412 qml_mock_enabled = True
410 environment = {}
413 environment = {}
412 def setUp(self):
415 def setUp(self):
413 if model() != 'Desktop':
416 if model() != 'Desktop':
414− process_helpers.restart_unity()
417+ process_helpers.restart_unity_with_testability()
418+ process_helpers.unlock_unity()
419+ self.ensure_dash_not_running()
416 super(DashBaseTestCase, self).setUp()
421 super(DashBaseTestCase, self).setUp()
@@ -438,6 +443,10 @@ class DashBaseTestCase(AutopilotTestCase):
438 self.dash = self.dash_app.dash
443 self.dash = self.dash_app.dash
439 self.wait_for_dash()
444 self.wait_for_dash()
446+ def ensure_dash_not_running(self):
447+ if process_helpers.is_job_running('unity8-dash'):
448+ process_helpers.stop_job('unity8-dash')
441 def launch_dash(self, binary_path, variables):
450 def launch_dash(self, binary_path, variables):
442 launch_dash_app_fixture = fixture_setup.LaunchDashApp(
451 launch_dash_app_fixture = fixture_setup.LaunchDashApp(
443 binary_path, variables)
452 binary_path, variables)