docbrown/spec/system/user/user_settings_response_templates_spec.rb
Vaidehi Joshi d2ef01ecc2
Remove Percy (#8915)
We are no longer using the Percy service, so this code is not required anymore.
Removes the percy agent, the gem, and all references to Percy.snapshot and percy: true.
2020-06-25 11:19:58 -07:00

29 lines
889 B
Ruby

require "rails_helper"
RSpec.describe "User uses response templates settings", type: :system do
let!(:user) { create(:user) }
let(:response_template) { create(:response_template, user: user) }
context "when user is signed in" do
before do
sign_in user
response_template
end
context "when user has a response template already" do
it "can go to the edit page of the response template", js: true do
visit "/settings/response-templates"
click_link "Edit"
expect(page).to have_current_path "/settings/response-templates/#{response_template.id}", ignore_query: true
end
it "shows the proper message when deleting a reponse template", js: true do
visit "/settings/response-templates"
accept_confirm { click_button "Remove" }
expect(page).to have_text "was deleted."
end
end
end
end