summaryrefslogtreecommitdiffstats
path: root/tests/auto/qwizard/tst_qwizard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qwizard/tst_qwizard.cpp')
-rw-r--r--tests/auto/qwizard/tst_qwizard.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/auto/qwizard/tst_qwizard.cpp b/tests/auto/qwizard/tst_qwizard.cpp
index 400d124..9b9c209 100644
--- a/tests/auto/qwizard/tst_qwizard.cpp
+++ b/tests/auto/qwizard/tst_qwizard.cpp
@@ -111,6 +111,7 @@ private slots:
void task183550_stretchFactor();
void task161658_alignments();
void task177022_setFixedSize();
+ void task248107_backButton();
/*
Things that could be added:
@@ -2481,5 +2482,40 @@ void tst_QWizard::task177022_setFixedSize()
}
+void tst_QWizard::task248107_backButton()
+{
+ QWizard wizard;
+ QWizardPage page1;
+ QWizardPage page2;
+ QWizardPage page3;
+ QWizardPage page4;
+ wizard.addPage(&page1);
+ wizard.addPage(&page2);
+ wizard.addPage(&page3);
+ wizard.addPage(&page4);
+
+ wizard.show();
+ QTest::qWait(100);
+ QCOMPARE(wizard.currentPage(), &page1);
+
+ QTest::mouseClick(wizard.button(QWizard::NextButton), Qt::LeftButton);
+ QCOMPARE(wizard.currentPage(), &page2);
+
+ QTest::mouseClick(wizard.button(QWizard::NextButton), Qt::LeftButton);
+ QCOMPARE(wizard.currentPage(), &page3);
+
+ QTest::mouseClick(wizard.button(QWizard::NextButton), Qt::LeftButton);
+ QCOMPARE(wizard.currentPage(), &page4);
+
+ QTest::mouseClick(wizard.button(QWizard::BackButton), Qt::LeftButton);
+ QCOMPARE(wizard.currentPage(), &page3);
+
+ QTest::mouseClick(wizard.button(QWizard::BackButton), Qt::LeftButton);
+ QCOMPARE(wizard.currentPage(), &page2);
+
+ QTest::mouseClick(wizard.button(QWizard::BackButton), Qt::LeftButton);
+ QCOMPARE(wizard.currentPage(), &page1);
+}
+
QTEST_MAIN(tst_QWizard)
#include "tst_qwizard.moc"