summaryrefslogtreecommitdiff
path: root/features/project
diff options
context:
space:
mode:
authorVinnie Okada <vokada@mrvinn.com>2014-10-06 01:59:03 -0500
committerVinnie Okada <vokada@mrvinn.com>2014-10-06 02:07:03 -0500
commit31bc42de57b3cfd7bf068df06d15372307b8661b (patch)
treeab39133233b504da60674a61c3b25a1a80b0a753 /features/project
parent3a3b2eb33e2ca41153a960b89ae7796b43aa93e8 (diff)
downloadgitlab-ce-31bc42de57b3cfd7bf068df06d15372307b8661b.tar.gz
Add Spinach tests for task lists
Diffstat (limited to 'features/project')
-rw-r--r--features/project/issues/issues.feature33
-rw-r--r--features/project/merge_requests.feature33
2 files changed, 66 insertions, 0 deletions
diff --git a/features/project/issues/issues.feature b/features/project/issues/issues.feature
index ae6a03ce865..e989569ccd4 100644
--- a/features/project/issues/issues.feature
+++ b/features/project/issues/issues.feature
@@ -126,3 +126,36 @@ Feature: Project Issues
When I click label 'bug'
And I should see "Release 0.4" in issues
And I should not see "Tweet control" in issues
+
+ Scenario: Issue description should render task checkboxes
+ Given project "Shop" has "Tasks-open" open issue with task markdown
+ When I visit issue page "Tasks-open"
+ Then I should see task checkboxes in the description
+
+ @javascript
+ Scenario: Issue notes should not render task checkboxes
+ Given project "Shop" has "Tasks-open" open issue with task markdown
+ When I visit issue page "Tasks-open"
+ And I leave a comment with task markdown
+ Then I should not see task checkboxes in the comment
+
+ # Task status in issues list
+
+ Scenario: Issues list should display task status
+ Given project "Shop" has "Tasks-open" open issue with task markdown
+ When I visit project "Shop" issues page
+ Then I should see the task status for issue "Tasks-open"
+
+ # Toggling task items
+
+ @javascript
+ Scenario: Task checkboxes should be enabled for an open issue
+ Given project "Shop" has "Tasks-open" open issue with task markdown
+ When I visit issue page "Tasks-open"
+ Then Task checkboxes should be enabled
+
+ @javascript
+ Scenario: Task checkboxes should be disabled for a closed issue
+ Given project "Shop" has "Tasks-closed" closed issue with task markdown
+ When I visit issue page "Tasks-closed"
+ Then Task checkboxes should be disabled
diff --git a/features/project/merge_requests.feature b/features/project/merge_requests.feature
index f8dccc15c0e..bad83191371 100644
--- a/features/project/merge_requests.feature
+++ b/features/project/merge_requests.feature
@@ -96,6 +96,16 @@ Feature: Project Merge Requests
And I leave a comment with a header containing "Comment with a header"
Then The comment with the header should not have an ID
+ Scenario: Merge request description should render task checkboxes
+ Given project "Shop" has "MR-task-open" open MR with task markdown
+ When I visit merge request page "MR-task-open"
+ Then I should see task checkboxes in the description
+
+ Scenario: Merge request notes should not render task checkboxes
+ Given project "Shop" has "MR-task-open" open MR with task markdown
+ When I visit merge request page "MR-task-open"
+ Then I should not see task checkboxes in the comment
+
# Toggling inline comments
@javascript
@@ -157,3 +167,26 @@ Feature: Project Merge Requests
And I leave a comment like "Line is wrong" on line 39 of the second file
And I click Side-by-side Diff tab
Then I should see comments on the side-by-side diff page
+
+ # Task status in issues list
+
+ @now
+ Scenario: Merge requests list should display task status
+ Given project "Shop" has "MR-task-open" open MR with task markdown
+ When I visit project "Shop" merge requests page
+ Then I should see the task status for merge request "MR-task-open"
+
+ # Toggling task items
+
+ @javascript
+ Scenario: Task checkboxes should be enabled for an open merge request
+ Given project "Shop" has "MR-task-open" open MR with task markdown
+ When I visit merge request page "MR-task-open"
+ Then Task checkboxes should be enabled
+
+ @javascript
+ Scenario: Task checkboxes should be disabled for a closed merge request
+ Given project "Shop" has "MR-task-open" open MR with task markdown
+ And I visit merge request page "MR-task-open"
+ And I click link "Close"
+ Then Task checkboxes should be disabled