From db4ae4c0bbc2e5c02c84c84bd2f7cc387b13661a Mon Sep 17 00:00:00 2001 From: Matthew Landauer Date: Tue, 27 Feb 2024 04:23:54 +0000 Subject: [PATCH] Add percy snapshot for activate account --- spec/features/activate_account_spec.rb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/spec/features/activate_account_spec.rb b/spec/features/activate_account_spec.rb index 3059ab6ce..2d6ad00e2 100644 --- a/spec/features/activate_account_spec.rb +++ b/spec/features/activate_account_spec.rb @@ -3,6 +3,28 @@ require "spec_helper" describe "Activate account" do + include Devise::Test::IntegrationHelpers + + context "with a confirmed user that has not been activated in the new design" do + before do + # Do this weird dance to get us on to the new theme + sign_in create(:confirmed_user, tailwind_theme: true) + visit root_path + sign_out :user + + u = User.new(email: "matthew@oaf.org.au", from_alert_or_comment: true, confirmed_at: Time.zone.now) + u.skip_confirmation_notification! + u.save!(validate: false) + visit new_users_activation_path + end + + # rubocop:disable RSpec/NoExpectationExample + it "renders the page", js: true do + page.percy_snapshot("Activate account") + end + # rubocop:enable RSpec/NoExpectationExample + end + context "with a confirmed user that has not been activated" do before do u = User.new(email: "matthew@oaf.org.au", from_alert_or_comment: true, confirmed_at: Time.zone.now)