mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-19 04:49:15 +00:00
Merge pull request #14020 from mkllnk/flaky-invite-spec
Expect UI change before emails
This commit is contained in:
@@ -664,16 +664,16 @@ RSpec.describe '
|
||||
end
|
||||
|
||||
it "finally, can invite unregistered users" do
|
||||
within ".reveal-modal" do
|
||||
tomselect_fill_in "user_invitation[email]", with: "email@email.com"
|
||||
expect do
|
||||
within ".reveal-modal" do
|
||||
tomselect_fill_in "user_invitation[email]", with: "email@email.com"
|
||||
|
||||
expect do
|
||||
click_button "Invite"
|
||||
end.to enqueue_job(ActionMailer::MailDeliveryJob).exactly(:twice)
|
||||
end
|
||||
end
|
||||
|
||||
expect(page)
|
||||
.to have_content "email@email.com has been invited to manage this enterprise"
|
||||
expect(page)
|
||||
.to have_content "email@email.com has been invited to manage this enterprise"
|
||||
end.to enqueue_job(ActionMailer::MailDeliveryJob).exactly(:twice)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user