on xenial help sign in
Make Launcher::test_quickListMenuOnRMB stable

We need the x to be exactly 0 and compare() does say true for values very close to 0 Fixes: #1500359 Approved by: Michael Zanetti

commitfdf1fd53ca6424dd3bf88fc21f5012bfc3a30078 authorAlbert Astals Cid <albert.astals@canonical.com> dateWed 30 Sep 2015, 10:09 (11 years ago) parent967a2495d151ad
1 file changed+4−1
tests/qmltests/Launcher/tst_Launcher.qml+4−1
tests/qmltests/Launcher/tst_Launcher.qml+4−1
@@ -200,7 +200,10 @@ Item {
200200 verify(!!panel);
201201
202202 // wait until it gets fully extended
203− tryCompare(panel, "x", 0);
203+ // a tryCompare doesn't work since
204+ // compare(-0.000005917593600024418, 0);
205+ // is true and in this case we want exactly 0 or will have pain later on
206+ tryCompareFunction( function(){ return panel.x === 0; }, true );
204207 tryCompare(launcher, "state", "visible");
205208 }
206209