diff --git a/spec/features/user_sign_up_spec.rb b/spec/features/user_sign_up_spec.rb index 6bb344845..7bf1ddc07 100644 --- a/spec/features/user_sign_up_spec.rb +++ b/spec/features/user_sign_up_spec.rb @@ -3,6 +3,8 @@ require "spec_helper" describe "Signing up for an API account" do + include Devise::Test::IntegrationHelpers + it "Successfully signing up", truncation: true do visit "/api/howto" click_link "Register for an account" @@ -20,4 +22,22 @@ expect(current_email).to have_subject("PlanningAlerts: Confirmation instructions") expect(current_email.default_part_body.to_s).to include("Please confirm your account email by clicking the link below") end + + describe "resending confirmation instructions in new design" do + before do + sign_in create(:confirmed_user, tailwind_theme: true) + sign_out :user + visit new_user_confirmation_path + end + + it "shows the page" do + expect(page).to have_content("Resend confirmation instructions") + end + + # rubocop:disable RSpec/NoExpectationExample + it "renders the page", js: true do + page.percy_snapshot("Resend confirmation") + end + # rubocop:enable RSpec/NoExpectationExample + end end