File indexing completed on 2025-01-19 04:46:40

0001 /*
0002    SPDX-FileCopyrightText: 2019-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #include "quicktextwidgettest.h"
0008 #include "quicktexttreewidget.h"
0009 #include "quicktextwidget.h"
0010 #include <MailCommon/SnippetWidget>
0011 #include <QHBoxLayout>
0012 #include <QStackedWidget>
0013 #include <QTest>
0014 QTEST_MAIN(QuickTextWidgetTest)
0015 QuickTextWidgetTest::QuickTextWidgetTest(QObject *parent)
0016     : QObject(parent)
0017 {
0018 }
0019 
0020 void QuickTextWidgetTest::shouldHaveDefaultValues()
0021 {
0022     QuickTextWidget w;
0023     auto mainLayout = w.findChild<QHBoxLayout *>(QStringLiteral("mainLayout"));
0024     QVERIFY(mainLayout);
0025     QCOMPARE(w.contentsMargins(), QMargins());
0026 
0027     auto mTreeWidget = w.findChild<QuicktextTreeWidget *>(QStringLiteral("treewidget"));
0028     QVERIFY(mTreeWidget);
0029 
0030     auto mStackedWidget = w.findChild<QStackedWidget *>(QStringLiteral("stackedwidget"));
0031     QVERIFY(mStackedWidget);
0032 }
0033 
0034 #include "moc_quicktextwidgettest.cpp"