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

Make flaky system spec reliable #8605

Merged
merged 1 commit into from
Dec 10, 2021
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
10 changes: 9 additions & 1 deletion spec/system/admin/order_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,15 @@ def new_order_with_distribution(distributor, order_cycle)
fill_in "order_bill_address_attributes_address1", with: "xxx"
fill_in "order_bill_address_attributes_city", with: "xxx"
fill_in "order_bill_address_attributes_zipcode", with: "xxx"
select "Australia", from: "order_bill_address_attributes_country_id"

# The country is already selected and we avoid re-selecting it here
# because it would trigger an API call which we would need to wait for
# while we have no visual indicator for the wait.
#
# Ideally, we would implement a visual cue like disable the state field
# while the data is fetched from the API.
#
# select "Australia", from: "order_bill_address_attributes_country_id"
select "Victoria", from: "order_bill_address_attributes_state_id"
fill_in "order_bill_address_attributes_phone", with: "xxx"

Expand Down