diff options
Diffstat (limited to 'spec/features/issues/user_comments_on_issue_spec.rb')
-rw-r--r-- | spec/features/issues/user_comments_on_issue_spec.rb | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/spec/features/issues/user_comments_on_issue_spec.rb b/spec/features/issues/user_comments_on_issue_spec.rb index f18992325d8..a81a99771cc 100644 --- a/spec/features/issues/user_comments_on_issue_spec.rb +++ b/spec/features/issues/user_comments_on_issue_spec.rb @@ -5,7 +5,6 @@ require "spec_helper" RSpec.describe "User comments on issue", :js, feature_category: :team_planning do include Features::AutocompleteHelpers include Features::NotesHelpers - include ContentEditorHelpers let_it_be(:project) { create(:project, :public) } let_it_be(:issue) { create(:issue, project: project) } @@ -16,7 +15,6 @@ RSpec.describe "User comments on issue", :js, feature_category: :team_planning d sign_in(user) visit(project_issue_path(project, issue)) - close_rich_text_promo_popover_if_present end context "when adding comments" do @@ -54,6 +52,17 @@ RSpec.describe "User comments on issue", :js, feature_category: :team_planning d expect(find_highlighted_autocomplete_item).to have_content('/label') end + + it "switches back to edit mode if a comment is submitted in preview mode" do + fill_in 'Comment', with: 'just a regular comment' + click_button 'Preview' + + expect(page).to have_content('Continue editing') + + click_button 'Comment' + + expect(page).not_to have_content('Continue editing') + end end context "when editing comments" do |