File indexing completed on 2025-01-26 04:57:23

0001 /*
0002    SPDX-FileCopyrightText: 2020-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #include "developertooldialogtest.h"
0008 #include "developertool/developertooldialog.h"
0009 #include "developertool/developertoolwidget.h"
0010 #include <QDialogButtonBox>
0011 #include <QStandardPaths>
0012 #include <QTest>
0013 #include <QVBoxLayout>
0014 QTEST_MAIN(DeveloperToolDialogTest)
0015 DeveloperToolDialogTest::DeveloperToolDialogTest(QObject *parent)
0016     : QObject(parent)
0017 {
0018     QStandardPaths::setTestModeEnabled(true);
0019 }
0020 
0021 void DeveloperToolDialogTest::shouldHaveDefaultValues()
0022 {
0023     WebEngineViewer::DeveloperToolDialog d;
0024     auto mainLayout = d.findChild<QVBoxLayout *>(QStringLiteral("mainLayout"));
0025     QVERIFY(mainLayout);
0026 
0027     auto mDeveloperToolWidget = d.findChild<WebEngineViewer::DeveloperToolWidget *>(QStringLiteral("mDeveloperToolWidget"));
0028     QVERIFY(mDeveloperToolWidget);
0029 
0030     auto buttonBox = d.findChild<QDialogButtonBox *>(QStringLiteral("buttonBox"));
0031     QVERIFY(buttonBox);
0032 }
0033 
0034 #include "moc_developertooldialogtest.cpp"