on xenial help sign in
Added tests for disabling the launcher
commit7076636f12eaf41b12cf010bc3a2fe6826393487 authorBrian Douglass <bhdouglass@gmail.com> dateFri 23 Sep 2016, 23:39 (10 years ago) parente49012e
1 file changed+24−1
tests/qmltests/Launcher/tst_Launcher.qml+24−1
tests/qmltests/Launcher/tst_Launcher.qml+24−1
@@ -287,12 +287,16 @@ Rectangle {
287287 removeTimeConstraintsFromSwipeAreas(root);
288288 }
289289
290− function dragLauncherIntoView() {
290+ function dragLauncher() {
291291 var startX = launcher.dragAreaWidth/2;
292292 var startY = launcher.height/2;
293293 touchFlick(launcher,
294294 startX, startY,
295295 startX+units.gu(8), startY);
296+ }
297+
298+ function dragLauncherIntoView() {
299+ dragLauncher();
296300
297301 var panel = findChild(launcher, "launcherPanel");
298302 verify(!!panel);
@@ -1340,6 +1344,8 @@ Rectangle {
13401344 }
13411345
13421346 function test_preventMouseEventsThru() {
1347+ compare(0, 1);
1348+
13431349 dragLauncherIntoView();
13441350 var launcherPanel = findChild(launcher, "launcherPanel");
13451351 tryCompare(launcherPanel, "visible", true);
@@ -1353,5 +1359,22 @@ Rectangle {
13531359 mouseWheel(launcherPanel, launcherPanel.width/2, launcherPanel.height/2, Qt.RightButton);
13541360 tryCompare(clickThroughSpy, "count", 0);
13551361 }
1362+
1363+ function test_launcherEnabledSetting() {
1364+ launcher.available = true;
1365+
1366+ dragLauncherIntoView();
1367+ var launcherPanel = findChild(launcher, "launcherPanel");
1368+ compare(launcherPanel.x, 0);
1369+ }
1370+
1371+ function test_launcherDisabledSetting() {
1372+ launcher.available = false;
1373+
1374+ //We don't actually care that it's visible, so juct use dragLauncher() rather than dragLauncherIntoView()
1375+ dragLauncher();
1376+ var launcherPanel = findChild(launcher, "launcherPanel");
1377+ compare(launcherPanel.x, -launcherPanel.width);
1378+ }
13561379 }
13571380}