File indexing completed on 2024-12-22 04:45:34
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 "administratorcustomsoundscreatedialogtest.h" 0008 #include "administratordialog/customsounds/administratorcustomsoundscreatedialog.h" 0009 #include "administratordialog/customsounds/administratorcustomsoundscreatewidget.h" 0010 #include <QDialogButtonBox> 0011 #include <QStandardPaths> 0012 #include <QTest> 0013 #include <QVBoxLayout> 0014 0015 QTEST_MAIN(AdministratorCustomSoundsCreateDialogTest) 0016 AdministratorCustomSoundsCreateDialogTest::AdministratorCustomSoundsCreateDialogTest(QObject *parent) 0017 : QObject(parent) 0018 { 0019 QStandardPaths::setTestModeEnabled(true); 0020 } 0021 0022 void AdministratorCustomSoundsCreateDialogTest::shouldHaveDefaultValues() 0023 { 0024 AdministratorCustomSoundsCreateDialog w; 0025 QVERIFY(!w.windowTitle().isEmpty()); 0026 auto mainLayout = w.findChild<QVBoxLayout *>(QStringLiteral("mainLayout")); 0027 QVERIFY(mainLayout); 0028 0029 auto mCreateWidget = w.findChild<AdministratorCustomSoundsCreateWidget *>(QStringLiteral("mCreateWidget")); 0030 QVERIFY(mCreateWidget); 0031 0032 auto buttonBox = w.findChild<QDialogButtonBox *>(QStringLiteral("button")); 0033 QVERIFY(buttonBox); 0034 } 0035 0036 #include "moc_administratorcustomsoundscreatedialogtest.cpp"