summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2022-01-21 09:42:40 +0100
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2022-01-21 18:53:34 +0100
commitdd3ea45c232d18cd06fed9a380e2fc3a87fe5b8a (patch)
tree07262d7397cfdb1d17ed09dd76eb41aa65f0391e /tests/auto
parente5029063057c38297f188ccfefef7b1bcd781a76 (diff)
Remove flaky and duplicate animateClick tests
The animateClick method is a QAbstractButton member, and neither QCommandLinkButton nor QPushButton override it. The method is tested in the QAbstractButton test, and 3a9b7d1f18648d7236664d3adfc65c009b01e668 made that test more robust. The previous, flaky version of the test was almost duplicated here. They add no additional code coverage, so remove them. Pick-to: 6.2 6.3 Change-Id: I1fa988c1eabd5054193acb1f5fa1c81d29b3878d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp15
-rw-r--r--tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp15
2 files changed, 0 insertions, 30 deletions
diff --git a/tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp b/tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp
index 0d9e3a3198..11bef2dc0d 100644
--- a/tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp
+++ b/tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp
@@ -58,7 +58,6 @@ private slots:
void setDown();
void popupCrash();
void isChecked();
- void animateClick();
void toggle();
void clicked();
void toggled();
@@ -363,20 +362,6 @@ void tst_QCommandLinkButton::setAccel()
#endif // QT_CONFIG(shortcut)
-void tst_QCommandLinkButton::animateClick()
-{
- QVERIFY( !testWidget->isDown() );
- testWidget->animateClick();
- QVERIFY( testWidget->isDown() );
- QTest::qWait( 200 );
- QVERIFY( !testWidget->isDown() );
-
- QVERIFY( click_count == 1 );
- QVERIFY( press_count == 1 );
- QVERIFY( release_count == 1 );
- QVERIFY( toggle_count == 0 );
-}
-
void tst_QCommandLinkButton::clicked()
{
QTest::mousePress( testWidget, Qt::LeftButton );
diff --git a/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp b/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp
index 8c0eb591aa..60b5bebdaf 100644
--- a/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp
+++ b/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp
@@ -60,7 +60,6 @@ private slots:
void setDown();
void popupCrash();
void isChecked();
- void animateClick();
void toggle();
void clicked();
void touchTap();
@@ -361,20 +360,6 @@ void tst_QPushButton::setAccel()
#endif // QT_CONFIG(shortcut)
-void tst_QPushButton::animateClick()
-{
- QVERIFY( !testWidget->isDown() );
- testWidget->animateClick();
- QVERIFY( testWidget->isDown() );
- QTest::qWait( 200 );
- QVERIFY( !testWidget->isDown() );
-
- QVERIFY( click_count == 1 );
- QVERIFY( press_count == 1 );
- QVERIFY( release_count == 1 );
- QVERIFY( toggle_count == 0 );
-}
-
void tst_QPushButton::clicked()
{
QTest::mousePress( testWidget, Qt::LeftButton );