File indexing completed on 2025-01-19 04:56:43

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: Project destruction
0014 //   As someone collecting tasks
0015 //   I can delete a project
0016 //   In order to clean my tasks
0017 class ProjectRemoveFeature : public QObject
0018 {
0019     Q_OBJECT
0020 private slots:
0021     void Removing_a_simple_project_from_the_list()
0022     {
0023         ZanshinContext c;
0024         Given(c.I_display_the_available_pages());
0025         When(c.I_remove_a_page("Projects / TestData » Calendar1", "Prepare talk about TDD"));
0026         And(c.I_list_the_items());
0027         Then(c.the_list_is({
0028                              { "display", "icon" },
0029                              {
0030                                  { "Inbox", "mail-folder-inbox" },
0031                                  { "Workday", "go-jump-today" },
0032                                  { "Projects", "folder" },
0033                                  { "Projects / TestData » Calendar1", "folder" },
0034                                  { "Projects / TestData » Calendar1 / Read List", "view-pim-tasks" },
0035                                  { "Projects / TestData » Calendar1 » Calendar2", "folder" },
0036                                  { "Projects / TestData » Calendar1 » Calendar2 / Backlog", "view-pim-tasks" },
0037                                  { "Contexts", "folder" },
0038                                  { "Contexts / Errands", "view-pim-notes" },
0039                                  { "Contexts / Online", "view-pim-notes" },
0040                                  { "All Tasks", "view-pim-tasks" },
0041                              }
0042                          }));
0043     }
0044 };
0045 
0046 ZANSHIN_TEST_MAIN(ProjectRemoveFeature)
0047 
0048 #include "projectremovefeature.moc"