This tests the newly added additional widget actions.
Details
Passes for me. Is my first GUI test, maybe the timing
needs to be slower for slower machines?
Diff Detail
- Repository
- R223 Okular
- Lint
No Linters Available - Unit
No Unit Test Coverage
QTest::qWait( 100 ); is bad as you probably already guessed since it's "machine dependant".
In those cases you awnt to use the QTRY_ versions, i.e. QTRY_VERIFY2 instead of QVERIFY2
Also you probably want QCOMPARE instead of QVERIFY if your QVERIFY has a == inside, because that way when it fails it already says the expected: actual: values without you having to construct the string (in this case we want QTRY_COMPARE to be able to remove the wait() calls).
Hope i made sense :D
Yeah, looked fishy ;-) Although stuff like that is used in part test on other places so i've copied it.
In those cases you awnt to use the QTRY_ versions, i.e. QTRY_VERIFY2 instead of QVERIFY2
I'll try.
Also you probably want QCOMPARE instead of QVERIFY if your QVERIFY has a == inside, because that way when it fails it already says the expected: actual: values without you having to construct the string (in this case we want QTRY_COMPARE to be able to remove the wait() calls).
I used QVERIFY2 with the equality operator because there is no QCOMPARE2 for QVERIFY So I can't add a message. And if I use such a helper function I need to know the actual failure line.
Hope i made sense :D
Yes, thanks :-)