Warning, file /network/ruqola/src/widgets/configuredialog/autotests/removeaccountdialogtest.cpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002    SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #include "removeaccountdialogtest.h"
0008 #include "configuredialog/removeaccountdialog.h"
0009 #include "configuredialog/removeaccountwidget.h"
0010 #include <QDialogButtonBox>
0011 #include <QTest>
0012 #include <QVBoxLayout>
0013 QTEST_MAIN(RemoveAccountDialogTest)
0014 RemoveAccountDialogTest::RemoveAccountDialogTest(QObject *parent)
0015     : QObject{parent}
0016 {
0017 }
0018 
0019 void RemoveAccountDialogTest::shouldHaveDefaultValues()
0020 {
0021     RemoveAccountDialog d;
0022     QVERIFY(!d.windowTitle().isEmpty());
0023     auto mainLayout = d.findChild<QVBoxLayout *>(QStringLiteral("mainLayout"));
0024     QVERIFY(mainLayout);
0025 
0026     auto mRemoveAccountWidget = d.findChild<RemoveAccountWidget *>(QStringLiteral("mRemoveAccountWidget"));
0027     QVERIFY(mRemoveAccountWidget);
0028 
0029     auto button = d.findChild<QDialogButtonBox *>(QStringLiteral("button"));
0030     QVERIFY(button);
0031 
0032     QVERIFY(!d.removeLogs());
0033 }
0034 
0035 #include "moc_removeaccountdialogtest.cpp"