-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add percy snapshot for activate account
- Loading branch information
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: "[email protected]", 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: "[email protected]", from_alert_or_comment: true, confirmed_at: Time.zone.now) | ||
|