2017-10-11 15:51:20 +08:00
|
|
|
Then(/^I click on Avatar$/) do
|
|
|
|
find('img.avatar').click
|
|
|
|
end
|
|
|
|
|
|
|
|
Given(/^I'm on the profile page$/) do
|
2017-10-16 23:02:35 +08:00
|
|
|
visit '/settings/account/profile'
|
2017-10-11 15:51:20 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
Then(/^I click on Browse button$/) do
|
|
|
|
find('input#user_avatar').click
|
2017-10-10 15:17:55 +08:00
|
|
|
end
|
2017-10-16 22:21:52 +08:00
|
|
|
|
|
|
|
Then(/^I change "([^"]*)" with "([^"]*)" email$/) do |prev_email, new_email|
|
|
|
|
find(:xpath, "//input[@value='#{prev_email}']").set(new_email)
|
|
|
|
end
|
|
|
|
|
|
|
|
Then(/^I fill in "([^"]*)" in Current password field$/) do |password|
|
|
|
|
find(:xpath, '//input[@id="settings_page.current_password"]').set(password)
|
|
|
|
end
|
|
|
|
|
|
|
|
Then(/^I fill in "([^"]*)" in New password field$/) do |password|
|
|
|
|
find(:xpath, '//input[@id="settings_page.new_password"]').set(password)
|
|
|
|
end
|
|
|
|
|
|
|
|
Then(/^I fill in "([^"]*)" in New password confirmation field$/) do |password|
|
|
|
|
find(:xpath,
|
|
|
|
'//input[@id="settings_page.new_password_confirmation"]').set(password)
|
|
|
|
end
|