Add test on order creation and correct display of the error

- The error "Line items can't be blank" should not be displayed when we first arrived on this page after creation but only if we update the page
This commit is contained in:
Jean-Baptiste Bellet
2021-04-22 10:03:23 +02:00
parent 259e758d6e
commit 05a00a07ef

View File

@@ -61,6 +61,13 @@ feature '
select2_select order_cycle.name, from: 'order_order_cycle_id'
click_button 'Next'
expect(page).not_to have_selector '.flash.error'
expect(page).not_to have_content "Line items can't be blank"
click_button "Update And Recalculate Fees"
expect(page).to have_selector '.flash.error'
expect(page).to have_content "Line items can't be blank"
# it suppresses validation errors when setting distribution
expect(page).not_to have_selector '#errorExplanation'
expect(page).to have_content 'ADD PRODUCT'