Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2025-04-12 18:12:02 +00:00
parent c38195a2d5
commit e8b806264d
5 changed files with 7 additions and 7 deletions

View File

@ -15,7 +15,7 @@
.system-note {
.note-text {
// System notes render the text twice; this hides the secon done. Do not remove!
// System notes render the text twice; this hides the second one. Do not remove!
p:first-child {
display: none;
}

View File

@ -188,7 +188,7 @@ module SystemNotes
marked_old_title = Gitlab::Diff::InlineDiffMarker.new(old_title).mark(old_diffs)
marked_new_title = Gitlab::Diff::InlineDiffMarker.new(new_title).mark(new_diffs)
body = "<div>changed title from <code class=\"idiff\">#{marked_old_title}</code> to <code class=\"idiff\">#{marked_new_title}</code></div>"
body = "<p>changed title from <code class=\"idiff\">#{marked_old_title}</code> to <code class=\"idiff\">#{marked_new_title}</code></p>"
track_issue_event(:track_issue_title_changed_action)
work_item_activity_counter.track_work_item_title_changed_action(author: author) if noteable.is_a?(WorkItem)

View File

@ -523,9 +523,9 @@ RSpec.describe Issues::UpdateService, :mailer, feature_category: :team_planning
end
it 'creates system note about title change' do
note = find_note('<div>changed title')
note = find_note('<p>changed title')
expect(note.note).to eq '<div>changed title from <code class="idiff"><span class="idiff left right deletion">Old</span> title</code> to <code class="idiff"><span class="idiff left right addition">New</span> title</code></div>'
expect(note.note).to eq '<p>changed title from <code class="idiff"><span class="idiff left right deletion">Old</span> title</code> to <code class="idiff"><span class="idiff left right addition">New</span> title</code></p>'
end
it 'creates system note about discussion lock' do

View File

@ -322,10 +322,10 @@ RSpec.describe MergeRequests::UpdateService, :mailer, feature_category: :code_re
it 'creates system note about title change' do
update_merge_request(opts)
note = find_note('<div>changed title')
note = find_note('<p>changed title')
expect(note).not_to be_nil
expect(note.note).to eq '<div>changed title from <code class="idiff"><span class="idiff left right deletion">Old</span> title</code> to <code class="idiff"><span class="idiff left right addition">New</span> title</code></div>'
expect(note.note).to eq '<p>changed title from <code class="idiff"><span class="idiff left right deletion">Old</span> title</code> to <code class="idiff"><span class="idiff left right addition">New</span> title</code></p>'
end
it 'creates system note about description change' do

View File

@ -317,7 +317,7 @@ RSpec.describe ::SystemNotes::IssuablesService, feature_category: :team_planning
it 'sets the note text' do
expect(subject.note)
.to eq %q(<div>changed title from <code class="idiff"><span class="idiff left right deletion">Old **title**</span></code> to <code class="idiff"><span class="idiff left right addition">_Lorem_ ipsum</span></code></div>)
.to eq %q(<p>changed title from <code class="idiff"><span class="idiff left right deletion">Old **title**</span></code> to <code class="idiff"><span class="idiff left right addition">_Lorem_ ipsum</span></code></p>)
end
end
end