Skip to content
Extraits de code Groupes Projets
Valider d646428a rédigé par Sarah Mei's avatar Sarah Mei
Parcourir les fichiers

Clean up web steps that are too complicated to follow

parent 22b65bd3
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -93,7 +93,7 @@ When /^I press the first "([^"]*)"(?: within "([^"]*)")?$/ do |link_selector, wi
end
end
When /^I press the ([\d])(nd|rd|st|th) "([^\"]*)"(?: within "([^\"]*)")?$/ do |number, rd, link_selector, within_selector|
When /^I press the ([\d])(?:nd|rd|st|th) "([^\"]*)"(?: within "([^\"]*)")?$/ do |number, link_selector, within_selector|
with_scope(within_selector) do
find(:css, link_selector+":nth-child(#{number})").click
end
......
......@@ -94,15 +94,14 @@ Given /^many posts from alice for bob$/ do
end
end
Then /^I should have (\d) contacts? in "([^"]*)"$/ do |n_contacts, aspect_name|
@me.aspects.where(:name => aspect_name).first.contacts.count.should == n_contacts.to_i
end
When /^I (add|remove|toggle) the person (to|from) my ([\d])(nd|rd|st|th) aspect$/ do |word1, word2, aspect_number, nd|
When /^I (?:add|remove) the person (?:to|from) my (1st|2nd) aspect$/ do |aspect_ordinal|
steps %Q{
And I press the first ".toggle.button"
And I press the #{aspect_number}#{nd} "li" within ".dropdown.active .dropdown_list"
And I press the #{aspect_ordinal} "li" within ".dropdown.active .dropdown_list"
And I press the first ".toggle.button"
}
end
......@@ -111,7 +110,6 @@ When /^I post a status with the text "([^\"]*)"$/ do |text|
@me.post(:status_message, :text => text, :public => true, :to => 'all')
end
And /^I follow the "([^\"]*)" link from the last sent email$/ do |link_text|
email_text = Devise.mailer.deliveries.first.body.to_s
email_text = Devise.mailer.deliveries.first.html_part.body.raw_source if email_text.blank?
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter