From 5700842ba8ca2f3100395a9fb98c759e78e63d96 Mon Sep 17 00:00:00 2001 From: Vinnie Okada Date: Wed, 15 Oct 2014 02:21:21 -0500 Subject: Add Markdown preview to more forms Enable Markdown previews when creating and editing issues, merge requests, and milestones, and when editing notes. --- features/project/issues/issues.feature | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'features/project/issues/issues.feature') 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 -- cgit v1.2.1 From e06f0ead9843df2688ca2f341a3b37d4d56a955d Mon Sep 17 00:00:00 2001 From: Vinnie Okada Date: Thu, 16 Oct 2014 23:36:52 -0500 Subject: Fix Markdown preview tests Update Spinach tests for Markdown previews for the new-ish tab UI that replaced the old preview/edit toggle button. --- features/project/issues/issues.feature | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'features/project/issues/issues.feature') diff --git a/features/project/issues/issues.feature b/features/project/issues/issues.feature index e7fbe2bd6f1..9970be0c596 100644 --- a/features/project/issues/issues.feature +++ b/features/project/issues/issues.feature @@ -166,13 +166,13 @@ Feature: Project Issues 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 + Then The Markdown preview tab should say there is nothing to do @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 + And I write a description like ":+1: Nice" + Then The Markdown preview tab should display rendered Markdown @javascript Scenario: I preview an issue description @@ -185,4 +185,4 @@ Feature: Project Issues 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 + Then I should see the Markdown write tab -- cgit v1.2.1 From de53bc9d8470d94ec1b956cc2ea1df077c4d034d Mon Sep 17 00:00:00 2001 From: Vinnie Okada Date: Thu, 16 Oct 2014 23:38:08 -0500 Subject: Add new Markdown preview test Add a test to make sure that Markdown previews are available when editing an existing issue. --- features/project/issues/issues.feature | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'features/project/issues/issues.feature') diff --git a/features/project/issues/issues.feature b/features/project/issues/issues.feature index 9970be0c596..28ea44530fe 100644 --- a/features/project/issues/issues.feature +++ b/features/project/issues/issues.feature @@ -186,3 +186,10 @@ Feature: Project Issues Given I click link "New Issue" And I preview a description text like "Bug fixed :smile:" Then I should see the Markdown write tab + + @javascript + Scenario: I can preview when editing an existing issue + Given I click link "Release 0.4" + And I click link "Edit" for the issue + And I preview a description text like "Bug fixed :smile:" + Then I should see the Markdown write tab -- cgit v1.2.1