Commit 32d679a1 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add autotests

parent 0008538c
......@@ -11,4 +11,5 @@ add_messagelist_widget_unittest(quicksearchwarningtest.cpp)
add_messagelist_widget_unittest(searchlinestatustest.cpp)
add_messagelist_widget_unittest(searchcollectionindexingwarningtest.cpp)
add_messagelist_widget_unittest(tablockedwarningtest.cpp)
add_messagelist_widget_unittest(configurefilterswidgettest.cpp)
/*
SPDX-FileCopyrightText: 2021 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "configurefilterswidgettest.h"
#include "core/widgets/configurefilterswidget.h"
#include <QListWidget>
#include <QTest>
#include <QVBoxLayout>
QTEST_MAIN(ConfigureFiltersWidgetTest)
ConfigureFiltersWidgetTest::ConfigureFiltersWidgetTest(QObject *parent)
: QObject(parent)
{
}
void ConfigureFiltersWidgetTest::shouldHaveDefaultValues()
{
MessageList::Core::ConfigureFiltersWidget w;
auto mainLayout = w.findChild<QVBoxLayout *>(QStringLiteral("mainLayout"));
QVERIFY(mainLayout);
auto mListFiltersWidget = w.findChild<QListWidget *>(QStringLiteral("mListFiltersWidget"));
QVERIFY(mListFiltersWidget);
}
/*
SPDX-FileCopyrightText: 2021 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#pragma once
#include <QObject>
class ConfigureFiltersWidgetTest : public QObject
{
Q_OBJECT
public:
explicit ConfigureFiltersWidgetTest(QObject *parent = nullptr);
~ConfigureFiltersWidgetTest() override = default;
private Q_SLOTS:
void shouldHaveDefaultValues();
};
Markdown is supported
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