File indexing completed on 2024-12-22 04:45:58

0001 /*
0002    SPDX-FileCopyrightText: 2021-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #include "accountsoverviewwidgettest.h"
0008 #include "misc/accountsoverviewwidget.h"
0009 #include <QHBoxLayout>
0010 #include <QTabBar>
0011 #include <QTest>
0012 QTEST_MAIN(AccountsOverviewWidgetTest)
0013 AccountsOverviewWidgetTest::AccountsOverviewWidgetTest(QObject *parent)
0014     : QObject(parent)
0015 {
0016 }
0017 
0018 void AccountsOverviewWidgetTest::shouldHaveDefaultValues()
0019 {
0020     AccountsOverviewWidget w;
0021     auto mTabBar = w.findChild<QTabBar *>(QStringLiteral("mTabBar"));
0022     QVERIFY(mTabBar);
0023     QCOMPARE(mTabBar->shape(), QTabBar::RoundedSouth);
0024 
0025     auto mainLayout = w.findChild<QHBoxLayout *>(QStringLiteral("mainLayout"));
0026     QVERIFY(mainLayout);
0027     QCOMPARE(mainLayout->contentsMargins(), QMargins{});
0028 }
0029 
0030 #include "moc_accountsoverviewwidgettest.cpp"