File indexing completed on 2025-03-09 04:56:51

0001 /*
0002  * SPDX-FileCopyrightText: 2019 Kevin Ottens <ervin@kde.org>
0003    SPDX-FileCopyrightText: 2019 David Faure <faure@kde.org>
0004  * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005  */
0006 
0007 
0008 #include <testlib/qtest_zanshin.h>
0009 #include <featurelib/zanshincontext.h>
0010 
0011 using namespace Testlib;
0012 
0013 // Feature: Data sources listing
0014 //   As an advanced user
0015 //   I can list sources
0016 //   In order to list and store tasks
0017 class DatasourceListingFeature : public QObject
0018 {
0019     Q_OBJECT
0020 private slots:
0021     void All_task_sources_appear_in_the_list()
0022     {
0023         ZanshinContext c;
0024         Given(c.I_display_the_available_data_sources());
0025         When(c.I_list_the_items());
0026         Then(c.the_list_is({
0027                              { "display", "icon" },
0028                              {
0029                                  { "TestData", "folder" },
0030                                  { "TestData / Calendar1", "view-calendar-tasks" },
0031                                  { "TestData / Calendar1 / Calendar2", "view-calendar-tasks" },
0032                                  { "TestData / Calendar1 / Calendar2 / Calendar3", "folder" },
0033                              }
0034                          }));
0035     }
0036 };
0037 
0038 ZANSHIN_TEST_MAIN(DatasourceListingFeature)
0039 
0040 #include "datasourcelistingfeature.moc"