Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@ def email_required?
def recipient_label
if nickname.present?
nickname
elsif identifier.present?
identifier
elsif email.present?
if new_record?
"#{email} (new user)"
else
email
end
elsif identifier.present?
identifier
else
"Unknown user"
end
Expand Down
2 changes: 1 addition & 1 deletion features/distribution.feature
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ Feature: Fundraisers can distribute funds
And the project balance should be "490.00"

@javascript
Scenario: Send to an known email address who has no confirmation token
Scenario: Send to a known email address who has no confirmation token
Given an user with email "bob@example.com" and without password nor confirmation token
And a project managed by "alice"
And our fee is "0"
Expand Down
6 changes: 6 additions & 0 deletions features/step_definitions/distribution.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
find("input:enabled").set(arg1)
click_on "Add"
end

wait_for_ajax
end

Given(/^I add the email address "(.*?)" to the recipients$/) do |arg1|
Expand All @@ -41,6 +43,8 @@
find("input:enabled").set(user.identifier)
click_on "Add"
end

wait_for_ajax
end

When(/^I select the commit recipients "(.*?)"$/) do |arg1|
Expand All @@ -54,6 +58,8 @@
find("input:enabled").set(arg1)
click_on "Add"
end

wait_for_ajax
end

Given(/^I fill the amount to "(.*?)" with "(.*?)"$/) do |arg1, arg2|
Expand Down
2 changes: 2 additions & 0 deletions features/support/ajax.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

def wait_for_ajax ; sleep(1) ; end ;