Skip to content

Instantly share code, notes, and snippets.

@abacha
Created March 19, 2013 18:21
Show Gist options
  • Select an option

  • Save abacha/5198695 to your computer and use it in GitHub Desktop.

Select an option

Save abacha/5198695 to your computer and use it in GitHub Desktop.
scenario "updating email", js: true, focus: true do
person = create(:person)
login_as create(:user, role: "Operacional")
visit "/people"
find(:xpath, '//*[@id="body"]/table/tbody/tr[1]/td[6]/a[2]').click
within "#edit_email" do
fill_in "Email", with: "newmail@mail.com"
click_on "Salvar"
end
ap page.driver.alert_messages
Person.exists?(email: "newmail@mail.com").should be_true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment