mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-08 00:23:01 +08:00
29 lines
837 B
Ruby
29 lines
837 B
Ruby
Then(/^I click on Avatar$/) do
|
|
find('img.avatar').click
|
|
end
|
|
|
|
Given(/^I'm on the profile page$/) do
|
|
visit '/settings/account/profile'
|
|
end
|
|
|
|
Then(/^I click on Browse button$/) do
|
|
find('input#user_avatar').click
|
|
end
|
|
|
|
Then(/^I change "([^"]*)" with "([^"]*)" email$/) do |prev_email, new_email|
|
|
wait_for_ajax
|
|
find(:css, "input[value='#{prev_email}']").set(new_email)
|
|
end
|
|
|
|
Then(/^I fill in "([^"]*)" in Current password field$/) do |password|
|
|
find(:css, 'input[id="settings_page.current_password"]').set(password)
|
|
end
|
|
|
|
Then(/^I fill in "([^"]*)" in New password field$/) do |password|
|
|
find(:css, 'input[id="settings_page.new_password"]').set(password)
|
|
end
|
|
|
|
Then(/^I fill in "([^"]*)" in New password confirmation field$/) do |password|
|
|
find(:css,
|
|
'input[id="settings_page.new_password_confirmation"]').set(password)
|
|
end
|