Added conference detail capturing to tests

This commit is contained in:
Godwin
2017-06-15 16:18:52 -07:00
parent f8ce4130ca
commit 86abef7215
3 changed files with 16 additions and 1 deletions
+6
View File
@@ -49,6 +49,12 @@ Given /^the conference accepts paypal$/i do
TestState.last_conference.save!
end
Given /^the conference has (.+) copy$/i do |field|
copy = Forgery::LoremIpsum.paragraphs(rand(1..4), sentences: rand(1..3), random: true, html: html)
TestState.last_conference.send("#{field.gsub(/\s+/, '_')}=", copy)
TestState.last_conference.save!
end
Then /^I am( not)? a member of (.+)$/i do |state, org_name|
user = nil
should_be = !(state =~ / not/)
@@ -95,7 +95,6 @@ Then /^(?:I )?enter (?:my |an? |some |the )?(.+?)(?: as '(.+)')?$/i do |field, v
html = false
if element.tag_name.to_s.downcase == 'div'
element = element.first('[contenteditable]')
html = true
end
unless value.present?