Changeset View
Changeset View
Standalone View
Standalone View
tests/featurelib/zanshincontext.h
Show All 22 Lines | |||||
23 | 23 | | |||
24 | #include <QObject> | 24 | #include <QObject> | ||
25 | #include <QPersistentModelIndex> | 25 | #include <QPersistentModelIndex> | ||
26 | #include <QSharedPointer> | 26 | #include <QSharedPointer> | ||
27 | #include <QPointer> | 27 | #include <QPointer> | ||
28 | #include <QVector> | 28 | #include <QVector> | ||
29 | 29 | | |||
30 | #include "domain/task.h" | 30 | #include "domain/task.h" | ||
31 | #include "domain/datasource.h" | ||||
31 | #include "presentation/errorhandler.h" | 32 | #include "presentation/errorhandler.h" | ||
32 | 33 | | |||
33 | #include "testlib/akonadifakedata.h" | 34 | #include "testlib/akonadifakedata.h" | ||
34 | #include "testlib/fakejob.h" | 35 | #include "testlib/fakejob.h" | ||
35 | 36 | | |||
36 | class QAbstractItemModel; | 37 | class QAbstractItemModel; | ||
37 | class QSortFilterProxyModel; | 38 | class QSortFilterProxyModel; | ||
38 | class MonitorSpy; | 39 | class MonitorSpy; | ||
Show All 31 Lines | 55 | public: | |||
70 | 71 | | |||
71 | // WHEN | 72 | // WHEN | ||
72 | Q_REQUIRED_RESULT bool I_look_at_the_central_list(); | 73 | Q_REQUIRED_RESULT bool I_look_at_the_central_list(); | ||
73 | Q_REQUIRED_RESULT bool I_check_the_item(); | 74 | Q_REQUIRED_RESULT bool I_check_the_item(); | ||
74 | Q_REQUIRED_RESULT bool I_uncheck_the_item(); | 75 | Q_REQUIRED_RESULT bool I_uncheck_the_item(); | ||
75 | Q_REQUIRED_RESULT bool I_remove_the_item(); | 76 | Q_REQUIRED_RESULT bool I_remove_the_item(); | ||
76 | Q_REQUIRED_RESULT bool I_promote_the_item(); | 77 | Q_REQUIRED_RESULT bool I_promote_the_item(); | ||
77 | Q_REQUIRED_RESULT bool I_add_a_project(const QString &projectName, const QString &parentSourceName); | 78 | Q_REQUIRED_RESULT bool I_add_a_project(const QString &projectName, const QString &parentSourceName); | ||
78 | Q_REQUIRED_RESULT bool I_add_a_context(const QString &contextName); | 79 | Q_REQUIRED_RESULT bool I_add_a_context(const QString &contextName, const QString &parentSourceName); | ||
79 | Q_REQUIRED_RESULT bool I_add_a_task(const QString &taskName); | 80 | Q_REQUIRED_RESULT bool I_add_a_task(const QString &taskName); | ||
80 | Q_REQUIRED_RESULT bool I_rename_a_page(const QString &path, const QString &oldName, const QString &newName); | 81 | Q_REQUIRED_RESULT bool I_rename_a_page(const QString &path, const QString &oldName, const QString &newName); | ||
81 | Q_REQUIRED_RESULT bool I_remove_a_page(const QString &path, const QString &pageName); | 82 | Q_REQUIRED_RESULT bool I_remove_a_page(const QString &path, const QString &pageName); | ||
82 | Q_REQUIRED_RESULT bool I_add_a_task_child(const QString &childName, const QString &parentName); | 83 | Q_REQUIRED_RESULT bool I_add_a_task_child(const QString &childName, const QString &parentName); | ||
83 | Q_REQUIRED_RESULT bool I_list_the_items(); | 84 | Q_REQUIRED_RESULT bool I_list_the_items(); | ||
84 | Q_REQUIRED_RESULT bool I_open_the_item_in_the_editor(); | 85 | Q_REQUIRED_RESULT bool I_open_the_item_in_the_editor(); | ||
85 | Q_REQUIRED_RESULT bool I_mark_the_item_done_in_the_editor(); | 86 | Q_REQUIRED_RESULT bool I_mark_the_item_done_in_the_editor(); | ||
86 | Q_REQUIRED_RESULT bool I_change_the_editor_field(const QString &field, const QVariant &value); | 87 | Q_REQUIRED_RESULT bool I_change_the_editor_field(const QString &field, const QVariant &value); | ||
Show All 18 Lines | |||||
105 | Q_REQUIRED_RESULT bool the_setting_is(const QString &key, qint64 expectedId); | 106 | Q_REQUIRED_RESULT bool the_setting_is(const QString &key, qint64 expectedId); | ||
106 | 107 | | |||
107 | private: | 108 | private: | ||
108 | void setModel(QAbstractItemModel *model); | 109 | void setModel(QAbstractItemModel *model); | ||
109 | QAbstractItemModel *sourceModel() const; | 110 | QAbstractItemModel *sourceModel() const; | ||
110 | QAbstractItemModel *model() const; | 111 | QAbstractItemModel *model() const; | ||
111 | 112 | | |||
112 | Domain::Task::Ptr currentTask() const; | 113 | Domain::Task::Ptr currentTask() const; | ||
114 | Domain::DataSource::Ptr dataSourceFromName(const QString &sourceName); | ||||
113 | 115 | | |||
114 | void waitForEmptyJobQueue(); | 116 | void waitForEmptyJobQueue(); | ||
115 | void waitForStableState(); | 117 | void waitForStableState(); | ||
116 | 118 | | |||
117 | void collectIndicesImpl(const QModelIndex &root = QModelIndex()); | 119 | void collectIndicesImpl(const QModelIndex &root = QModelIndex()); | ||
118 | void collectIndices(); | 120 | void collectIndices(); | ||
119 | 121 | | |||
120 | QSharedPointer<QObject> m_appModel; | 122 | QSharedPointer<QObject> m_appModel; | ||
Show All 15 Lines |