symbiont 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.coveralls.yml +1 -0
- data/.gitignore +22 -22
- data/.travis.yml +25 -14
- data/Gemfile +4 -2
- data/{LICENSE → LICENSE.txt} +22 -22
- data/README.md +57 -65
- data/Rakefile +28 -34
- data/lib/symbiont/accessor.rb +7 -0
- data/lib/symbiont/assertions.rb +33 -0
- data/lib/symbiont/elements.rb +69 -0
- data/lib/symbiont/errors.rb +7 -0
- data/lib/symbiont/factory.rb +75 -46
- data/lib/symbiont/helpers.rb +49 -0
- data/lib/symbiont/logging.rb +5 -0
- data/lib/symbiont/pages.rb +32 -0
- data/lib/symbiont/platform.rb +12 -0
- data/lib/symbiont/version.rb +3 -3
- data/lib/symbiont.rb +34 -92
- data/spec/fixtures/element_definitions.rb +32 -0
- data/spec/fixtures/mock_drivers.rb +8 -0
- data/spec/fixtures/page_definitions.rb +36 -0
- data/spec/spec_helper.rb +31 -80
- data/spec/symbiont/assertion_spec.rb +88 -0
- data/spec/symbiont/driver_spec.rb +41 -0
- data/spec/symbiont/element_spec.rb +8 -0
- data/spec/symbiont/factory_spec.rb +70 -130
- data/spec/symbiont/page_spec.rb +50 -0
- data/symbiont.gemspec +52 -27
- data/test/symbiont-script.rb +97 -0
- metadata +89 -230
- data/Gemfile.lock +0 -44
- data/HISTORY.md +0 -99
- data/app/app.rb +0 -48
- data/app/public/css/cupertino/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png +0 -0
- data/app/public/css/cupertino/images/ui-bg_flat_15_cd0a0a_40x100.png +0 -0
- data/app/public/css/cupertino/images/ui-bg_glass_100_e4f1fb_1x400.png +0 -0
- data/app/public/css/cupertino/images/ui-bg_glass_50_3baae3_1x400.png +0 -0
- data/app/public/css/cupertino/images/ui-bg_glass_80_d7ebf9_1x400.png +0 -0
- data/app/public/css/cupertino/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png +0 -0
- data/app/public/css/cupertino/images/ui-bg_highlight-hard_70_000000_1x100.png +0 -0
- data/app/public/css/cupertino/images/ui-bg_highlight-soft_100_deedf7_1x100.png +0 -0
- data/app/public/css/cupertino/images/ui-bg_highlight-soft_25_ffef8f_1x100.png +0 -0
- data/app/public/css/cupertino/images/ui-icons_2694e8_256x240.png +0 -0
- data/app/public/css/cupertino/images/ui-icons_2e83ff_256x240.png +0 -0
- data/app/public/css/cupertino/images/ui-icons_3d80b3_256x240.png +0 -0
- data/app/public/css/cupertino/images/ui-icons_72a7cf_256x240.png +0 -0
- data/app/public/css/cupertino/images/ui-icons_ffffff_256x240.png +0 -0
- data/app/public/css/cupertino/jquery-ui-1.8.16.custom.css +0 -290
- data/app/public/css/demo_table_jui.css +0 -471
- data/app/public/css/font/ColabLig-webfont.eot +0 -0
- data/app/public/css/font/ColabLig-webfont.svg +0 -149
- data/app/public/css/font/ColabLig-webfont.ttf +0 -0
- data/app/public/css/font/ColabLig-webfont.woff +0 -0
- data/app/public/css/font/ColabMed-webfont.eot +0 -0
- data/app/public/css/font/ColabMed-webfont.svg +0 -149
- data/app/public/css/font/ColabMed-webfont.ttf +0 -0
- data/app/public/css/font/ColabMed-webfont.woff +0 -0
- data/app/public/css/font/ColabReg-webfont.eot +0 -0
- data/app/public/css/font/ColabReg-webfont.svg +0 -149
- data/app/public/css/font/ColabReg-webfont.ttf +0 -0
- data/app/public/css/font/ColabReg-webfont.woff +0 -0
- data/app/public/css/font/ColabThi-webfont.eot +0 -0
- data/app/public/css/font/ColabThi-webfont.svg +0 -149
- data/app/public/css/font/ColabThi-webfont.ttf +0 -0
- data/app/public/css/font/ColabThi-webfont.woff +0 -0
- data/app/public/css/normalize.css +0 -376
- data/app/public/css/site.css +0 -446
- data/app/public/fancybox/blank.gif +0 -0
- data/app/public/fancybox/fancy_close.png +0 -0
- data/app/public/fancybox/fancy_loading.png +0 -0
- data/app/public/fancybox/fancy_nav_left.png +0 -0
- data/app/public/fancybox/fancy_nav_right.png +0 -0
- data/app/public/fancybox/fancy_shadow_e.png +0 -0
- data/app/public/fancybox/fancy_shadow_n.png +0 -0
- data/app/public/fancybox/fancy_shadow_ne.png +0 -0
- data/app/public/fancybox/fancy_shadow_nw.png +0 -0
- data/app/public/fancybox/fancy_shadow_s.png +0 -0
- data/app/public/fancybox/fancy_shadow_se.png +0 -0
- data/app/public/fancybox/fancy_shadow_sw.png +0 -0
- data/app/public/fancybox/fancy_shadow_w.png +0 -0
- data/app/public/fancybox/fancy_title_left.png +0 -0
- data/app/public/fancybox/fancy_title_main.png +0 -0
- data/app/public/fancybox/fancy_title_over.png +0 -0
- data/app/public/fancybox/fancy_title_right.png +0 -0
- data/app/public/fancybox/fancybox-x.png +0 -0
- data/app/public/fancybox/fancybox-y.png +0 -0
- data/app/public/fancybox/fancybox.png +0 -0
- data/app/public/fancybox/jquery.fancybox-1.3.4.css +0 -359
- data/app/public/fancybox/jquery.fancybox-1.3.4.js +0 -1156
- data/app/public/fancybox/jquery.fancybox-1.3.4.min.js +0 -1
- data/app/public/img/Sorting icons.psd +0 -0
- data/app/public/img/back_disabled.png +0 -0
- data/app/public/img/back_enabled.png +0 -0
- data/app/public/img/back_enabled_hover.png +0 -0
- data/app/public/img/close.png +0 -0
- data/app/public/img/favicon.ico +0 -0
- data/app/public/img/forward_disabled.png +0 -0
- data/app/public/img/forward_enabled.png +0 -0
- data/app/public/img/forward_enabled_hover.png +0 -0
- data/app/public/img/lucid-bg.png +0 -0
- data/app/public/img/lucid-ft.png +0 -0
- data/app/public/img/open.png +0 -0
- data/app/public/img/sort_asc.png +0 -0
- data/app/public/img/sort_asc_disabled.png +0 -0
- data/app/public/img/sort_both.png +0 -0
- data/app/public/img/sort_desc.png +0 -0
- data/app/public/img/sort_desc_disabled.png +0 -0
- data/app/public/js/comics.js +0 -11
- data/app/public/js/signup.js +0 -141
- data/app/public/js/site.js +0 -42
- data/app/public/js/stardate.js +0 -35
- data/app/public/js/vendor/html5shiv.js +0 -5
- data/app/public/js/vendor/jquery-1.8.3.min.js +0 -2
- data/app/public/js/vendor/jquery.dataTables.min.js +0 -151
- data/app/public/js/vendor/jquery.validate.min.js +0 -4
- data/app/views/comics.erb +0 -344
- data/app/views/index.erb +0 -7
- data/app/views/layout.erb +0 -72
- data/app/views/layout_small.erb +0 -21
- data/app/views/stardate.erb +0 -5
- data/app/views/stardate_calc.erb +0 -30
- data/app/views/webobject.erb +0 -147
- data/lib/symbiont/data_setter.rb +0 -53
- data/lib/symbiont/enclosers.rb +0 -118
- data/lib/symbiont/evaluators.rb +0 -92
- data/lib/symbiont/generators.rb +0 -331
- data/lib/symbiont/locators.rb +0 -43
- data/lib/symbiont/logger.rb +0 -5
- data/lib/symbiont/platform_watir/platform_object.rb +0 -466
- data/lib/symbiont/platform_watir.rb +0 -9
- data/lib/symbiont/platforms.rb +0 -23
- data/lib/symbiont/web_objects/_common.rb +0 -174
- data/lib/symbiont/web_objects/button.rb +0 -22
- data/lib/symbiont/web_objects/checkbox.rb +0 -31
- data/lib/symbiont/web_objects/div.rb +0 -15
- data/lib/symbiont/web_objects/heading.rb +0 -12
- data/lib/symbiont/web_objects/hidden_field.rb +0 -19
- data/lib/symbiont/web_objects/label.rb +0 -15
- data/lib/symbiont/web_objects/link.rb +0 -23
- data/lib/symbiont/web_objects/list_item.rb +0 -13
- data/lib/symbiont/web_objects/option.rb +0 -10
- data/lib/symbiont/web_objects/ordered_list.rb +0 -49
- data/lib/symbiont/web_objects/paragraph.rb +0 -11
- data/lib/symbiont/web_objects/radio.rb +0 -31
- data/lib/symbiont/web_objects/select_list.rb +0 -82
- data/lib/symbiont/web_objects/span.rb +0 -15
- data/lib/symbiont/web_objects/table.rb +0 -71
- data/lib/symbiont/web_objects/table_cell.rb +0 -24
- data/lib/symbiont/web_objects/table_row.rb +0 -59
- data/lib/symbiont/web_objects/text_area.rb +0 -26
- data/lib/symbiont/web_objects/text_field.rb +0 -31
- data/lib/symbiont/web_objects/unordered_list.rb +0 -49
- data/lib/symbiont/web_objects.rb +0 -22
- data/lucid.yml +0 -6
- data/spec/symbiont/data_setter_spec.rb +0 -65
- data/spec/symbiont/enclosers_spec.rb +0 -76
- data/spec/symbiont/evaluators_spec.rb +0 -95
- data/spec/symbiont/generators/button_generators_spec.rb +0 -72
- data/spec/symbiont/generators/checkbox_generators_spec.rb +0 -79
- data/spec/symbiont/generators/div_generators_spec.rb +0 -56
- data/spec/symbiont/generators/hidden_field_generators_spec.rb +0 -65
- data/spec/symbiont/generators/link_generators_spec.rb +0 -62
- data/spec/symbiont/generators/paragraph_generators_spec.rb +0 -57
- data/spec/symbiont/generators/radio_generators_spec.rb +0 -76
- data/spec/symbiont/generators/select_list_generators_spec.rb +0 -93
- data/spec/symbiont/generators/span_generators_spec.rb +0 -56
- data/spec/symbiont/generators/table_cell_generators_spec.rb +0 -56
- data/spec/symbiont/generators/table_generators_spec.rb +0 -56
- data/spec/symbiont/generators/text_area_generators_spec.rb +0 -72
- data/spec/symbiont/generators/text_field_generators_spec.rb +0 -72
- data/spec/symbiont/generators_spec.rb +0 -59
- data/spec/symbiont/locators_spec.rb +0 -68
- data/spec/symbiont/platform_object_spec.rb +0 -18
- data/spec/symbiont/symbiont_spec.rb +0 -29
- data/spec/symbiont/web_object_spec.rb +0 -194
- data/spec/symbiont/web_objects/button_spec.rb +0 -38
- data/spec/symbiont/web_objects/checkbox_spec.rb +0 -27
- data/spec/symbiont/web_objects/div_spec.rb +0 -18
- data/spec/symbiont/web_objects/heading_spec.rb +0 -22
- data/spec/symbiont/web_objects/hidden_field_spec.rb +0 -18
- data/spec/symbiont/web_objects/label_spec.rb +0 -18
- data/spec/symbiont/web_objects/link_spec.rb +0 -33
- data/spec/symbiont/web_objects/list_item_spec.rb +0 -18
- data/spec/symbiont/web_objects/option_spec.rb +0 -9
- data/spec/symbiont/web_objects/ordered_list_spec.rb +0 -53
- data/spec/symbiont/web_objects/paragraph_spec.rb +0 -18
- data/spec/symbiont/web_objects/radio_spec.rb +0 -27
- data/spec/symbiont/web_objects/select_list_spec.rb +0 -69
- data/spec/symbiont/web_objects/span_spec.rb +0 -18
- data/spec/symbiont/web_objects/table_cell_spec.rb +0 -19
- data/spec/symbiont/web_objects/table_row_spec.rb +0 -58
- data/spec/symbiont/web_objects/table_spec.rb +0 -61
- data/spec/symbiont/web_objects/text_area_spec.rb +0 -18
- data/spec/symbiont/web_objects/text_field_spec.rb +0 -39
- data/spec/symbiont/web_objects/unordered_list_spec.rb +0 -51
- data/specs/common/support/browser.rb +0 -25
- data/specs/common/support/env.rb +0 -6
- data/specs/common/support/events.rb +0 -15
- data/specs/enclosers.feature +0 -9
- data/specs/evaluators.feature +0 -26
- data/specs/pages/characters.rb +0 -22
- data/specs/pages/home.rb +0 -9
- data/specs/pages/stardate.rb +0 -23
- data/specs/pages/web_objects.rb +0 -77
- data/specs/select_list.feature +0 -53
- data/specs/steps/enclosers_steps.rb +0 -17
- data/specs/steps/evaluators_steps.rb +0 -44
- data/specs/steps/navigation_steps.rb +0 -14
- data/specs/steps/select_list_steps.rb +0 -94
- data/specs/steps/table_cell_steps.rb +0 -31
- data/specs/steps/table_steps.rb +0 -87
- data/specs/table.feature +0 -49
- data/specs/table_cell.feature +0 -27
data/specs/steps/table_steps.rb
DELETED
@@ -1,87 +0,0 @@
|
|
1
|
-
When(/^looking at the basic data table$/) do
|
2
|
-
@data_table = @active.publishers_table
|
3
|
-
end
|
4
|
-
|
5
|
-
When(/^the comic characters table is searched for by "(.*?)"$/) do |identifier|
|
6
|
-
@find_by = identifier
|
7
|
-
end
|
8
|
-
|
9
|
-
Then(/^the comic characters table should exist$/) do
|
10
|
-
@active.characters_id_exists?.should == true
|
11
|
-
@active.characters_id?.should == true
|
12
|
-
end
|
13
|
-
|
14
|
-
Then(/^the comic characters table should be visible$/) do
|
15
|
-
@active.characters_id_visible?.should == true
|
16
|
-
@active.characters_id_?.should == true
|
17
|
-
end
|
18
|
-
|
19
|
-
Then(/^the comic characters table should be a table object$/) do
|
20
|
-
element = @active.characters_id_table
|
21
|
-
element.should be_instance_of Symbiont::WebObjects::Table
|
22
|
-
end
|
23
|
-
|
24
|
-
Then(/^it can be confirmed that the "(.*?)" of "(.*?)" is "(.*?)"$/) do |column, row, value|
|
25
|
-
#@active.characters_id_table[row][column].text.should == value
|
26
|
-
|
27
|
-
@element = @active.send "characters_#{@find_by}_table"
|
28
|
-
@element[row][column].text.should == value
|
29
|
-
end
|
30
|
-
|
31
|
-
Then(/^the data for row "(.*?)" should be "(.*?)", "(.*?)" and "(.*?)"$/) do |row, val1, val2, val3|
|
32
|
-
row = (row.to_i - 1) if row.to_i > 0
|
33
|
-
#table_row = @active.publishers_table[row]
|
34
|
-
table_row = @data_table[row]
|
35
|
-
table_row[0].text.should == val1
|
36
|
-
table_row[1].text.should == val2
|
37
|
-
table_row[2].text.should == val3
|
38
|
-
end
|
39
|
-
|
40
|
-
Then(/^the data for the first row should be "(.*?)", "(.*?)" and "(.*?)"$/) do |val1, val2, val3|
|
41
|
-
@data_table.first_row[0].text.should == val1
|
42
|
-
@data_table.first_row[1].text.should == val2
|
43
|
-
@data_table.first_row[2].text.should == val3
|
44
|
-
end
|
45
|
-
|
46
|
-
Then(/^the data for the last row should be "(.*?)", "(.*?)" and "(.*?)"$/) do |val1, val2, val3|
|
47
|
-
@data_table.last_row[0].text.should == val1
|
48
|
-
@data_table.last_row[1].text.should == val2
|
49
|
-
@data_table.last_row[2].text.should == val3
|
50
|
-
end
|
51
|
-
|
52
|
-
Then(/^the table should have "(.*?)" rows$/) do |rows|
|
53
|
-
@data_table.rows.should == rows.to_i
|
54
|
-
end
|
55
|
-
|
56
|
-
Then(/^row "(.*?)" should have "(.*?)" columns$/) do |row, cols|
|
57
|
-
@data_table[row.to_i - 1].columns.should == cols.to_i
|
58
|
-
end
|
59
|
-
|
60
|
-
Then(/^each row should contain text$/) do
|
61
|
-
@data_table.each do |row|
|
62
|
-
#row.text.should include text
|
63
|
-
row.text.should match /.*/
|
64
|
-
end
|
65
|
-
end
|
66
|
-
|
67
|
-
Then(/^each column should contain text$/) do
|
68
|
-
row = @data_table[0]
|
69
|
-
row.each do |column|
|
70
|
-
#column.text.should include text
|
71
|
-
column.text.should match /.*/
|
72
|
-
end
|
73
|
-
end
|
74
|
-
|
75
|
-
Then(/^the "(.*?)" of "(.*?)" should be "(.*?)"$/) do |header, item, value|
|
76
|
-
puts "Data Table #{@data_table}"
|
77
|
-
@data_table[item][header].text.should == value
|
78
|
-
#@active.publishers_table["DC"]["Publisher"].text.should == text
|
79
|
-
end
|
80
|
-
|
81
|
-
Then(/^the data for column "(.*?)" and row "(.*?)" should be unavailable$/) do |col, row|
|
82
|
-
@data_table[row][col].should be_nil
|
83
|
-
end
|
84
|
-
|
85
|
-
Then(/^the data for row "(.*?)" should be unavailable$/) do |row|
|
86
|
-
@data_table[row].should be_nil
|
87
|
-
end
|
data/specs/table.feature
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
Feature: Work with table objects
|
2
|
-
|
3
|
-
Background:
|
4
|
-
Given the comic characters page
|
5
|
-
|
6
|
-
Scenario: Checking the state of tables
|
7
|
-
* the comic characters table should exist
|
8
|
-
* the comic characters table should be visible
|
9
|
-
* the comic characters table should be a table object
|
10
|
-
|
11
|
-
Scenario Outline: Finding a select list on the page
|
12
|
-
When the comic characters table is searched for by "<identifier>"
|
13
|
-
Then it can be confirmed that the "Identity" of "Parallax" is "Hal Jordan"
|
14
|
-
|
15
|
-
# Name will be added to the list when Symbiont can handle turning the
|
16
|
-
# :name locator into a :tag_name reference.
|
17
|
-
|
18
|
-
Scenarios:
|
19
|
-
| identifier |
|
20
|
-
| id |
|
21
|
-
| class |
|
22
|
-
| xpath |
|
23
|
-
| index |
|
24
|
-
|
25
|
-
Scenario: Collect information from a table, by row number
|
26
|
-
When looking at the basic data table
|
27
|
-
Then the data for row "2" should be "DC", "1934" and "National Allied Publications"
|
28
|
-
And the data for row "3" should be "Marvel", "1939" and "Timely Publications"
|
29
|
-
And the data for the first row should be "Publisher", "Founded" and "Original Name"
|
30
|
-
And the data for the last row should be "Marvel", "1939" and "Timely Publications"
|
31
|
-
|
32
|
-
Scenario: Collect row and column information from a table
|
33
|
-
When looking at the basic data table
|
34
|
-
And the table should have "3" rows
|
35
|
-
And row "1" should have "3" columns
|
36
|
-
And each row should contain text
|
37
|
-
And each column should contain text
|
38
|
-
|
39
|
-
Scenario: Collect information from a table by named column and row
|
40
|
-
When looking at the basic data table
|
41
|
-
Then the "Original Name" of "DC" should be "National Allied Publications"
|
42
|
-
|
43
|
-
Scenario: Information cannot be collected when there is invalid column information
|
44
|
-
When looking at the basic data table
|
45
|
-
Then the data for column "Owner" and row "Marvel" should be unavailable
|
46
|
-
|
47
|
-
Scenario: Information cannot be collected when there is invalid row information
|
48
|
-
When looking at the basic data table
|
49
|
-
Then the data for row "Dark Horse" should be unavailable
|
data/specs/table_cell.feature
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
Feature: Work with table cell objects
|
2
|
-
|
3
|
-
Background:
|
4
|
-
Given the comic characters page
|
5
|
-
|
6
|
-
Scenario: Checking the state of table cells
|
7
|
-
* the founded table entry for DC should exist
|
8
|
-
* the founded table entry for DC should be visible
|
9
|
-
* the founded table entry for DC should be a table cell object
|
10
|
-
|
11
|
-
Scenario: Get text from a table cell
|
12
|
-
* the founded table entry for DC should be "1934"
|
13
|
-
* the founded table entry for Marvel should be "1939"
|
14
|
-
|
15
|
-
Scenario Outline: Finding a table cell on the page
|
16
|
-
When the founded table entry for DC is searched for by "<identifier>"
|
17
|
-
Then it can be confirmed that the founded table entry for DC should be "1934"
|
18
|
-
|
19
|
-
# Name will be added to the list when Symbiont can handle turning the
|
20
|
-
# :name locator into a :tag_name reference.
|
21
|
-
# Index will have to be determined based on all tables available.
|
22
|
-
|
23
|
-
Scenarios:
|
24
|
-
| identifier |
|
25
|
-
| id |
|
26
|
-
| class |
|
27
|
-
| xpath |
|