symbiont 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +10 -39
- data/HISTORY.md +6 -0
- data/lib/symbiont.rb +8 -4
- data/lib/symbiont/enclosers.rb +4 -4
- data/lib/symbiont/evaluators.rb +22 -29
- data/lib/symbiont/generators.rb +82 -317
- data/lib/symbiont/platform_selenium.rb +18 -0
- data/lib/symbiont/platform_selenium/platform_object.rb +236 -0
- data/lib/symbiont/platform_selenium/web_objects/button.rb +13 -0
- data/lib/symbiont/platform_selenium/web_objects/checkbox.rb +21 -0
- data/lib/symbiont/platform_selenium/web_objects/common.rb +104 -0
- data/lib/symbiont/platform_selenium/web_objects/link.rb +13 -0
- data/lib/symbiont/platform_selenium/web_objects/radio.rb +21 -0
- data/lib/symbiont/platform_selenium/web_objects/select_list.rb +79 -0
- data/lib/symbiont/platform_selenium/web_objects/table.rb +40 -0
- data/lib/symbiont/platform_selenium/web_objects/table_row.rb +36 -0
- data/lib/symbiont/platform_selenium/web_objects/text_field.rb +14 -0
- data/lib/symbiont/platform_watir.rb +13 -4
- data/lib/symbiont/platform_watir/platform_object.rb +74 -262
- data/lib/symbiont/platform_watir/web_objects/checkbox.rb +21 -0
- data/lib/symbiont/platform_watir/web_objects/common.rb +82 -0
- data/lib/symbiont/platform_watir/web_objects/radio.rb +21 -0
- data/lib/symbiont/platform_watir/web_objects/select_list.rb +67 -0
- data/lib/symbiont/platform_watir/web_objects/table.rb +31 -0
- data/lib/symbiont/platform_watir/web_objects/table_row.rb +31 -0
- data/lib/symbiont/platform_watir/web_objects/text_field.rb +13 -0
- data/lib/symbiont/platforms.rb +18 -6
- data/lib/symbiont/version.rb +1 -1
- data/lib/symbiont/web_objects/_common.rb +53 -74
- data/lib/symbiont/web_objects/button.rb +23 -4
- data/lib/symbiont/web_objects/checkbox.rb +24 -10
- data/lib/symbiont/web_objects/div.rb +9 -1
- data/lib/symbiont/web_objects/link.rb +25 -4
- data/lib/symbiont/web_objects/paragraph.rb +11 -0
- data/lib/symbiont/web_objects/radio.rb +27 -1
- data/lib/symbiont/web_objects/select_list.rb +20 -56
- data/lib/symbiont/web_objects/span.rb +9 -1
- data/lib/symbiont/web_objects/table.rb +19 -22
- data/lib/symbiont/web_objects/table_cell.rb +17 -1
- data/lib/symbiont/web_objects/table_row.rb +18 -25
- data/lib/symbiont/web_objects/text_field.rb +27 -11
- data/symbiont.gemspec +3 -8
- metadata +29 -122
- data/app/Gemfile +0 -4
- data/app/app.rb +0 -181
- data/app/config/database.rb +0 -9
- data/app/models/plan.rb +0 -10
- data/app/models/product.rb +0 -10
- data/app/models/study.rb +0 -11
- data/app/models/user.rb +0 -13
- data/app/public/css/style.css +0 -138
- data/app/views/create_plan.erb +0 -21
- data/app/views/create_product.erb +0 -15
- data/app/views/create_study.erb +0 -24
- data/app/views/create_user.erb +0 -60
- data/app/views/db_plans.erb +0 -31
- data/app/views/db_products.erb +0 -29
- data/app/views/db_studies.erb +0 -33
- data/app/views/db_users.erb +0 -23
- data/app/views/entity_list.erb +0 -10
- data/app/views/index.erb +0 -8
- data/app/views/layout.erb +0 -39
- data/app/views/login_page.erb +0 -17
- data/app/views/success_1.erb +0 -2
- data/app/views/success_2.erb +0 -2
- data/app/views/test_database.erb +0 -13
- data/app/views/test_events.erb +0 -51
- data/app/views/test_login.erb +0 -53
- data/app/views/test_login_error.erb +0 -22
- data/app/views/test_login_success.erb +0 -22
- data/app/views/test_page.erb +0 -184
- data/specs/button.feature +0 -44
- data/specs/checkbox.feature +0 -40
- data/specs/data_setter.feature +0 -29
- data/specs/definitions/pages.rb +0 -156
- data/specs/div.feature +0 -11
- data/specs/evaluators.feature +0 -17
- data/specs/events.feature +0 -30
- data/specs/frame.feature +0 -5
- data/specs/link.feature +0 -42
- data/specs/locators.feature +0 -17
- data/specs/radio.feature +0 -38
- data/specs/select_list.feature +0 -50
- data/specs/simple_test.feature +0 -13
- data/specs/span.feature +0 -11
- data/specs/support/env.rb +0 -20
- data/specs/support/hooks.rb +0 -11
- data/specs/support/test_steps/action_steps_buttons.rb +0 -70
- data/specs/support/test_steps/action_steps_checkboxes.rb +0 -75
- data/specs/support/test_steps/action_steps_data_setter.rb +0 -56
- data/specs/support/test_steps/action_steps_divs.rb +0 -18
- data/specs/support/test_steps/action_steps_evaluators.rb +0 -15
- data/specs/support/test_steps/action_steps_events.rb +0 -77
- data/specs/support/test_steps/action_steps_frames.rb +0 -13
- data/specs/support/test_steps/action_steps_links.rb +0 -61
- data/specs/support/test_steps/action_steps_locators.rb +0 -44
- data/specs/support/test_steps/action_steps_navigate.rb +0 -25
- data/specs/support/test_steps/action_steps_radios.rb +0 -75
- data/specs/support/test_steps/action_steps_select_lists.rb +0 -106
- data/specs/support/test_steps/action_steps_spans.rb +0 -18
- data/specs/support/test_steps/action_steps_tables.rb +0 -82
- data/specs/support/test_steps/action_steps_text_fields.rb +0 -107
- data/specs/support/test_steps/action_steps_webobjects.rb +0 -31
- data/specs/support/test_steps/simple_test_steps.rb +0 -8
- data/specs/table.feature +0 -39
- data/specs/text_field.feature +0 -47
- data/specs/web_object.feature +0 -15
@@ -1,31 +0,0 @@
|
|
1
|
-
Then (/^the book title text field should not be read only$/) do
|
2
|
-
@web_object = @page.bookTitleID_object
|
3
|
-
@attr = @web_object.attribute('readonly')
|
4
|
-
@attr.should be_false if @attr.is_a? FalseClass
|
5
|
-
@attr.should == "false" if @attr.is_a? String
|
6
|
-
end
|
7
|
-
|
8
|
-
Then (/^the reference ID text field should be read only$/) do
|
9
|
-
@web_object = @page.bookRefID_object
|
10
|
-
@attr = @web_object.attribute('readonly')
|
11
|
-
@attr.should be_true if @attr.is_a? TrueClass
|
12
|
-
@attr.should == "true" if @attr.is_a? String
|
13
|
-
end
|
14
|
-
|
15
|
-
Then (/^the reference ID text field should have a black background$/) do
|
16
|
-
@web_object = @page.bookRefID_object
|
17
|
-
@style = @web_object.style('background-color')
|
18
|
-
@style.should == "rgba(0, 0, 0, 1)"
|
19
|
-
end
|
20
|
-
|
21
|
-
Then (/^the reference ID text field should have yellow text$/) do
|
22
|
-
@web_object = @page.bookRefID_object
|
23
|
-
@style = @web_object.style('color')
|
24
|
-
@style.should == "rgba(255, 255, 0, 1)"
|
25
|
-
end
|
26
|
-
|
27
|
-
Then (/^the book title text field should be an input field$/) do
|
28
|
-
@web_object = @page.bookTitleID_object
|
29
|
-
@tag = @web_object.tag
|
30
|
-
@tag.should == 'input'
|
31
|
-
end
|
data/specs/table.feature
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
Feature: Ability to Support Table Web Objects
|
2
|
-
|
3
|
-
Scenario: Reference a table
|
4
|
-
When on the object test page
|
5
|
-
Then the atomic elements table should exist
|
6
|
-
And the atomic elements table should be visible
|
7
|
-
And the atomic elements table should be a table object
|
8
|
-
|
9
|
-
Scenario: Reference a table cell
|
10
|
-
When on the object test page
|
11
|
-
Then the savings value cell for January should exist
|
12
|
-
And the savings value cell for January should be visible
|
13
|
-
And the savings value cell for January should be a table cell object
|
14
|
-
|
15
|
-
Scenario: Get text from a table cell
|
16
|
-
When on the object test page
|
17
|
-
Then the savings value cell for January should be "$100"
|
18
|
-
And the savings value cell for February should be "$80"
|
19
|
-
|
20
|
-
Scenario: Collect information from a table
|
21
|
-
When getting information from the atomic elements table
|
22
|
-
Then the data for row "1" should be "Element", "Symbol", and "Atomic Number"
|
23
|
-
And the data for row "2" should be "Carbon", "C", and "6"
|
24
|
-
And the atomic elements table should have "5" rows
|
25
|
-
And row "1" should have "3" columns
|
26
|
-
And the data for the first row should be "Element", "Symbol", and "Atomic Number"
|
27
|
-
And the data for the last row should be "Xenon", "Xe", and "54"
|
28
|
-
|
29
|
-
Scenario: Get information from a table by named column and row
|
30
|
-
When getting information from the atomic elements table
|
31
|
-
Then the symbol for carbon should be "C"
|
32
|
-
|
33
|
-
Scenario: Get information from a table with invalid row information
|
34
|
-
When getting information from the atomic elements table
|
35
|
-
Then the data for row "testing" should be unavailable
|
36
|
-
|
37
|
-
Scenario: Get information from a table with invalid column information
|
38
|
-
When getting information from the atomic elements table
|
39
|
-
Then the data for column "QA" and row "Element" should be unavailable
|
data/specs/text_field.feature
DELETED
@@ -1,47 +0,0 @@
|
|
1
|
-
Feature: Ability to Support Text Field Web Objects
|
2
|
-
|
3
|
-
Scenario: Reference a text field
|
4
|
-
When on the object test page
|
5
|
-
Then the book title text field should exist
|
6
|
-
And the book title text field should be visible
|
7
|
-
And the book title text field should be enabled
|
8
|
-
And the book title text field should be a text field object
|
9
|
-
|
10
|
-
Scenario: Set text in a text field and get text from it
|
11
|
-
When the book title on the simple object test page is set to "Revelation Space"
|
12
|
-
Then the book title should be "Revelation Space"
|
13
|
-
|
14
|
-
Scenario: Append text to a text field
|
15
|
-
When the book title on the simple object test page is set to "Absolution"
|
16
|
-
And the text " Gap" is added to the book title
|
17
|
-
Then the book title should be "Absolution Gap"
|
18
|
-
|
19
|
-
Scenario: Handling a non-existent text field
|
20
|
-
When on the object test page
|
21
|
-
Then the fake text field should not exist
|
22
|
-
And the fake text field should not be visible
|
23
|
-
But the fake text field should be a text field object
|
24
|
-
|
25
|
-
Scenario: Handling a disabled text field
|
26
|
-
When on the object test page
|
27
|
-
Then the book publisher ID text field should exist
|
28
|
-
And the book publisher ID text field should be visible
|
29
|
-
And the text of the book publisher ID text field should be "ESC:001678:FNC"
|
30
|
-
And the book publisher ID text field object should be a text field object
|
31
|
-
But the book publisher ID text field should not be enabled
|
32
|
-
|
33
|
-
Scenario: Handling a non-declared text field
|
34
|
-
When the book author on the simple object test page is set to "Alastair Reynolds"
|
35
|
-
Then the book author should be "Alastair Reynolds"
|
36
|
-
|
37
|
-
Scenario Outline: Finding text fields with locators
|
38
|
-
When the book title text field on the object test page is set by "<locator>"
|
39
|
-
Then the book title should be "Revelation Space"
|
40
|
-
|
41
|
-
Scenarios:
|
42
|
-
| locator |
|
43
|
-
| id |
|
44
|
-
| name |
|
45
|
-
| class |
|
46
|
-
| xpath |
|
47
|
-
| index |
|
data/specs/web_object.feature
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
Feature: Ability to Handle Generic Aspects of Web Objects
|
2
|
-
|
3
|
-
Scenario: Get the attribute of an object
|
4
|
-
When on the object test page
|
5
|
-
Then the book title text field should not be read only
|
6
|
-
And the reference ID text field should be read only
|
7
|
-
|
8
|
-
Scenario: Get a style of an object
|
9
|
-
When on the object test page
|
10
|
-
Then the reference ID text field should have a black background
|
11
|
-
And the reference ID text field should have yellow text
|
12
|
-
|
13
|
-
Scenario: Get the tag of an object
|
14
|
-
When on the object test page
|
15
|
-
Then the book title text field should be an input field
|