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

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 "teamchannelsdialogtest.h"
0008 #include "teams/teamchannelsdialog.h"
0009 #include "teams/teamchannelswidget.h"
0010 #include <QDialogButtonBox>
0011 #include <QStandardPaths>
0012 #include <QTest>
0013 #include <QVBoxLayout>
0014 QTEST_MAIN(TeamChannelsDialogTest)
0015 
0016 TeamChannelsDialogTest::TeamChannelsDialogTest(QObject *parent)
0017     : QObject(parent)
0018 {
0019     QStandardPaths::setTestModeEnabled(true);
0020 }
0021 
0022 void TeamChannelsDialogTest::shouldHaveDefaultValues()
0023 {
0024     TeamChannelsDialog d(nullptr);
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 
0033     auto mTeamChannelsWidget = d.findChild<TeamChannelsWidget *>(QStringLiteral("mTeamChannelsWidget"));
0034     QVERIFY(mTeamChannelsWidget);
0035 }
0036 
0037 #include "moc_teamchannelsdialogtest.cpp"