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

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

30 lines
726 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 'Profile > Comment templates > User creates comment template', :js,
2023-05-27 22:25:52 +05:30
feature_category: :user_profile do
let_it_be(:user) { create(:user) }
before do
sign_in(user)
2023-06-20 00:43:36 +05:30
visit profile_comment_templates_path
2023-05-27 22:25:52 +05:30
wait_for_requests
end
it 'shows the user a list of their saved replies' do
2023-06-20 00:43:36 +05:30
find('[data-testid="comment-template-name-input"]').set('test')
find('[data-testid="comment-template-content-input"]').set('Test content')
2023-05-27 22:25:52 +05:30
click_button 'Save'
wait_for_requests
2023-06-20 00:43:36 +05:30
expect(page).to have_content('My comment templates (1)')
2023-05-27 22:25:52 +05:30
expect(page).to have_content('test')
expect(page).to have_content('Test content')
end
end