File indexing completed on 2024-11-24 04:16:53
0001 /* 0002 SPDX-FileCopyrightText: 2022-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #include "translatorconfigurewidgettest.h" 0008 #include "translator/widgets/translatorconfigurecombowidget.h" 0009 #include "translator/widgets/translatorconfigurewidget.h" 0010 #include <QLabel> 0011 #include <QTest> 0012 #include <QVBoxLayout> 0013 QTEST_MAIN(TranslatorConfigureWidgetTest) 0014 TranslatorConfigureWidgetTest::TranslatorConfigureWidgetTest(QObject *parent) 0015 : QObject{parent} 0016 { 0017 } 0018 0019 void TranslatorConfigureWidgetTest::shouldHaveDefaultValues() 0020 { 0021 TextTranslator::TranslatorConfigureWidget w; 0022 0023 auto mEngineConfigureComboWidget = w.findChild<TextTranslator::TranslatorConfigureComboWidget *>(QStringLiteral("mEngineConfigureComboWidget")); 0024 QVERIFY(mEngineConfigureComboWidget); 0025 0026 auto mainLayout = w.findChild<QVBoxLayout *>(QStringLiteral("mainLayout")); 0027 QVERIFY(mainLayout); 0028 QCOMPARE(mainLayout->contentsMargins(), QMargins{}); 0029 0030 auto label = w.findChild<QLabel *>(QStringLiteral("label")); 0031 QVERIFY(label); 0032 QVERIFY(!label->text().isEmpty()); 0033 } 0034 0035 #include "moc_translatorconfigurewidgettest.cpp"