summaryrefslogtreecommitdiff
path: root/features/project
diff options
context:
space:
mode:
authorVinnie Okada <vokada@mrvinn.com>2014-10-15 02:21:21 -0500
committerVinnie Okada <vokada@mrvinn.com>2014-10-15 23:52:33 -0500
commit5700842ba8ca2f3100395a9fb98c759e78e63d96 (patch)
tree5014cffa098acd7f864159cdf2db1edcf1b21dd6 /features/project
parenta0a826ebdcb783c660dd40d8cb217db28a9d4998 (diff)
downloadgitlab-ce-5700842ba8ca2f3100395a9fb98c759e78e63d96.tar.gz
Add Markdown preview to more forms
Enable Markdown previews when creating and editing issues, merge requests, and milestones, and when editing notes.
Diffstat (limited to 'features/project')
-rw-r--r--features/project/issues/issues.feature27
-rw-r--r--features/project/merge_requests.feature31
2 files changed, 58 insertions, 0 deletions
diff --git a/features/project/issues/issues.feature b/features/project/issues/issues.feature
index 4db8551559b..e7fbe2bd6f1 100644
--- a/features/project/issues/issues.feature
+++ b/features/project/issues/issues.feature
@@ -159,3 +159,30 @@ Feature: Project Issues
Given project "Shop" has "Tasks-closed" closed issue with task markdown
When I visit issue page "Tasks-closed"
Then Task checkboxes should be disabled
+
+ # Issue description preview
+
+ @javascript
+ Scenario: I can't preview without text
+ Given I click link "New Issue"
+ And I haven't written any description text
+ Then I should not see the Markdown preview button
+
+ @javascript
+ Scenario: I can preview with text
+ Given I click link "New Issue"
+ And I write a description like "Nice"
+ Then I should see the Markdown preview button
+
+ @javascript
+ Scenario: I preview an issue description
+ Given I click link "New Issue"
+ And I preview a description text like "Bug fixed :smile:"
+ Then I should see the Markdown preview
+ And I should not see the Markdown text field
+
+ @javascript
+ Scenario: I can edit after preview
+ Given I click link "New Issue"
+ And I preview a description text like "Bug fixed :smile:"
+ Then I should see the Markdown edit button
diff --git a/features/project/merge_requests.feature b/features/project/merge_requests.feature
index d20358a7dc6..f1adf0bd34d 100644
--- a/features/project/merge_requests.feature
+++ b/features/project/merge_requests.feature
@@ -187,3 +187,34 @@ Feature: Project Merge Requests
And I visit merge request page "MR-task-open"
And I click link "Close"
Then Task checkboxes should be disabled
+
+ # Description preview
+
+ @javascript
+ Scenario: I can't preview without text
+ Given I visit merge request page "Bug NS-04"
+ And I click link "Edit"
+ And I haven't written any description text
+ Then I should not see the Markdown preview button
+
+ @javascript
+ Scenario: I can preview with text
+ Given I visit merge request page "Bug NS-04"
+ And I click link "Edit"
+ And I write a description like "Nice"
+ Then I should see the Markdown preview button
+
+ @javascript
+ Scenario: I preview a merge request description
+ Given I visit merge request page "Bug NS-04"
+ And I click link "Edit"
+ And I preview a description text like "Bug fixed :smile:"
+ Then I should see the Markdown preview
+ And I should not see the Markdown text field
+
+ @javascript
+ Scenario: I can edit after preview
+ Given I visit merge request page "Bug NS-04"
+ And I click link "Edit"
+ And I preview a description text like "Bug fixed :smile:"
+ Then I should see the Markdown edit button