File indexing completed on 2025-01-05 04:49:29

0001 /*
0002    SPDX-FileCopyrightText: 2016-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #include "zoomtextplugineditorinterfacetest.h"
0008 #include "../zoomtextplugineditorinterface.h"
0009 #include <KActionCollection>
0010 #include <QTest>
0011 
0012 ZoomTextPluginEditorInterfaceTest::ZoomTextPluginEditorInterfaceTest(QObject *parent)
0013     : QObject(parent)
0014 {
0015 }
0016 
0017 ZoomTextPluginEditorInterfaceTest::~ZoomTextPluginEditorInterfaceTest() = default;
0018 
0019 void ZoomTextPluginEditorInterfaceTest::shouldHaveDefaultValue()
0020 {
0021     ZoomTextPluginEditorInterface interface(nullptr);
0022     auto ac = new KActionCollection(this);
0023     interface.createAction(ac);
0024     MessageComposer::PluginActionType type = interface.actionType();
0025     QVERIFY(type.action());
0026     QCOMPARE(type.type(), MessageComposer::PluginActionType::View);
0027     QVERIFY(ac->action(QStringLiteral("zoom_menu")));
0028     QVERIFY(ac->action(QStringLiteral("zoom_in")));
0029     QVERIFY(ac->action(QStringLiteral("zoom_out")));
0030     QVERIFY(ac->action(QStringLiteral("zoom_reset")));
0031 }
0032 
0033 QTEST_MAIN(ZoomTextPluginEditorInterfaceTest)
0034 
0035 #include "moc_zoomtextplugineditorinterfacetest.cpp"