summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--features/project/commits/comments.feature5
-rw-r--r--features/project/commits/diff_comments.feature6
-rw-r--r--features/steps/shared/diff_note.rb4
-rw-r--r--features/steps/shared/note.rb2
4 files changed, 3 insertions, 14 deletions
diff --git a/features/project/commits/comments.feature b/features/project/commits/comments.feature
index a45245917e3..afcf0fdbb07 100644
--- a/features/project/commits/comments.feature
+++ b/features/project/commits/comments.feature
@@ -14,11 +14,6 @@ Feature: Project Commits Comments
Then I should not see the cancel comment button
@javascript
- Scenario: I can't preview without text
- Given I haven't written any comment text
- Then The comment preview tab should say there is nothing to do
-
- @javascript
Scenario: I can preview with text
Given I write a comment like ":+1: Nice"
Then The comment preview tab should be display rendered Markdown
diff --git a/features/project/commits/diff_comments.feature b/features/project/commits/diff_comments.feature
index 9c4cc723d1b..56b9a13678d 100644
--- a/features/project/commits/diff_comments.feature
+++ b/features/project/commits/diff_comments.feature
@@ -55,12 +55,6 @@ Feature: Project Commits Diff Comments
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 The diff comment preview tab should say there is nothing to do
-
- @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"
diff --git a/features/steps/shared/diff_note.rb b/features/steps/shared/diff_note.rb
index 28964d54a8f..510e0f0f938 100644
--- a/features/steps/shared/diff_note.rb
+++ b/features/steps/shared/diff_note.rb
@@ -80,7 +80,7 @@ module SharedDiffNote
step 'I should not see the diff comment text field' do
within(diff_file_selector) do
- page.should have_css(".js-note-text", visible: false)
+ expect(find('.js-note-text')).not_to be_visible
end
end
@@ -115,7 +115,7 @@ module SharedDiffNote
end
step 'I should see add a diff comment button' do
- page.should have_css(".js-add-diff-note-button", visible: false)
+ page.should have_css('.js-add-diff-note-button', visible: true)
end
step 'I should see an empty diff comment form' do
diff --git a/features/steps/shared/note.rb b/features/steps/shared/note.rb
index 17adec3eda1..625bcc0b266 100644
--- a/features/steps/shared/note.rb
+++ b/features/steps/shared/note.rb
@@ -64,7 +64,7 @@ module SharedNote
step 'I should not see the comment text field' do
within(".js-main-target-form") do
- page.should have_css(".js-note-text", visible: false)
+ expect(find('.js-note-text')).not_to be_visible
end
end