File indexing completed on 2024-12-22 04:46:12

0001 /*
0002    SPDX-FileCopyrightText: 2021-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #include "teamselectdeletedroomdialogtest.h"
0008 #include "teams/teamselectdeletedroomdialog.h"
0009 #include "teams/teamselectdeletedroomwidget.h"
0010 #include <QDialogButtonBox>
0011 #include <QStandardPaths>
0012 #include <QTest>
0013 #include <QVBoxLayout>
0014 QTEST_MAIN(TeamSelectDeletedRoomDialogTest)
0015 
0016 TeamSelectDeletedRoomDialogTest::TeamSelectDeletedRoomDialogTest(QObject *parent)
0017     : QObject(parent)
0018 {
0019     QStandardPaths::setTestModeEnabled(true);
0020 }
0021 
0022 void TeamSelectDeletedRoomDialogTest::shouldHaveDefaultValues()
0023 {
0024     TeamSelectDeletedRoomDialog d;
0025     QVERIFY(!d.windowTitle().isEmpty());
0026 
0027     auto mainLayout = d.findChild<QVBoxLayout *>(QStringLiteral("mainLayout"));
0028     QVERIFY(mainLayout);
0029 
0030     auto button = d.findChild<QDialogButtonBox *>(QStringLiteral("button"));
0031     QVERIFY(button);
0032     auto mTeamSelectDeletedRoomWidget = d.findChild<TeamSelectDeletedRoomWidget *>(QStringLiteral("mTeamSelectDeletedRoomWidget"));
0033     QVERIFY(mTeamSelectDeletedRoomWidget);
0034 
0035     QVERIFY(d.roomsId().isEmpty());
0036 }
0037 
0038 #include "moc_teamselectdeletedroomdialogtest.cpp"