/*
  SPDX-FileCopyrightText: 2025-2026 Laurent Montel <montel@kde.org>

  SPDX-License-Identifier: GPL-2.0-or-later
*/

#include "textautogeneratedialogtest.h"
using namespace Qt::Literals::StringLiterals;

#include "widgets/textautogeneratedialog.h"
#include "widgets/textautogeneratewidget.h"
#include <QDialogButtonBox>
#include <QStandardPaths>
#include <QTest>
#include <QVBoxLayout>
QTEST_MAIN(TextAutoGenerateDialogTest)

TextAutoGenerateDialogTest::TextAutoGenerateDialogTest(QObject *parent)
    : QObject{parent}
{
    QStandardPaths::setTestModeEnabled(true);
}

void TextAutoGenerateDialogTest::shouldHaveDefaultValues()
{
    TextAutoGenerateText::TextAutoGenerateDialog d;
    auto mainLayout = d.findChild<QVBoxLayout *>(u"mainLayout"_s);
    QVERIFY(mainLayout);

    auto mTextAutoGenerateWidget = d.findChild<TextAutoGenerateText::TextAutoGenerateWidget *>(u"mTextAutoGenerateWidget"_s);
    QVERIFY(mTextAutoGenerateWidget);

    auto button = d.findChild<QDialogButtonBox *>(u"button"_s);
    QVERIFY(button);
}

#include "moc_textautogeneratedialogtest.cpp"
