Commit 1e5015b7 authored by Brett Walker's avatar Brett Walker

Fix for EE review comments

parent 17e0c017
...@@ -18,6 +18,7 @@ describe Projects::MergeRequests::DraftsController do ...@@ -18,6 +18,7 @@ describe Projects::MergeRequests::DraftsController do
before do before do
sign_in(user) sign_in(user)
stub_licensed_features(batch_comments: true) stub_licensed_features(batch_comments: true)
stub_commonmark_sourcepos_disabled
end end
describe 'GET #index' do describe 'GET #index' do
...@@ -77,7 +78,7 @@ describe Projects::MergeRequests::DraftsController do ...@@ -77,7 +78,7 @@ describe Projects::MergeRequests::DraftsController do
expect(json_response['position']).to be_present expect(json_response['position']).to be_present
expect(json_response['file_hash']).to be_present expect(json_response['file_hash']).to be_present
expect(json_response['line_code']).to match(/\w+_\d+_\d+/) expect(json_response['line_code']).to match(/\w+_\d+_\d+/)
expect(json_response['note_html']).to eq('<p data-sourcepos="1:1-1:29" dir="auto">This is a unpublished comment</p>') expect(json_response['note_html']).to eq('<p dir="auto">This is a unpublished comment</p>')
end end
it 'creates a draft note with quick actions' do it 'creates a draft note with quick actions' do
......
...@@ -4,6 +4,10 @@ require 'spec_helper' ...@@ -4,6 +4,10 @@ require 'spec_helper'
describe IssuablesHelper do describe IssuablesHelper do
describe '#issuable_initial_data' do describe '#issuable_initial_data' do
before do
stub_commonmark_sourcepos_disabled
end
it 'returns the correct data for an epic' do it 'returns the correct data for an epic' do
user = create(:user) user = create(:user)
epic = create(:epic, author: user, description: 'epic text') epic = create(:epic, author: user, description: 'epic text')
...@@ -28,7 +32,7 @@ describe IssuablesHelper do ...@@ -28,7 +32,7 @@ describe IssuablesHelper do
groupPath: @group.path, groupPath: @group.path,
initialTitleHtml: epic.title, initialTitleHtml: epic.title,
initialTitleText: epic.title, initialTitleText: epic.title,
initialDescriptionHtml: '<p data-sourcepos="1:1-1:9" dir="auto">epic text</p>', initialDescriptionHtml: '<p dir="auto">epic text</p>',
initialDescriptionText: 'epic text', initialDescriptionText: 'epic text',
initialTaskStatus: '0 of 0 tasks completed', initialTaskStatus: '0 of 0 tasks completed',
subepicsSupported: Gitlab::Database.postgresql? subepicsSupported: Gitlab::Database.postgresql?
......
...@@ -17,7 +17,7 @@ module Banzai ...@@ -17,7 +17,7 @@ module Banzai
def self.transform_context(context) def self.transform_context(context)
super(context).merge( super(context).merge(
no_sourcepos: true no_sourcepos: true
) )
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment