Commit e3d5b238 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Verify that button is hidden or not

parent 7a7a2ab8
......@@ -72,4 +72,21 @@ void SelectionTypeDialogTest::shouldHaveDefaultValue()
QVERIFY(mLoadTemplate->isEnabled());
}
void SelectionTypeDialogTest::shouldHideButtons()
{
SelectionTypeDialog dlg;
dlg.removeNotSelectedItems();
QPushButton *selectAll = dlg.findChild<QPushButton *>(QStringLiteral("selectAll"));
QVERIFY(!selectAll->isHidden());
QPushButton *unselectAll = dlg.findChild<QPushButton *>(QStringLiteral("unselectAll"));
QVERIFY(!unselectAll->isHidden());
QPushButton *mSaveTemplate = dlg.findChild<QPushButton *>(QStringLiteral("mSaveTemplate"));
QVERIFY(mSaveTemplate->isHidden());
QPushButton *mLoadTemplate = dlg.findChild<QPushButton *>(QStringLiteral("mLoadTemplate"));
QVERIFY(mLoadTemplate->isHidden());
}
QTEST_MAIN(SelectionTypeDialogTest)
......@@ -30,6 +30,7 @@ public:
~SelectionTypeDialogTest();
private Q_SLOTS:
void shouldHaveDefaultValue();
void shouldHideButtons();
};
#endif // SELECTIONTYPEDIALOGTEST_H
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment