-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added tests with real capybara nodes
Signed-off-by: hajee <hajee@moretIA.com>
- Loading branch information
hajee
authored and
Bert Hajee
committed
Jun 14, 2013
1 parent
9926b9f
commit 4301e5c
Showing
16 changed files
with
172 additions
and
134 deletions.
There are no files selected for viewing
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
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
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
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
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
shared_context "page with single table with 3 records" do | ||
before do | ||
visit "/page-with-single-table-with-3-records" | ||
end | ||
end | ||
|
||
shared_context "page with two tables with 3 records" do | ||
before do | ||
visit "/page-with-two-tables-with-3-records" | ||
end | ||
end | ||
|
||
|
||
shared_context "page without records" do | ||
before do | ||
visit "/page-without-records" | ||
end | ||
end | ||
|
||
shared_context "page with duplicate records" do | ||
before do | ||
visit "/page-with-duplicate-records" | ||
end | ||
end | ||
|
||
shared_context "page one record in a form" do | ||
before do | ||
visit "/page-one-record-in-a-form" | ||
end | ||
end | ||
|
||
|
||
shared_context "page one record" do | ||
before do | ||
visit "/page-one-record" | ||
end | ||
end |
File renamed without changes.
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
require 'sinatra/base' | ||
|
||
|
||
class TestApp < Sinatra::Base | ||
|
||
set :root, File.dirname(__FILE__) | ||
set :raise_errors, true | ||
# set :show_exceptions, false | ||
|
||
|
||
get '/*' do | ||
viewname = params[:splat].first # eg "some/path/here" | ||
if File.exist?("#{settings.root}/views/#{viewname}.erb") | ||
erb :"#{viewname}" | ||
else | ||
"can't find view #{viewname}" | ||
end | ||
end | ||
end | ||
|
||
if __FILE__ == $0 | ||
Rack::Handler::WEBrick.run TestApp, :Port => 8070 | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<form data-team-id='1'> | ||
<input data-attribute-for='name'> | ||
<button data-action-for='create'> | ||
</form> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<div data-team-id='1'> | ||
<div data-attribute-for='name'></div> | ||
</div> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<table> | ||
<tr data-team-id='1'> | ||
<td data-attribute-for='name'>Ajax</td> | ||
</tr> | ||
<tr data-team-id='1'> | ||
<td data-attribute-for='name'>Ajax</td> | ||
</tr> | ||
</table> |
17 changes: 17 additions & 0 deletions
17
spec/support/views/page-with-single-table-with-3-records.erb
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<table> | ||
<tr data-team-id='1' class='champions_league'> | ||
<td data-attribute-for='ranking'>1</td> | ||
<td data-attribute-for='name'>Ajax</td> | ||
<td data-attribute-for='points'>10</td> | ||
</tr> | ||
<tr data-team-id='2' class='champions_league'> | ||
<td data-attribute-for='ranking'>2</td> | ||
<td data-attribute-for='name'>PSV</td> | ||
<td data-attribute-for='points'>8</td> | ||
</tr> | ||
<tr data-team-id='3'> | ||
<td data-attribute-for='ranking'>3</td> | ||
<td data-attribute-for='name'>Feijenoord</td> | ||
<td data-attribute-for='points'>6</td> | ||
</tr> | ||
</table> |
38 changes: 38 additions & 0 deletions
38
spec/support/views/page-with-two-tables-with-3-records.erb
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<div class='team-table'> | ||
<table id='first-table'> | ||
<tr data-team-id='1' class='champions_league'> | ||
<td data-attribute-for='ranking'>1</td> | ||
<td data-attribute-for='name'>Ajax</td> | ||
<td data-attribute-for='points'>10</td> | ||
</tr> | ||
<tr data-team-id='2' class='champions_league'> | ||
<td data-attribute-for='ranking'>2</td> | ||
<td data-attribute-for='name'>PSV</td> | ||
<td data-attribute-for='points'>8</td> | ||
</tr> | ||
<tr data-team-id='3' class='euro_league'> | ||
<td data-attribute-for='ranking'>3</td> | ||
<td data-attribute-for='name'>Feijenoord</td> | ||
<td data-attribute-for='points'>6</td> | ||
</tr> | ||
</table> | ||
</div> | ||
<div class='team-table'> | ||
<table id='second-table'> | ||
<tr data-team-id='1' class='champions_league'> | ||
<td data-attribute-for='ranking'>1</td> | ||
<td data-attribute-for='name'>Ajax</td> | ||
<td data-attribute-for='points'>10</td> | ||
</tr> | ||
<tr data-team-id='2' class='champions_league'> | ||
<td data-attribute-for='ranking'>2</td> | ||
<td data-attribute-for='name'>PSV</td> | ||
<td data-attribute-for='points'>8</td> | ||
</tr> | ||
<tr data-team-id='3' class='euro_league'> | ||
<td data-attribute-for='ranking'>3</td> | ||
<td data-attribute-for='name'>Feijenoord</td> | ||
<td data-attribute-for='points'>6</td> | ||
</tr> | ||
</table> | ||
</div> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<table> | ||
</table |