diff --git a/tests/features/cuke-steps.cpp b/tests/features/cuke-steps.cpp --- a/tests/features/cuke-steps.cpp +++ b/tests/features/cuke-steps.cpp @@ -431,6 +431,12 @@ context->waitForStableState(); } +WHEN("^I promote the item$") { + ScenarioScope context; + VERIFY(QMetaObject::invokeMethod(context->presentation, "promoteItem", Q_ARG(QModelIndex, context->index))); + context->waitForStableState(); +} + WHEN("^I add a project named \"(.*)\" in the source named \"(.*)\"$") { REGEX_PARAM(QString, projectName); REGEX_PARAM(QString, sourceName); diff --git a/tests/features/zanshin/features/projects/project-task-promote.feature b/tests/features/zanshin/features/projects/project-task-promote.feature new file mode 100644 --- /dev/null +++ b/tests/features/zanshin/features/projects/project-task-promote.feature @@ -0,0 +1,27 @@ +Feature: Task promotion +As someone collecting tasks +I can promote a task into a project +In order to organize my tasks + + Scenario: Task promoted into a project appears in the list + Given I display the "Projects / Party" page + And I add a "task" named "Design a present" + And I look at the central list + And there is an item named "Design a present" in the central list + When I promote the item + And I display the available pages + And I list the items + Then the list is: + | display | icon | + | Inbox | mail-folder-inbox | + | Workday | go-jump-today | + | Projects | folder | + | Projects / Backlog | view-pim-tasks | + | Projects / Design a present | view-pim-tasks | + | Projects / Party | view-pim-tasks | + | Projects / Read List | view-pim-tasks | + | Contexts | folder | + | Contexts / Chores | view-pim-tasks | + | Contexts / Internet | view-pim-tasks | + | Contexts / Online | view-pim-tasks | +