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: Postponing a task
0014 //   As someone using tasks
0015 //   I can change the start or due date of a task
0016 //   In order to procrastinate
0017 class WorkdayPostponingFeature : public QObject
0018 {
0019     Q_OBJECT
0020 private slots:
0021     void Setting_a_date_s_start_date_to_a_date_in_the_future_makes_it_disappear_in_the_Workday_page()
0022     {
0023         ZanshinContext c;
0024         Given(c.I_display_the_page("Workday"));
0025         And(c.there_is_an_item_in_the_central_list("Errands"));
0026         When(c.I_open_the_item_in_the_editor());
0027         And(c.I_change_the_editor_field("start date", "2015-03-20"));
0028         And(c.I_look_at_the_central_list());
0029         And(c.I_list_the_items());
0030         Then(c.the_list_does_not_contain("Errands"));
0031     }
0032 
0033     void Setting_a_date_s_due_date_to_a_date_in_the_future_makes_it_disappear_in_the_Workday_page()
0034     {
0035         ZanshinContext c;
0036         Given(c.I_display_the_page("Workday"));
0037         And(c.there_is_an_item_in_the_central_list("Buy kiwis"));
0038         When(c.I_open_the_item_in_the_editor());
0039         And(c.I_change_the_editor_field("due date", "2015-03-20"));
0040         And(c.I_look_at_the_central_list());
0041         And(c.I_list_the_items());
0042         Then(c.the_list_does_not_contain("Buy kiwis"));
0043     }
0044 };
0045 
0046 ZANSHIN_TEST_MAIN(WorkdayPostponingFeature)
0047 
0048 #include "workdaypostponingfeature.moc"