autotests/integration: fix decoration input test
This commit is contained in:
parent
52b4ee3338
commit
3d1101d5ff
1 changed files with 6 additions and 4 deletions
|
@ -168,6 +168,8 @@ void DecorationInputTest::testAxis_data()
|
|||
|
||||
void DecorationInputTest::testAxis()
|
||||
{
|
||||
static constexpr double oneTick = 15;
|
||||
|
||||
const auto [window, surface] = showWindow();
|
||||
QVERIFY(window);
|
||||
QVERIFY(window->isDecorated());
|
||||
|
@ -183,13 +185,13 @@ void DecorationInputTest::testAxis()
|
|||
|
||||
// TODO: mouse wheel direction looks wrong to me
|
||||
// simulate wheel
|
||||
Test::pointerAxisVertical(5.0, timestamp++);
|
||||
Test::pointerAxisVertical(oneTick, timestamp++);
|
||||
QVERIFY(window->keepBelow());
|
||||
QVERIFY(!window->keepAbove());
|
||||
Test::pointerAxisVertical(-5.0, timestamp++);
|
||||
Test::pointerAxisVertical(-oneTick, timestamp++);
|
||||
QVERIFY(!window->keepBelow());
|
||||
QVERIFY(!window->keepAbove());
|
||||
Test::pointerAxisVertical(-5.0, timestamp++);
|
||||
Test::pointerAxisVertical(-oneTick, timestamp++);
|
||||
QVERIFY(!window->keepBelow());
|
||||
QVERIFY(window->keepAbove());
|
||||
|
||||
|
@ -200,7 +202,7 @@ void DecorationInputTest::testAxis()
|
|||
QVERIFY(input()->pointer()->decoration());
|
||||
QCOMPARE(input()->pointer()->decoration()->window(), window);
|
||||
QTEST(input()->pointer()->decoration()->decoration()->sectionUnderMouse(), "expectedSection");
|
||||
Test::pointerAxisVertical(5.0, timestamp++);
|
||||
Test::pointerAxisVertical(oneTick, timestamp++);
|
||||
QVERIFY(!window->keepBelow());
|
||||
QVERIFY(!window->keepAbove());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue