diff --git a/spec/features/admin/customers_spec.rb b/spec/features/admin/customers_spec.rb index 1ab377ca3f..c91f5cf835 100644 --- a/spec/features/admin/customers_spec.rb +++ b/spec/features/admin/customers_spec.rb @@ -132,16 +132,20 @@ feature 'Customers' do fill_in "code", with: "new-customer-code" expect(page).to have_css "input[name=code].update-pending" end - within "tr#c_#{customer2.id}" do - fill_in "code", with: "new-customer-code" - expect(page).to have_content "This code is used already." - end + click_button "Save Changes" within "tr#c_#{customer1.id}" do expect(page).to have_css "input[name=code].update-success" end + within "tr#c_#{customer2.id}" do + fill_in "code", with: "new-customer-code" + expect(page).to have_content "This code is used already." + end + + click_button "Save Changes" + within "tr#c_#{customer2.id}" do expect(page).to have_css "input[name=code].update-error" end