File indexing completed on 2024-12-22 04:45:34
0001 /* 0002 SPDX-FileCopyrightText: 2022-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #include "administratorinviteusersdialogtest.h" 0008 #include "administratordialog/users/administratorinviteusersdialog.h" 0009 #include "administratordialog/users/administratorinviteuserswidget.h" 0010 0011 #include <QDialogButtonBox> 0012 #include <QTest> 0013 #include <QVBoxLayout> 0014 0015 QTEST_MAIN(AdministratorInviteUsersDialogTest) 0016 AdministratorInviteUsersDialogTest::AdministratorInviteUsersDialogTest(QObject *parent) 0017 : QObject{parent} 0018 { 0019 } 0020 0021 void AdministratorInviteUsersDialogTest::shouldHaveDefaultValues() 0022 { 0023 AdministratorInviteUsersDialog w; 0024 QVERIFY(w.emails().isEmpty()); 0025 0026 QVERIFY(!w.windowTitle().isEmpty()); 0027 auto mainLayout = w.findChild<QVBoxLayout *>(QStringLiteral("mainLayout")); 0028 QVERIFY(mainLayout); 0029 0030 auto mCreateWidget = w.findChild<AdministratorInviteUsersWidget *>(QStringLiteral("mInviteUsersWidget")); 0031 QVERIFY(mCreateWidget); 0032 0033 auto buttonBox = w.findChild<QDialogButtonBox *>(QStringLiteral("button")); 0034 QVERIFY(buttonBox); 0035 } 0036 0037 #include "moc_administratorinviteusersdialogtest.cpp"