Changeset View
Changeset View
Standalone View
Standalone View
tests/features/inbox/inboxdisplayfeature.cpp
- This file was added.
1 | /* This file is part of Zanshin | ||||
---|---|---|---|---|---|
2 | | ||||
3 | Copyright 2019 Kevin Ottens <ervin@kde.org> | ||||
4 | | ||||
5 | This program is free software; you can redistribute it and/or | ||||
6 | modify it under the terms of the GNU General Public License as | ||||
7 | published by the Free Software Foundation; either version 2 of | ||||
8 | the License or (at your option) version 3 or any later version | ||||
9 | accepted by the membership of KDE e.V. (or its successor approved | ||||
10 | by the membership of KDE e.V.), which shall act as a proxy | ||||
11 | defined in Section 14 of version 3 of the license. | ||||
12 | | ||||
13 | This program is distributed in the hope that it will be useful, | ||||
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
16 | GNU General Public License for more details. | ||||
17 | | ||||
18 | You should have received a copy of the GNU General Public License | ||||
19 | along with this program; if not, write to the Free Software | ||||
20 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, | ||||
21 | USA. | ||||
22 | */ | ||||
23 | | ||||
24 | #include <testlib/qtest_zanshin.h> | ||||
25 | #include <featurelib/zanshincontext.h> | ||||
26 | | ||||
27 | using namespace Testlib; | ||||
28 | | ||||
29 | // Feature: Inbox content | ||||
30 | // As someone collecting tasks | ||||
31 | // I can display the Inbox | ||||
32 | // In order to see the tasks which need to be organized (e.g. any task not associated to any project or context) | ||||
33 | class InboxDisplayFeature : public QObject | ||||
34 | { | ||||
35 | Q_OBJECT | ||||
36 | private slots: | ||||
37 | void Unorganized_tasks_appear_in_the_inbox() | ||||
38 | { | ||||
39 | ZANSHIN_CONTEXT; | ||||
40 | Given(I_display_the_page("Inbox")); | ||||
41 | And(I_look_at_the_central_list()); | ||||
42 | When(I_list_the_items()); | ||||
43 | Then(the_list_is({ | ||||
44 | { "display" }, | ||||
45 | { | ||||
46 | { "Errands" }, | ||||
47 | { "\"Capital in the Twenty-First Century\" by Thomas Piketty" }, | ||||
48 | { "\"The Pragmatic Programmer\" by Hunt and Thomas" }, | ||||
49 | { "Buy cheese" }, | ||||
50 | { "Buy kiwis" }, | ||||
51 | { "Buy apples" }, | ||||
52 | { "Buy pears" }, | ||||
53 | { "Buy rutabagas" } | ||||
54 | } | ||||
55 | })); | ||||
56 | } | ||||
57 | }; | ||||
58 | | ||||
59 | ZANSHIN_TEST_MAIN(InboxDisplayFeature) | ||||
60 | | ||||
61 | #include "inboxdisplayfeature.moc" |