symbiont 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. data/Gemfile.lock +10 -39
  2. data/HISTORY.md +6 -0
  3. data/lib/symbiont.rb +8 -4
  4. data/lib/symbiont/enclosers.rb +4 -4
  5. data/lib/symbiont/evaluators.rb +22 -29
  6. data/lib/symbiont/generators.rb +82 -317
  7. data/lib/symbiont/platform_selenium.rb +18 -0
  8. data/lib/symbiont/platform_selenium/platform_object.rb +236 -0
  9. data/lib/symbiont/platform_selenium/web_objects/button.rb +13 -0
  10. data/lib/symbiont/platform_selenium/web_objects/checkbox.rb +21 -0
  11. data/lib/symbiont/platform_selenium/web_objects/common.rb +104 -0
  12. data/lib/symbiont/platform_selenium/web_objects/link.rb +13 -0
  13. data/lib/symbiont/platform_selenium/web_objects/radio.rb +21 -0
  14. data/lib/symbiont/platform_selenium/web_objects/select_list.rb +79 -0
  15. data/lib/symbiont/platform_selenium/web_objects/table.rb +40 -0
  16. data/lib/symbiont/platform_selenium/web_objects/table_row.rb +36 -0
  17. data/lib/symbiont/platform_selenium/web_objects/text_field.rb +14 -0
  18. data/lib/symbiont/platform_watir.rb +13 -4
  19. data/lib/symbiont/platform_watir/platform_object.rb +74 -262
  20. data/lib/symbiont/platform_watir/web_objects/checkbox.rb +21 -0
  21. data/lib/symbiont/platform_watir/web_objects/common.rb +82 -0
  22. data/lib/symbiont/platform_watir/web_objects/radio.rb +21 -0
  23. data/lib/symbiont/platform_watir/web_objects/select_list.rb +67 -0
  24. data/lib/symbiont/platform_watir/web_objects/table.rb +31 -0
  25. data/lib/symbiont/platform_watir/web_objects/table_row.rb +31 -0
  26. data/lib/symbiont/platform_watir/web_objects/text_field.rb +13 -0
  27. data/lib/symbiont/platforms.rb +18 -6
  28. data/lib/symbiont/version.rb +1 -1
  29. data/lib/symbiont/web_objects/_common.rb +53 -74
  30. data/lib/symbiont/web_objects/button.rb +23 -4
  31. data/lib/symbiont/web_objects/checkbox.rb +24 -10
  32. data/lib/symbiont/web_objects/div.rb +9 -1
  33. data/lib/symbiont/web_objects/link.rb +25 -4
  34. data/lib/symbiont/web_objects/paragraph.rb +11 -0
  35. data/lib/symbiont/web_objects/radio.rb +27 -1
  36. data/lib/symbiont/web_objects/select_list.rb +20 -56
  37. data/lib/symbiont/web_objects/span.rb +9 -1
  38. data/lib/symbiont/web_objects/table.rb +19 -22
  39. data/lib/symbiont/web_objects/table_cell.rb +17 -1
  40. data/lib/symbiont/web_objects/table_row.rb +18 -25
  41. data/lib/symbiont/web_objects/text_field.rb +27 -11
  42. data/symbiont.gemspec +3 -8
  43. metadata +29 -122
  44. data/app/Gemfile +0 -4
  45. data/app/app.rb +0 -181
  46. data/app/config/database.rb +0 -9
  47. data/app/models/plan.rb +0 -10
  48. data/app/models/product.rb +0 -10
  49. data/app/models/study.rb +0 -11
  50. data/app/models/user.rb +0 -13
  51. data/app/public/css/style.css +0 -138
  52. data/app/views/create_plan.erb +0 -21
  53. data/app/views/create_product.erb +0 -15
  54. data/app/views/create_study.erb +0 -24
  55. data/app/views/create_user.erb +0 -60
  56. data/app/views/db_plans.erb +0 -31
  57. data/app/views/db_products.erb +0 -29
  58. data/app/views/db_studies.erb +0 -33
  59. data/app/views/db_users.erb +0 -23
  60. data/app/views/entity_list.erb +0 -10
  61. data/app/views/index.erb +0 -8
  62. data/app/views/layout.erb +0 -39
  63. data/app/views/login_page.erb +0 -17
  64. data/app/views/success_1.erb +0 -2
  65. data/app/views/success_2.erb +0 -2
  66. data/app/views/test_database.erb +0 -13
  67. data/app/views/test_events.erb +0 -51
  68. data/app/views/test_login.erb +0 -53
  69. data/app/views/test_login_error.erb +0 -22
  70. data/app/views/test_login_success.erb +0 -22
  71. data/app/views/test_page.erb +0 -184
  72. data/specs/button.feature +0 -44
  73. data/specs/checkbox.feature +0 -40
  74. data/specs/data_setter.feature +0 -29
  75. data/specs/definitions/pages.rb +0 -156
  76. data/specs/div.feature +0 -11
  77. data/specs/evaluators.feature +0 -17
  78. data/specs/events.feature +0 -30
  79. data/specs/frame.feature +0 -5
  80. data/specs/link.feature +0 -42
  81. data/specs/locators.feature +0 -17
  82. data/specs/radio.feature +0 -38
  83. data/specs/select_list.feature +0 -50
  84. data/specs/simple_test.feature +0 -13
  85. data/specs/span.feature +0 -11
  86. data/specs/support/env.rb +0 -20
  87. data/specs/support/hooks.rb +0 -11
  88. data/specs/support/test_steps/action_steps_buttons.rb +0 -70
  89. data/specs/support/test_steps/action_steps_checkboxes.rb +0 -75
  90. data/specs/support/test_steps/action_steps_data_setter.rb +0 -56
  91. data/specs/support/test_steps/action_steps_divs.rb +0 -18
  92. data/specs/support/test_steps/action_steps_evaluators.rb +0 -15
  93. data/specs/support/test_steps/action_steps_events.rb +0 -77
  94. data/specs/support/test_steps/action_steps_frames.rb +0 -13
  95. data/specs/support/test_steps/action_steps_links.rb +0 -61
  96. data/specs/support/test_steps/action_steps_locators.rb +0 -44
  97. data/specs/support/test_steps/action_steps_navigate.rb +0 -25
  98. data/specs/support/test_steps/action_steps_radios.rb +0 -75
  99. data/specs/support/test_steps/action_steps_select_lists.rb +0 -106
  100. data/specs/support/test_steps/action_steps_spans.rb +0 -18
  101. data/specs/support/test_steps/action_steps_tables.rb +0 -82
  102. data/specs/support/test_steps/action_steps_text_fields.rb +0 -107
  103. data/specs/support/test_steps/action_steps_webobjects.rb +0 -31
  104. data/specs/support/test_steps/simple_test_steps.rb +0 -8
  105. data/specs/table.feature +0 -39
  106. data/specs/text_field.feature +0 -47
  107. 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
@@ -1,8 +0,0 @@
1
- When /^the (.*) scenario is executed$/ do |name|
2
- puts ("The #{name} scenario was started.")
3
- end
4
-
5
- Then /^a browser should be available$/ do
6
- @browser.nil?
7
- puts ("Browser (#{@browser}) appeared.")
8
- 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
@@ -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 |
@@ -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