on xenial help sign in
Removed the unneeded qml.
commit2b286629c8b2955f0bb57ca7e5d23ead4838a689 authorLeo Arias <leo.arias@canonical.com> dateMon 7 Apr 2014, 15:05 (13 years ago) parent0f38e63
3 files changed+6−26
tests/autopilot/unity8/application_lifecycle/tests/__init__.py+2−2 tests/autopilot/unity8/application_lifecycle/tests/test_application_lifecycle.py+3−9 tests/autopilot/unity8/application_lifecycle/tests/test_url_dispatcher.py+1−15
tests/autopilot/unity8/application_lifecycle/tests/__init__.py+2−2
@@ -26,8 +26,8 @@ from unity8.shell import tests
2626
2727class ApplicationLifeCycleTestCase(tests.UnityTestCase):
2828
29− def create_test_application(self, test_qml=None):
30− fake_application = fixture_setup.FakeApplication(test_qml)
29+ def create_test_application(self):
30+ fake_application = fixture_setup.FakeApplication()
3131 self.useFixture(fake_application)
3232 return (
3333 fake_application.qml_file_path, fake_application.desktop_file_path)
tests/autopilot/unity8/application_lifecycle/tests/test_application_lifecycle.py+3−9
@@ -48,6 +48,9 @@ class ApplicationLifecycleTests(tests.ApplicationLifeCycleTestCase):
4848 if model() == "Desktop":
4949 self.skipTest("Test cannot be run on the desktop.")
5050
51+ unity_proxy = self.launch_unity()
52+ unlock_unity(unity_proxy)
53+
5154 def swipe_screen_from_right(self):
5255 width = self.main_window.width
5356 height = self.main_window.height
@@ -75,18 +78,12 @@ class ApplicationLifecycleTests(tests.ApplicationLifeCycleTestCase):
7578 @disable_qml_mocking
7679 def test_can_launch_application(self):
7780 """Must be able to launch an application."""
78− unity_proxy = self.launch_unity()
79− unlock_unity(unity_proxy)
80−
8181 application_name = self.launch_fake_app()
8282 self.assert_current_focused_application(application_name)
8383
8484 @disable_qml_mocking
8585 def test_can_launch_multiple_applications(self):
8686 """A second application launched must be focused."""
87− unity_proxy = self.launch_unity()
88− unlock_unity(unity_proxy)
89−
9087 application1_name = self.launch_fake_app()
9188 self.assert_current_focused_application(application1_name)
9289
@@ -100,9 +97,6 @@ class ApplicationLifecycleTests(tests.ApplicationLifeCycleTestCase):
10097 brought back to the focused state.
10198
10299 """
103− unity_proxy = self.launch_unity()
104− unlock_unity(unity_proxy)
105−
106100 application1_name = self.launch_fake_app()
107101 self.assert_current_focused_application(application1_name)
108102
tests/autopilot/unity8/application_lifecycle/tests/test_url_dispatcher.py+1−15
@@ -31,20 +31,6 @@ class URLDispatcherTestCase(tests.ApplicationLifeCycleTestCase):
3131
3232 scenarios = tests._get_device_emulation_scenarios()
3333
34− test_qml = ("""
35−import QtQuick 2.0
36−import Ubuntu.Components 0.1
37−
38−MainView {
39− width: units.gu(48)
40− height: units.gu(60)
41−
42− Label {
43− text: 'Test application.'
44− }
45−}
46−""")
47−
4834 def setUp(self):
4935 if platform.model() == 'Desktop':
5036 self.skipTest("URL dispatcher doesn't work on the desktop.")
@@ -55,7 +41,7 @@ MainView {
5541 process_helpers.unlock_unity(unity_proxy)
5642
5743 def test_swipe_out_application_started_by_url_dispatcher(self):
58− _, desktop_file_path = self.create_test_application(self.test_qml)
44+ _, desktop_file_path = self.create_test_application()
5945 desktop_file_name = os.path.basename(desktop_file_path)
6046 application_name, _ = os.path.splitext(desktop_file_name)
6147