-
-
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 a bit more testing for new design of contact us page
- Loading branch information
Showing
1 changed file
with
23 additions
and
2 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 |
---|---|---|
|
@@ -33,10 +33,12 @@ | |
context "when signed in" do | ||
let(:user) { create(:confirmed_user, name: "Matthew Landauer", email: "[email protected]") } | ||
|
||
before { sign_in user } | ||
before do | ||
sign_in user | ||
visit "/help/contact" | ||
end | ||
|
||
it "less information needs to be filled out and the admins receive an email" do | ||
visit "/help/contact" | ||
select "The address or map location is wrong", from: "I'm getting in touch because" | ||
fill_in "Please tell us briefly about your request", with: "Actually nothing is wrong here. Sorry." | ||
click_button "Send message to the Planning Alerts team" | ||
|
@@ -49,4 +51,23 @@ | |
expect(current_email).to have_reply_to("[email protected]") | ||
end | ||
end | ||
|
||
context "when signed in in new theme" do | ||
let(:user) { create(:confirmed_user, name: "Matthew Landauer", email: "[email protected]", tailwind_theme: true) } | ||
|
||
before do | ||
sign_in user | ||
visit "/help/contact" | ||
end | ||
|
||
it "passes automated accessibility tests", js: true do | ||
expect(page).to be_axe_clean | ||
end | ||
|
||
# rubocop:disable RSpec/NoExpectationExample | ||
it "renders a snapshot for a visual diff", js: true do | ||
page.percy_snapshot("Contact us") | ||
end | ||
# rubocop:enable RSpec/NoExpectationExample | ||
end | ||
end |