File indexing completed on 2025-01-05 04:58:17
0001 /* 0002 SPDX-FileCopyrightText: 2015-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #include "collectionaclwidgettest.h" 0008 #include "../collectionaclwidget.h" 0009 #include <QListView> 0010 #include <QPushButton> 0011 #include <QTest> 0012 0013 CollectionAclWidgetTest::CollectionAclWidgetTest(QObject *parent) 0014 : QObject(parent) 0015 { 0016 } 0017 0018 CollectionAclWidgetTest::~CollectionAclWidgetTest() = default; 0019 0020 void CollectionAclWidgetTest::shouldHaveDefaultValue() 0021 { 0022 PimCommon::CollectionAclWidget w; 0023 QVERIFY(w.aclManager()); 0024 auto listView = w.findChild<QListView *>(QStringLiteral("list_view")); 0025 QVERIFY(listView); 0026 auto button = w.findChild<QPushButton *>(QStringLiteral("add")); 0027 QVERIFY(button); 0028 button = w.findChild<QPushButton *>(QStringLiteral("edit")); 0029 QVERIFY(button); 0030 button = w.findChild<QPushButton *>(QStringLiteral("delete")); 0031 QVERIFY(button); 0032 } 0033 0034 QTEST_MAIN(CollectionAclWidgetTest) 0035 0036 #include "moc_collectionaclwidgettest.cpp"