-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Call empty only on incomplete orders #5827
Call empty only on incomplete orders #5827
Conversation
Looks like we have a few spec failures that we're currently addressing. |
end | ||
|
||
expect(page.current_path).to eq(spree.cart_admin_order_path(order)) | ||
expect(page).not_to have_content(order.line_items.first.variant.sku) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can lead to false positives. Can we expect an empty order message instead?
expect(page).not_to have_content(order.line_items.first.variant.sku) | |
expect(page).to have_content I18n.t('spree.your_order_is_empty_add_product') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @tvdeyen. I ended up re-writting most of this spec in the latest revision, so let me know what you think :)
967b064
to
e96f358
Compare
Code fails with a 500 on admin because of the order shipping status. The change triggers @order.empty! only when the order is incomplete. Co-authored-by: An Stewart <[email protected]> Co-authored-by: Kendra Chateau <[email protected]>
e96f358
to
c4fd1df
Compare
Summary
Fixes #4438. This change is based on #5418 from @nirnaeth.
There are two notable changes from #5418:
Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed: