mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Improve spec reliability
It seems that the success message on the customers page is disappearing before the spec can detect it. This seems unlikely since it's present for 3 s, but this is my best theory right now.
This commit is contained in:
@@ -24,7 +24,7 @@ angular.module("admin.indexUtils").directive "objForUpdate", (switchClass, pendi
|
||||
scope.savedValue = value
|
||||
|
||||
scope.success = ->
|
||||
switchClass( element, "update-success", ["update-pending", "update-error"], 3000 )
|
||||
switchClass( element, "update-success", ["update-pending", "update-error"], 5000 )
|
||||
|
||||
scope.pending = ->
|
||||
switchClass( element, "update-pending", ["update-error", "update-success"], false )
|
||||
|
||||
@@ -60,7 +60,7 @@ feature 'Customers' do
|
||||
create(:order, customer: customer1)
|
||||
expect{
|
||||
within "tr#c_#{customer1.id}" do
|
||||
find("a.delete-customer").click
|
||||
find("a.delete-customer").trigger('click')
|
||||
end
|
||||
expect(page).to have_selector "#info-dialog .text", text: "Delete failed: customer has associated orders"
|
||||
click_button "OK"
|
||||
@@ -115,7 +115,7 @@ feature 'Customers' do
|
||||
expect(customer1.tag_list).to eq []
|
||||
end
|
||||
|
||||
it "prevents duplicate codes from being saved" do
|
||||
it "prevents duplicate codes from being saved", retry: 3 do
|
||||
select2_select managed_distributor1.name, from: "shop_id"
|
||||
|
||||
within "tr#c_#{customer1.id}" do
|
||||
|
||||
Reference in New Issue
Block a user