Commit 9d3046bd authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add new autotests

parent 503ff5e6
......@@ -8,3 +8,4 @@ endmacro ()
add_kmail_historyswitchfolder_unittest(collectionswitchertreeviewtest.cpp)
add_kmail_historyswitchfolder_unittest(collectionswitchertreeviewmanagertest.cpp)
/*
This file is part of KMail, the KDE mail client.
SPDX-FileCopyrightText: 2021 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: GPL-2.0-only
*/
#include "collectionswitchertreeviewmanagertest.h"
#include "historyswitchfolder/collectionswitchertreeviewmanager.h"
#include <QTest>
QTEST_MAIN(CollectionSwitcherTreeViewManagerTest)
CollectionSwitcherTreeViewManagerTest::CollectionSwitcherTreeViewManagerTest(QObject *parent)
: QObject{parent}
{
}
void CollectionSwitcherTreeViewManagerTest::shouldHaveDefaultValues()
{
CollectionSwitcherTreeViewManager m;
QVERIFY(!m.parentWidget());
}
/*
This file is part of KMail, the KDE mail client.
SPDX-FileCopyrightText: 2021 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: GPL-2.0-only
*/
#pragma once
#include <QObject>
class CollectionSwitcherTreeViewManagerTest : public QObject
{
Q_OBJECT
public:
explicit CollectionSwitcherTreeViewManagerTest(QObject *parent = nullptr);
~CollectionSwitcherTreeViewManagerTest() override = default;
private Q_SLOTS:
void shouldHaveDefaultValues();
};
......@@ -6,13 +6,15 @@ SPDX-License-Identifier: GPL-2.0-only
*/
#pragma once
#include "kmail_private_export.h"
#include <Akonadi/Collection>
#include <QList>
#include <QObject>
class CollectionSwitcherTreeView;
class CollectionSwitcherModel;
class QAction;
class CollectionSwitcherTreeViewManager : public QObject
class KMAILTESTS_TESTS_EXPORT CollectionSwitcherTreeViewManager : public QObject
{
Q_OBJECT
public:
......@@ -28,7 +30,7 @@ public:
void selectBackward();
void updateViewGeometry();
void addHistory(const Akonadi::Collection &currentCol, const QString &fullPath = {});
void addHistory(const Akonadi::Collection &currentCol, const QString &fullPath);
Q_SIGNALS:
void switchToFolder(const Akonadi::Collection &col);
......
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