Slide 83
Slide 83 text
DUPLICATED Logic
...
Given(/^I set up my demographics info$/) do
page.fill_in ‘person[gender]’,
with: ProfilePageHelper.demographics_info.fetch(:gender)
page.fill_in ‘person[ethnicity]’,
with: ProfilePageHelper.demographics_info.fetch(:ethnicity)
page.select(ProfilePageHelper.demographics_info.fetch(:country),
from: ’person[country]’)
end
module ProfilePageHelper
def self.demographics_info
{ gender: ‘female’,
ethnicity: ‘Asian’,
country: ‘United States of America’ }
end
end
$: cat features/step_definitions/profile_steps.rb