on xenial help sign in
fixed imports
commit2ecaad27d71a3bd4610e516e8833659c3bfc6390 authorNick Dedekind <nicholas.dedekind@gmail.com> dateFri 21 Jun 2013, 17:14 (13 years ago) parentf131a47
4 files changed+50−51
main.cpp+1−1 tests/autopilot/indicators_client/tests/__init__.py+1−2 tests/autopilot/unity8/tests/__init__.py+2−2 tests/autopilot/unity8/tests/testlockscreen.py+46−46
main.cpp+1−1
@@ -124,7 +124,7 @@ int main(int argc, char** argv)
124124
125125 QUrl source("Shell.qml");
126126 prependImportPaths(view->engine(), QStringList() << ::shellAppDirectory());
127− prependImportPaths(view->engine(), ::shellImportPaths());
127+ appendImportPaths(view->engine(), ::shellImportPaths());
128128 appendImportPaths(view->engine(), QStringList() << ::fakePluginsImportPath());
129129 view->setSource(source);
130130 view->setColor("transparent");
tests/autopilot/indicators_client/tests/__init__.py+1−2
@@ -44,8 +44,7 @@ class IndicatorsTestCase(AutopilotTestCase):
4444 super(IndicatorsTestCase, self).setUp()
4545
4646 def launch_test_local(self):
47− os.environ['LD_LIBRARY_PATH'] = "../../../unity_build/build/lib"
48− os.environ['QML2_IMPORT_PATH'] = "../../builddir/plugins:../../builddir/modules:../../builddir/tests/mocks"
47+ os.environ['QML2_IMPORT_PATH'] = "../../builddir/plugins"
4948 self.app = self.launch_test_application("../../builddir/src/Panel/Indicators/client/indicators-client")
5049
5150 def skipWrapper(*args, **kwargs):
tests/autopilot/unity8/tests/__init__.py+2−2
@@ -40,7 +40,7 @@ class ShellTestCase(AutopilotTestCase):
4040
4141 def launch_test_local(self, geometry):
4242 os.environ['LD_LIBRARY_PATH'] = "../../../unity_build/build/lib:../../builddir/tests/mocks/LightDM/" + self.lightdm_mock
43− os.environ['QML2_IMPORT_PATH'] = "../../builddir/tests/mocks:../../builddir/plugins:../../builddir/modules"
43+ os.environ['QML2_IMPORT_PATH'] = "../../builddir/tests/mocks"
4444 if geometry != "0x0":
4545 self.app = self.launch_test_application(
4646 "../../builddir/unity8", "-geometry", geometry, "-frameless", app_type='qt')
@@ -50,7 +50,7 @@ class ShellTestCase(AutopilotTestCase):
5050
5151 def launch_test_installed(self, geometry):
5252 os.environ['LD_LIBRARY_PATH'] = "/usr/share/unity8/plugins/mocks/LightDM/" + self.lightdm_mock
53− os.environ['QML2_IMPORT_PATH'] = "/usr/share/unity8/plugins/mocks:/usr/share/unity8/plugins"
53+ os.environ['QML2_IMPORT_PATH'] = "/usr/share/unity8/plugins/mocks"
5454 if model() == 'Desktop' and geometry != "0x0":
5555 self.app = self.launch_test_application(
5656 "unity8", "-geometry", geometry, "-frameless", app_type='qt')
tests/autopilot/unity8/tests/testlockscreen.py+46−46
@@ -70,49 +70,49 @@ class TestLockscreens(ShellTestCase, TestShellHelpers):
7070 divisor = divisor * 2
7171 super(TestLockscreens, self).setUp("%sx%s" % (self.app_width / divisor, self.app_height / divisor), "%s" % (self.grid_unit_px / divisor))
7272
73− # dash = self.main_window.get_dash()
74− # self.assertThat(dash.showScopeOnLoaded, Eventually(Equals(""), timeout=30))
75−
76− # def test_unlock(self):
77− # self.unlock_greeter()
78−
79− # pinPadLoader = self.main_window.get_pinPadLoader();
80− # self.assertThat(pinPadLoader.progress, Eventually(Equals(1)))
81− # lockscreen = self.main_window.get_lockscreen();
82− # self.assertThat(lockscreen.shown, Eventually(Equals(True)))
83−
84− # if self.lightdm_mock == "single-pin":
85− # self.touch.tap_object(self.main_window.get_pinPadButton(1))
86− # self.touch.tap_object(self.main_window.get_pinPadButton(2))
87− # self.touch.tap_object(self.main_window.get_pinPadButton(3))
88− # self.touch.tap_object(self.main_window.get_pinPadButton(4))
89− # self.assertThat(lockscreen.shown, Eventually(Equals(False)))
90− # else:
91− # pinentryField = self.main_window.get_pinentryField()
92− # self.touch.tap_object(pinentryField)
93− # self.keyboard.type("password\n")
94− # self.assertThat(lockscreen.shown, Eventually(Equals(False)))
95−
96− # def test_unlock_wrong(self):
97− # self.unlock_greeter()
98−
99− # pinPadLoader = self.main_window.get_pinPadLoader();
100− # self.assertThat(pinPadLoader.progress, Eventually(Equals(1)))
101− # lockscreen = self.main_window.get_lockscreen();
102− # self.assertThat(lockscreen.shown, Eventually(Equals(True)))
103− # pinentryField = self.main_window.get_pinentryField()
104−
105− # if self.lightdm_mock == "single-pin":
106− # self.touch.tap_object(self.main_window.get_pinPadButton(4))
107− # self.touch.tap_object(self.main_window.get_pinPadButton(3))
108− # self.touch.tap_object(self.main_window.get_pinPadButton(2))
109− # self.assertThat(pinentryField.text, Eventually(Equals("432")))
110− # self.touch.tap_object(self.main_window.get_pinPadButton(1))
111−
112− # self.assertThat(pinentryField.text, Eventually(Equals("")))
113− # self.assertThat(lockscreen.shown, Eventually(Equals(True)))
114− # else:
115− # self.touch.tap_object(pinentryField)
116− # self.keyboard.type("foobar\n")
117− # self.assertThat(pinentryField.text, Eventually(Equals("")))
118− # self.assertThat(lockscreen.shown, Eventually(Equals(True)))
73+ dash = self.main_window.get_dash()
74+ self.assertThat(dash.showScopeOnLoaded, Eventually(Equals(""), timeout=30))
75+
76+ def test_unlock(self):
77+ self.unlock_greeter()
78+
79+ pinPadLoader = self.main_window.get_pinPadLoader();
80+ self.assertThat(pinPadLoader.progress, Eventually(Equals(1)))
81+ lockscreen = self.main_window.get_lockscreen();
82+ self.assertThat(lockscreen.shown, Eventually(Equals(True)))
83+
84+ if self.lightdm_mock == "single-pin":
85+ self.touch.tap_object(self.main_window.get_pinPadButton(1))
86+ self.touch.tap_object(self.main_window.get_pinPadButton(2))
87+ self.touch.tap_object(self.main_window.get_pinPadButton(3))
88+ self.touch.tap_object(self.main_window.get_pinPadButton(4))
89+ self.assertThat(lockscreen.shown, Eventually(Equals(False)))
90+ else:
91+ pinentryField = self.main_window.get_pinentryField()
92+ self.touch.tap_object(pinentryField)
93+ self.keyboard.type("password\n")
94+ self.assertThat(lockscreen.shown, Eventually(Equals(False)))
95+
96+ def test_unlock_wrong(self):
97+ self.unlock_greeter()
98+
99+ pinPadLoader = self.main_window.get_pinPadLoader();
100+ self.assertThat(pinPadLoader.progress, Eventually(Equals(1)))
101+ lockscreen = self.main_window.get_lockscreen();
102+ self.assertThat(lockscreen.shown, Eventually(Equals(True)))
103+ pinentryField = self.main_window.get_pinentryField()
104+
105+ if self.lightdm_mock == "single-pin":
106+ self.touch.tap_object(self.main_window.get_pinPadButton(4))
107+ self.touch.tap_object(self.main_window.get_pinPadButton(3))
108+ self.touch.tap_object(self.main_window.get_pinPadButton(2))
109+ self.assertThat(pinentryField.text, Eventually(Equals("432")))
110+ self.touch.tap_object(self.main_window.get_pinPadButton(1))
111+
112+ self.assertThat(pinentryField.text, Eventually(Equals("")))
113+ self.assertThat(lockscreen.shown, Eventually(Equals(True)))
114+ else:
115+ self.touch.tap_object(pinentryField)
116+ self.keyboard.type("foobar\n")
117+ self.assertThat(pinentryField.text, Eventually(Equals("")))
118+ self.assertThat(lockscreen.shown, Eventually(Equals(True)))