on xenial help sign in
Add tiny test to confirm that we don't just jump to launcherOffset = 0
0c32f9fMichael Terry
tests/qmltests/Greeter/tst_Greeter.qml+10
@@ -354,6 +354,16 @@ Item {
354 tryCompare(view, "launcherOffset", 5);
354 tryCompare(view, "launcherOffset", 5);
355 }
355 }
356
356
357+ function test_laucherOffsetAnimation() {
358+ // Our logic for smoothing launcherOffset when it suddenly goes to
359+ // zero is a bit complicated. Let's just make sure it works here.
360+ greeter.launcherOffset = 5;
361+ compare(view.launcherOffset, 5);
362+ greeter.launcherOffset = 0;
363+ compare(view.launcherOffset, 5); // initially stays at full value
364+ tryCompare(view, "launcherOffset", 0); // and we animate down to 0
365+ }
366+
357 function test_backgroundTopMargin() {
367 function test_backgroundTopMargin() {
358 compare(view.backgroundTopMargin, 0);
368 compare(view.backgroundTopMargin, 0);
359 greeter.y = 5;
369 greeter.y = 5;