Commit 3c9a06c3 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Improve autotest

parent fac9b818
Pipeline #126198 passed with stage
in 11 minutes and 1 second
......@@ -6,7 +6,9 @@
#include "openurlwithconfigurecreatedialogtest.h"
#include "openurlwithconfigurecreatedialog.h"
#include <QDialogButtonBox>
#include <QTest>
#include <QVBoxLayout>
QTEST_MAIN(OpenUrlWithConfigureCreateDialogTest)
OpenUrlWithConfigureCreateDialogTest::OpenUrlWithConfigureCreateDialogTest(QObject *parent)
: QObject{parent}
......@@ -15,6 +17,16 @@ OpenUrlWithConfigureCreateDialogTest::OpenUrlWithConfigureCreateDialogTest(QObje
void OpenUrlWithConfigureCreateDialogTest::shouldHaveDefaultValues()
{
OpenUrlWithConfigureCreateDialog d;
// TODO
OpenUrlWithConfigureCreateDialog dlg;
QVERIFY(!dlg.windowTitle().isEmpty());
auto mainLayout = dlg.findChild<QVBoxLayout *>(QStringLiteral("mainlayout"));
QVERIFY(mainLayout);
auto mOpenUrlWithCreateWidget = dlg.findChild<OpenUrlWithConfigureCreateWidget *>(QStringLiteral("mOpenUrlWithCreateWidget"));
QVERIFY(mOpenUrlWithCreateWidget);
auto buttonBox = dlg.findChild<QDialogButtonBox *>(QStringLiteral("buttonBox"));
QVERIFY(buttonBox);
QCOMPARE(buttonBox->standardButtons(), {QDialogButtonBox::Ok | QDialogButtonBox::Cancel});
}
......@@ -16,7 +16,7 @@ OpenUrlWithConfigureCreateDialog::OpenUrlWithConfigureCreateDialog(QWidget *pare
auto mainLayout = new QVBoxLayout(this);
mainLayout->setObjectName(QStringLiteral("mainlayout"));
mOpenUrlWithCreateWidget->setObjectName(QStringLiteral("mOpenUrlWithWidget"));
mOpenUrlWithCreateWidget->setObjectName(QStringLiteral("mOpenUrlWithCreateWidget"));
mainLayout->addWidget(mOpenUrlWithCreateWidget);
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment