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 "e2edecodeencryptionkeyfailedwidgettest.h" 0008 #include "encryption/e2edecodeencryptionkeyfailedwidget.h" 0009 #include <QAction> 0010 #include <QTest> 0011 QTEST_MAIN(E2eDecodeEncryptionKeyFailedWidgetTest) 0012 E2eDecodeEncryptionKeyFailedWidgetTest::E2eDecodeEncryptionKeyFailedWidgetTest(QObject *parent) 0013 : QObject{parent} 0014 { 0015 } 0016 0017 void E2eDecodeEncryptionKeyFailedWidgetTest::shouldHaveDefaultValues() 0018 { 0019 E2eDecodeEncryptionKeyFailedWidget w; 0020 w.show(); 0021 QCOMPARE(w.messageType(), KMessageWidget::Error); 0022 QCOMPARE(w.position(), KMessageWidget::Header); 0023 QVERIFY(!w.text().isEmpty()); 0024 QVERIFY(w.isCloseButtonVisible()); 0025 0026 auto decodeEncryptionKeyAction = w.findChild<QAction *>(QStringLiteral("decodeEncryptionKeyAction")); 0027 QVERIFY(decodeEncryptionKeyAction); 0028 } 0029 0030 #include "moc_e2edecodeencryptionkeyfailedwidgettest.cpp"