/*
 * SPDX-FileCopyrightText: 2026 Laurent Montel <montel@kde.org>
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 */

#include "configuregeneralwidgettest.hpp"
#include "dialog/general/autosavewidget.hpp"
#include "dialog/general/configuregeneralwidget.hpp"
#include <QStandardPaths>
#include <QTest>
#include <QVBoxLayout>

QTEST_MAIN(ConfigureGeneralWidgetTest)
using namespace Qt::Literals::StringLiterals;
ConfigureGeneralWidgetTest::ConfigureGeneralWidgetTest(QObject *parent)
    : QObject{parent}
{
    QStandardPaths::setTestModeEnabled(true);
}

void ConfigureGeneralWidgetTest::shouldHaveDefaultValues()
{
    const ConfigureGeneralWidget w;

    auto mainLayout = w.findChild<QVBoxLayout *>(u"mainLayout"_s);
    QVERIFY(mainLayout);

    auto m_autoSaveWidget = w.findChild<AutoSaveWidget *>(u"m_autoSaveWidget"_s);
    QVERIFY(m_autoSaveWidget);
}

#include "moc_configuregeneralwidgettest.cpp"
