File indexing completed on 2025-01-19 04:46:48
0001 /* 0002 SPDX-FileCopyrightText: 2016-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #include "reactiontoinvitationdialogtest.h" 0008 #include "../calendar/reactiontoinvitationdialog.h" 0009 #include <QDialogButtonBox> 0010 #include <QLabel> 0011 #include <QStandardPaths> 0012 #include <QTest> 0013 #include <TextCustomEditor/PlainTextEditorWidget> 0014 0015 ReactionToInvitationDialogTest::ReactionToInvitationDialogTest(QObject *parent) 0016 : QObject(parent) 0017 { 0018 QStandardPaths::setTestModeEnabled(true); 0019 } 0020 0021 ReactionToInvitationDialogTest::~ReactionToInvitationDialogTest() = default; 0022 0023 void ReactionToInvitationDialogTest::shouldHaveDefaultValue() 0024 { 0025 ReactionToInvitationDialog w; 0026 0027 auto label = w.findChild<QLabel *>(QStringLiteral("label")); 0028 QVERIFY(label); 0029 0030 auto mPlainTextEditor = w.findChild<TextCustomEditor::PlainTextEditorWidget *>(QStringLiteral("plaintexteditor")); 0031 QVERIFY(mPlainTextEditor); 0032 QVERIFY(mPlainTextEditor->toPlainText().isEmpty()); 0033 0034 auto buttonBox = w.findChild<QDialogButtonBox *>(QStringLiteral("buttonbox")); 0035 QVERIFY(buttonBox); 0036 0037 QVERIFY(w.comment().isEmpty()); 0038 } 0039 0040 QTEST_MAIN(ReactionToInvitationDialogTest) 0041 0042 #include "moc_reactiontoinvitationdialogtest.cpp"