summaryrefslogtreecommitdiff
path: root/features/project/commits
diff options
context:
space:
mode:
authorRiyad Preukschas <riyad@informatik.uni-bremen.de>2013-01-15 00:11:35 +0100
committerRiyad Preukschas <riyad@informatik.uni-bremen.de>2013-01-15 00:52:57 +0100
commitd28176b132bdc74055f31e2d62665d5d74ebacb4 (patch)
tree4bc9c8e3778d51020da0e8bb318aa7c3830ee67d /features/project/commits
parentf8e1f4a7c9ee2554efcf7376a0cfbefae8956d7b (diff)
downloadgitlab-ce-d28176b132bdc74055f31e2d62665d5d74ebacb4.tar.gz
Replace commit diff note request specs with spinach features
Diffstat (limited to 'features/project/commits')
-rw-r--r--features/project/commits/commit_diff_comments.feature91
1 files changed, 91 insertions, 0 deletions
diff --git a/features/project/commits/commit_diff_comments.feature b/features/project/commits/commit_diff_comments.feature
new file mode 100644
index 00000000000..4323e8ce596
--- /dev/null
+++ b/features/project/commits/commit_diff_comments.feature
@@ -0,0 +1,91 @@
+Feature: Comments on commit diffs
+ Background:
+ Given I sign in as a user
+ And I own project "Shop"
+ And I visit project commit page
+
+ @javascript
+ Scenario: I can access add diff comment buttons
+ Then I should see add a diff comment button
+
+ @javascript
+ Scenario: I can comment on a commit diff
+ Given I leave a diff comment like "Typo, please fix"
+ Then I should see a diff comment saying "Typo, please fix"
+
+ @javascript
+ Scenario: I get a temporary form for the first comment on a diff line
+ Given I open a diff comment form
+ Then I should see a temporary diff comment form
+
+ @javascript
+ Scenario: I have a cancel button on the diff form
+ Given I open a diff comment form
+ Then I should see the cancel comment button
+
+ @javascript
+ Scenario: I can cancel a diff form
+ Given I open a diff comment form
+ And I cancel the diff comment
+ Then I should not see the diff comment form
+
+ @javascript
+ Scenario: I can't open a second form for a diff line
+ Given I open a diff comment form
+ And I open a diff comment form
+ Then I should only see one diff form
+
+ @javascript
+ Scenario: I can have multiple forms
+ Given I open a diff comment form
+ And I write a diff comment like ":-1: I don't like this"
+ And I open another diff comment form
+ Then I should see a diff comment form with ":-1: I don't like this"
+ And I should see an empty diff comment form
+
+ @javascript
+ Scenario: I can preview multiple forms separately
+ Given I preview a diff comment text like "Should fix it :smile:"
+ And I preview another diff comment text like "DRY this up"
+ Then I should see two separate previews
+
+ @javascript
+ Scenario: I have a reply button in discussions
+ Given I leave a diff comment like "Typo, please fix"
+ Then I should see a discussion reply button
+
+ @javascript
+ Scenario: I can't preview without text
+ Given I open a diff comment form
+ And I haven't written any diff comment text
+ Then I should not see the diff comment preview button
+
+ @javascript
+ Scenario: I can preview with text
+ Given I open a diff comment form
+ And I write a diff comment like ":-1: I don't like this"
+ Then I should see the diff comment preview button
+
+ @javascript
+ Scenario: I preview a diff comment
+ Given I preview a diff comment text like "Should fix it :smile:"
+ Then I should see the diff comment preview
+ And I should not see the diff comment text field
+
+ @javascript
+ Scenario: I can edit after preview
+ Given I preview a diff comment text like "Should fix it :smile:"
+ Then I should see the diff comment edit button
+
+ @javascript
+ Scenario: The form gets removed after posting
+ Given I preview a diff comment text like "Should fix it :smile:"
+ And I submit the diff comment
+ Then I should not see the diff comment form
+ And I should see a discussion reply button
+
+ @javascript
+ Scenario: I can delete a discussion comment
+ Given I leave a diff comment like "Typo, please fix"
+ And I delete a diff comment
+ Then I should not see a diff comment saying "Typo, please fix"