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

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

30 lines
699 B
Ruby
Raw Normal View History

2023-05-27 22:25:52 +05:30
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe 'Profile > Saved replies > User creates saved reply', :js,
feature_category: :user_profile do
let_it_be(:user) { create(:user) }
before do
sign_in(user)
visit profile_saved_replies_path
wait_for_requests
end
it 'shows the user a list of their saved replies' do
find('[data-testid="saved-reply-name-input"]').set('test')
find('[data-testid="saved-reply-content-input"]').set('Test content')
click_button 'Save'
wait_for_requests
expect(page).to have_content('My saved replies (1)')
expect(page).to have_content('test')
expect(page).to have_content('Test content')
end
end