File indexing completed on 2024-06-16 10:05:04

0001 /*
0002     This file is part of the KDE libraries
0003     SPDX-FileCopyrightText: 2017 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
0004     Work sponsored by the LiMux project of the city of Munich
0005 
0006     SPDX-License-Identifier: LGPL-2.0-only
0007 */
0008 
0009 #include "kfilecustomdialogtest.h"
0010 #include "kfilecustomdialog.h"
0011 
0012 #include <KFileWidget>
0013 #include <QTest>
0014 #include <QVBoxLayout>
0015 QTEST_MAIN(KFileCustomDialogTest)
0016 
0017 void KFileCustomDialogTest::shouldHaveDefaultValue()
0018 {
0019     KFileCustomDialog dlg;
0020     dlg.show();
0021     QVERIFY(QTest::qWaitForWindowExposed(&dlg));
0022 
0023     QVBoxLayout *mainLayout = dlg.findChild<QVBoxLayout *>();
0024     QVERIFY(mainLayout);
0025 
0026     KFileWidget *mFileWidget = dlg.findChild<KFileWidget *>(QStringLiteral("filewidget"));
0027     QVERIFY(mFileWidget);
0028     QCOMPARE(dlg.fileWidget(), mFileWidget);
0029 }
0030 
0031 #include "moc_kfilecustomdialogtest.cpp"