Skip to content

Commit

Permalink
New design for check email on activation
Browse files Browse the repository at this point in the history
  • Loading branch information
mlandauer committed Mar 6, 2024
1 parent da4ef91 commit a0a271a
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
21 changes: 21 additions & 0 deletions app/views/_tailwind/users/activations/check_email.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<% content_for :page_title, "Great! Now check your email" %>

<%# TODO: Extract the centered column into its own component %>
<div class="max-w-lg mx-auto mt-32 text-center">
<%= render Tailwind::Heading.new(tag: :h1).with_content(yield :page_title) %>

<%= image_tag("tailwind/illustration/check-email.svg", class: "mb-20 mt-10") %>

<div class="flex flex-col gap-6 text-2xl text-navy">
<p>
You will shortly receive an email from PlanningAlerts.org.au.
</p>
<p>
<strong>Click on the link</strong> in the email
to complete the final step to activate your account.
</p>
<p>
If you don't get an email in the next few minutes, try checking your spam filter.
</p>
</div>
</div>
16 changes: 16 additions & 0 deletions spec/features/activate_account_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,22 @@
# rubocop:enable RSpec/NoExpectationExample
end

context "when on the check your email page 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
visit check_email_users_activation_path
end

# rubocop:disable RSpec/NoExpectationExample
it "renders the page", js: true do
page.percy_snapshot("Activate check email")
end
# rubocop:enable RSpec/NoExpectationExample
end

context "with a confirmed user that has not been activated" do
before do
u = User.new(email: "[email protected]", from_alert_or_comment: true, confirmed_at: Time.zone.now)
Expand Down

0 comments on commit a0a271a

Please sign in to comment.