File indexing completed on 2024-12-22 04:45:56

0001 /*
0002   SPDX-FileCopyrightText: 2024 Laurent Montel <montel.org>
0003 
0004   SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #include "e2epassworddecodekeydialogtest.h"
0008 #include "encryption/e2epassworddecodekeydialog.h"
0009 #include "encryption/e2epassworddecodekeywidget.h"
0010 #include <QDialogButtonBox>
0011 #include <QTest>
0012 #include <QVBoxLayout>
0013 QTEST_MAIN(E2ePasswordDecodeKeyDialogTest)
0014 E2ePasswordDecodeKeyDialogTest::E2ePasswordDecodeKeyDialogTest(QObject *parent)
0015     : QObject{parent}
0016 {
0017 }
0018 
0019 void E2ePasswordDecodeKeyDialogTest::shouldHaveDefaultValues()
0020 {
0021     E2ePasswordDecodeKeyDialog d;
0022     QVERIFY(!d.windowTitle().isEmpty());
0023 
0024     auto mainLayout = d.findChild<QVBoxLayout *>(QStringLiteral("mainLayout"));
0025     QVERIFY(mainLayout);
0026 
0027     auto mE2ePasswordDecodeKeyWidget = d.findChild<E2ePasswordDecodeKeyWidget *>(QStringLiteral("mE2ePasswordDecodeKeyWidget"));
0028     QVERIFY(mE2ePasswordDecodeKeyWidget);
0029 
0030     auto button = d.findChild<QDialogButtonBox *>(QStringLiteral("button"));
0031     QVERIFY(button);
0032 
0033     QVERIFY(d.password().isEmpty());
0034 }
0035 
0036 #include "moc_e2epassworddecodekeydialogtest.cpp"