debian-mirror-gitlab/spec/features/profiles/user_uses_comment_template_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
744 B
Ruby
Raw Normal View History

2023-05-27 22:25:52 +05:30
# frozen_string_literal: true
require 'spec_helper'
2023-06-20 00:43:36 +05:30
RSpec.describe 'User uses comment template', :js,
2023-05-27 22:25:52 +05:30
feature_category: :user_profile do
let_it_be(:project) { create(:project, :repository) }
let_it_be(:merge_request) { create(:merge_request, source_project: project) }
let_it_be(:user) { create(:user) }
let_it_be(:saved_reply) { create(:saved_reply, user: user) }
before do
project.add_owner(user)
sign_in(user)
end
2023-06-20 00:43:36 +05:30
it 'applies comment template' do
2023-05-27 22:25:52 +05:30
visit project_merge_request_path(merge_request.project, merge_request)
2023-07-09 08:55:56 +05:30
find('.js-comment-template-toggle').click
2023-05-27 22:25:52 +05:30
wait_for_requests
2023-06-20 00:43:36 +05:30
find('.gl-new-dropdown-item').click
2023-05-27 22:25:52 +05:30
expect(find('.note-textarea').value).to eq(saved_reply.content)
end
end