Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sending the escape key to close the autocomplete that was blocking buttons #1113

Merged
merged 1 commit into from
Mar 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions spec/features/decide_travel_request_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@

expect(travel_request.event_title).to match(/Event \d* \d*, Location/)
fill_in("displayInput", with: "")
# The autocomplete dropdown covers the buttons so hit escape to clear
find("#displayInput").send_keys(:escape)
click_on "Change Event Name"
expect(travel_request.reload.event_title).to match(/Event \d* \d*, Location/)
expect(page).to have_content("is required to specify requested changes")
Expand All @@ -86,6 +88,8 @@

expect(travel_request.event_title).to match(/Event \d* \d*, Location/)
fill_in("displayInput", with: "Random text")
# The autocomplete dropdown covers the buttons so hit escape to clear
find("#displayInput").send_keys(:escape)
click_on "Change Event Name"
expect(travel_request.reload.event_title).to match(/Event \d* \d*, Location/)
expect(page).to have_content("Event name does not exist, please select an existing event name.")
Expand Down