Last active
December 10, 2017 21:49
-
-
Save toranb/961f26466012ca3dcb69b216d8150050 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'watir-webdriver' | |
include Selenium | |
describe "Acceptance tests" do | |
before :each do | |
@b = Watir::Browser.new :firefox | |
end | |
after :each do | |
@b.close | |
end | |
describe "high level application tests" do | |
it "delete action will remove person from the table" do | |
@b.goto "http://127.0.0.1:3000/" | |
table = @b.table(:id => 'people') | |
assert_equal table.rows.length, 2 | |
@b.table(:id => 'people')[1][1].button(:class,"delete").click | |
table = @b.table(:id => 'people') | |
assert_equal table.rows.length, 1 | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment