on xenial help sign in
add a regression test for the drop shadow stuff
commit8eac14ef830f634005817dfd3839f2646f78bfcf authorLukáš Tinkl <lukas.tinkl@canonical.com> dateThu 7 Jan 2016, 15:00 (11 years ago) parent1925e98
1 file changed+29
tests/qmltests/Stages/tst_DesktopStage.qml+29
tests/qmltests/Stages/tst_DesktopStage.qml+29
@@ -25,6 +25,7 @@ import Utils 0.1
2525import ".." // For EdgeBarrierControls
2626import "../../../qml/Stages"
2727import "../../../qml/Components"
28+import "../../../qml/Components/PanelState"
2829
2930Item {
3031 id: root
@@ -500,5 +501,33 @@ Item {
500501 tryCompare(dialerAppDelegate, "visible", true);
501502 tryCompare(facebookAppDelegate, "visible", false);
502503 }
504+
505+ function test_dropShadow() {
506+ killAllRunningApps();
507+
508+ // verify the drop shadow is not visible initially
509+ verify(PanelState.dropShadow == false);
510+
511+ // start an app, maximize it
512+ var facebookApp = startApplication("facebook-webapp");
513+ var facebookAppDelegate = findChild(desktopStage, "appDelegate_facebook-webapp");
514+ facebookAppDelegate.maximize();
515+
516+ // verify the drop shadow is still not visible
517+ verify(PanelState.dropShadow == false);
518+
519+ // start a foreground app, not maximized
520+ var dialerApp = startApplication("dialer-app");
521+ var dialerAppDelegate = findChild(desktopStage, "appDelegate_dialer-app");
522+
523+ // verify the drop shadow becomes visible
524+ verify(PanelState.dropShadow == true);
525+
526+ // close the maximized app
527+ ApplicationManager.stopApplication("facebook-webapp");
528+
529+ // verify the drop shadow is gone
530+ verify(PanelState.dropShadow == false);
531+ }
503532 }
504533}