on xenial help sign in
fix an issue with locked out launcher, added test
c0adebbMichael Zanetti
qml/Launcher/Launcher.qml+4
@@ -549,6 +549,10 @@ FocusScope {
549 target: panel
549 target: panel
550 x: -root.x // so we never go past panelWidth, even when teased by tutorial
550 x: -root.x // so we never go past panelWidth, even when teased by tutorial
551 }
551 }
552+ PropertyChanges {
553+ target: drawer
554+ anchors.rightMargin: 0
555+ }
552 },
556 },
553 State {
557 State {
554 name: "drawer"
558 name: "drawer"
tests/qmltests/Launcher/tst_Drawer.qml+14−3
@@ -158,15 +158,26 @@ StyledItem {
158 revealByEdgePush();
158 revealByEdgePush();
159 }
159 }
160
160
161+ function test_hideByDraggingDrawer_data() {
162+ return [
163+ {tag: "autohide", autohide: true, endState: ""},
164+ {tag: "locked", autohide: false, endState: "visible"}
165+ ]
166+ }
167+
161− function test_hideByDraggingDrawer() {
168+ function test_hideByDraggingDrawer(data) {
169+ launcher.lockedVisible = !data.autohide;
170+
162 dragDrawerIntoView();
171 dragDrawerIntoView();
163 waitForRendering(launcher);
172 waitForRendering(launcher);
164
173
165 var drawer = findChild(launcher, "drawer");
174 var drawer = findChild(launcher, "drawer");
166
175
167− mouseFlick(root, drawer.width - units.gu(1), drawer.height / 2, 0, drawer.height / 2, true, true);
176+ mouseFlick(root, drawer.width - units.gu(1), drawer.height / 2, units.gu(2), drawer.height / 2, true, true);
168
177
178+ tryCompare(drawer.anchors, "rightMargin", 0);
169− tryCompare(launcher, "state", "");
179+ tryCompare(launcher, "state", data.endState);
180+ launcher.lockedVisible = false;
170 }
181 }
171
182
172 function test_hideByClickingOutside() {
183 function test_hideByClickingOutside() {