-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#4641] Update app/views/catalog/_report_harmful_language_form.html.e…
…rb and app/views/catalog/_suggest_correction_form.html.erb with remote:true Test feedback form modal with the event listener addition on the blacklight-modal Mark spec/fetaures/report_harmful_language_spec as pending because of #4655 Co-authored-by: Jane Sandberg <[email protected]>
- Loading branch information
1 parent
a4b4898
commit d77a3ba
Showing
6 changed files
with
58 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
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
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
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 |
---|---|---|
|
@@ -22,4 +22,23 @@ | |
expect(page).to have_text 'Your question has been submitted' | ||
end | ||
end | ||
describe 'pressing the send button' do | ||
before do | ||
stub_libanswers_api | ||
stub_holding_locations | ||
visit '/catalog/99101035463506421' | ||
scroll_to(:bottom) # needed when js: true | ||
click_link 'Ask a Question' | ||
fill_in 'ask_a_question_form_name', with: 'Agatha' | ||
fill_in 'ask_a_question_form_email', with: '[email protected]' | ||
fill_in 'ask_a_question_form_message', with: 'Murder on the Orient Express' | ||
end | ||
it 'closes the modal', js: true do | ||
expect(page).to have_text('Ask a Question') | ||
expect(page).to have_text('Message') | ||
click_button 'Send' | ||
expect(current_path).to eq '/catalog/99101035463506421' | ||
expect(page).not_to have_text('Message') | ||
end | ||
end | ||
end |
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
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 |
---|---|---|
|
@@ -35,4 +35,22 @@ | |
expect(page).not_to have_text('Please use this area to report errors or omissions') | ||
end | ||
end | ||
describe 'pressing the send button' do | ||
before do | ||
stub_libanswers_api | ||
stub_holding_locations | ||
visit '/catalog/99105509673506421' | ||
scroll_to(:bottom) # needed when js: true | ||
click_link 'Suggest a Correction' | ||
fill_in 'suggest_correction_form_name', with: 'Hercule Poirot' | ||
fill_in 'suggest_correction_form_email', with: '[email protected]' | ||
fill_in 'suggest_correction_form_message', with: 'Death on the Nile' | ||
end | ||
it 'closes the modal', js: true do | ||
expect(page).to have_text('Please use this area to report errors or omissions') | ||
click_button 'Send' | ||
expect(current_path).to eq '/catalog/99105509673506421' | ||
expect(page).not_to have_text('Please use this area to report errors or omissions') | ||
end | ||
end | ||
end |