symbiont 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. data/.gitignore +1 -0
  2. data/.travis.yml +14 -0
  3. data/HISTORY.md +6 -0
  4. data/README.md +1 -1
  5. data/app/Gemfile +4 -0
  6. data/app/app.rb +167 -0
  7. data/app/config/database.rb +9 -0
  8. data/app/models/plan.rb +10 -0
  9. data/app/models/product.rb +10 -0
  10. data/app/models/study.rb +11 -0
  11. data/app/models/user.rb +13 -0
  12. data/app/public/css/style.css +138 -0
  13. data/app/views/create_plan.erb +21 -0
  14. data/app/views/create_product.erb +15 -0
  15. data/app/views/create_study.erb +24 -0
  16. data/app/views/create_user.erb +60 -0
  17. data/app/views/db_plans.erb +31 -0
  18. data/app/views/db_products.erb +29 -0
  19. data/app/views/db_studies.erb +33 -0
  20. data/app/views/db_users.erb +23 -0
  21. data/app/views/entity_list.erb +10 -0
  22. data/app/views/index.erb +7 -0
  23. data/app/views/layout.erb +39 -0
  24. data/app/views/login_page.erb +17 -0
  25. data/app/views/success_1.erb +2 -0
  26. data/app/views/success_2.erb +2 -0
  27. data/app/views/test_database.erb +13 -0
  28. data/app/views/test_events.erb +44 -0
  29. data/app/views/test_page.erb +164 -0
  30. data/lib/symbiont.rb +3 -0
  31. data/lib/symbiont/enclosers.rb +17 -0
  32. data/lib/symbiont/evaluators.rb +17 -0
  33. data/lib/symbiont/platform_watir/platform_object.rb +22 -2
  34. data/lib/symbiont/version.rb +1 -1
  35. data/lib/symbiont/web_objects/_common.rb +36 -1
  36. data/lib/symbiont/web_objects/table.rb +9 -0
  37. data/lib/symbiont/web_objects/table_row.rb +9 -0
  38. data/spec/symbiont/enclosers_spec.rb +5 -0
  39. data/spec/symbiont/evaluators_spec.rb +24 -0
  40. data/spec/symbiont/web_object_spec.rb +60 -2
  41. data/spec/symbiont/web_objects/table_row_spec.rb +9 -0
  42. data/spec/symbiont/web_objects/table_spec.rb +8 -0
  43. data/specs/button.feature +2 -0
  44. data/specs/definitions/pages.rb +17 -0
  45. data/specs/evaluators.feature +5 -0
  46. data/specs/events.feature +19 -0
  47. data/specs/link.feature +2 -0
  48. data/specs/support/test_steps/action_steps_buttons.rb +2 -0
  49. data/specs/support/test_steps/action_steps_evaluators.rb +3 -0
  50. data/specs/support/test_steps/action_steps_events.rb +40 -0
  51. data/specs/support/test_steps/action_steps_links.rb +2 -0
  52. data/specs/support/test_steps/action_steps_navigate.rb +4 -0
  53. data/specs/support/test_steps/action_steps_webobjects.rb +25 -0
  54. data/specs/web_object.feature +11 -0
  55. data/symbiont.gemspec +3 -3
  56. metadata +47 -13
@@ -10,6 +10,8 @@ When (/^the avengers link on the object test page is clicked by "([^"]*)"$/) do
10
10
  @page.avengersClass if locator == "class"
11
11
  @page.avengersXPath if locator == "xpath"
12
12
  @page.avengersIndex if locator == "index"
13
+ @page.avengersText if locator == "text"
14
+ @page.avengersHref if locator == "href"
13
15
  end
14
16
 
15
17
  Then (/^the database app link should exist$/) do
@@ -6,6 +6,10 @@ When (/^on the object test page$/) do
6
6
  @page = SimpleObjectPage.new(@browser, true)
7
7
  end
8
8
 
9
+ When (/^on the events test page$/) do
10
+ @page = SimpleEventsPage.new(@browser, true)
11
+ end
12
+
9
13
  Then (/^the simple object page appears$/) do
10
14
  @browser.title.should == "Simple Object Page | Test Application"
11
15
  end
@@ -0,0 +1,25 @@
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 == "rgb(0, 0, 0)"
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 == "rgb(255, 255, 0)"
25
+ end
@@ -0,0 +1,11 @@
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
@@ -20,8 +20,8 @@ Gem::Specification.new do |gem|
20
20
  gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
21
21
  gem.require_paths = ["lib"]
22
22
 
23
- gem.add_development_dependency 'rspec', '>= 2.9.0'
24
- gem.add_development_dependency 'simplecov', '>= 0.6.1'
23
+ gem.add_development_dependency('rspec', ['2.10.0'])
24
+ gem.add_development_dependency('simplecov', ['0.6.4'])
25
25
 
26
- gem.add_runtime_dependency 'watir-webdriver', '0.5.3'
26
+ gem.add_runtime_dependency('watir-webdriver', ['0.5.8'])
27
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: symbiont
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,41 +9,41 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-16 00:00:00.000000000Z
12
+ date: 2012-05-30 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &26222412 !ruby/object:Gem::Requirement
16
+ requirement: &26025348 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
- - - ! '>='
19
+ - - =
20
20
  - !ruby/object:Gem::Version
21
- version: 2.9.0
21
+ version: 2.10.0
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *26222412
24
+ version_requirements: *26025348
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: simplecov
27
- requirement: &26222136 !ruby/object:Gem::Requirement
27
+ requirement: &26024844 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
- - - ! '>='
30
+ - - =
31
31
  - !ruby/object:Gem::Version
32
- version: 0.6.1
32
+ version: 0.6.4
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *26222136
35
+ version_requirements: *26024844
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: watir-webdriver
38
- requirement: &26221860 !ruby/object:Gem::Requirement
38
+ requirement: &26024400 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - =
42
42
  - !ruby/object:Gem::Version
43
- version: 0.5.3
43
+ version: 0.5.8
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *26221860
46
+ version_requirements: *26024400
47
47
  description: An endosymbiotic facultative library for web application testing.
48
48
  email:
49
49
  - jeffnyman@gmail.com
@@ -52,14 +52,41 @@ extensions: []
52
52
  extra_rdoc_files: []
53
53
  files:
54
54
  - .gitignore
55
+ - .travis.yml
55
56
  - Gemfile
56
57
  - HISTORY.md
57
58
  - LICENSE
58
59
  - README.md
59
60
  - Rakefile
61
+ - app/Gemfile
62
+ - app/app.rb
63
+ - app/config/database.rb
64
+ - app/models/plan.rb
65
+ - app/models/product.rb
66
+ - app/models/study.rb
67
+ - app/models/user.rb
68
+ - app/public/css/style.css
69
+ - app/views/create_plan.erb
70
+ - app/views/create_product.erb
71
+ - app/views/create_study.erb
72
+ - app/views/create_user.erb
73
+ - app/views/db_plans.erb
74
+ - app/views/db_products.erb
75
+ - app/views/db_studies.erb
76
+ - app/views/db_users.erb
77
+ - app/views/entity_list.erb
78
+ - app/views/index.erb
79
+ - app/views/layout.erb
80
+ - app/views/login_page.erb
81
+ - app/views/success_1.erb
82
+ - app/views/success_2.erb
83
+ - app/views/test_database.erb
84
+ - app/views/test_events.erb
85
+ - app/views/test_page.erb
60
86
  - cucumber.yml
61
87
  - lib/symbiont.rb
62
88
  - lib/symbiont/enclosers.rb
89
+ - lib/symbiont/evaluators.rb
63
90
  - lib/symbiont/factory.rb
64
91
  - lib/symbiont/generators.rb
65
92
  - lib/symbiont/logger.rb
@@ -81,6 +108,7 @@ files:
81
108
  - lib/symbiont/web_objects/text_field.rb
82
109
  - spec/spec_helper.rb
83
110
  - spec/symbiont/enclosers_spec.rb
111
+ - spec/symbiont/evaluators_spec.rb
84
112
  - spec/symbiont/factory_spec.rb
85
113
  - spec/symbiont/generators/button_generators_spec.rb
86
114
  - spec/symbiont/generators/cell_generators_spec.rb
@@ -102,6 +130,8 @@ files:
102
130
  - specs/checkbox.feature
103
131
  - specs/definitions/pages.rb
104
132
  - specs/div.feature
133
+ - specs/evaluators.feature
134
+ - specs/events.feature
105
135
  - specs/frame.feature
106
136
  - specs/link.feature
107
137
  - specs/radio.feature
@@ -113,6 +143,8 @@ files:
113
143
  - specs/support/test_steps/action_steps_buttons.rb
114
144
  - specs/support/test_steps/action_steps_checkboxes.rb
115
145
  - specs/support/test_steps/action_steps_divs.rb
146
+ - specs/support/test_steps/action_steps_evaluators.rb
147
+ - specs/support/test_steps/action_steps_events.rb
116
148
  - specs/support/test_steps/action_steps_frames.rb
117
149
  - specs/support/test_steps/action_steps_links.rb
118
150
  - specs/support/test_steps/action_steps_navigate.rb
@@ -121,9 +153,11 @@ files:
121
153
  - specs/support/test_steps/action_steps_spans.rb
122
154
  - specs/support/test_steps/action_steps_tables.rb
123
155
  - specs/support/test_steps/action_steps_text_fields.rb
156
+ - specs/support/test_steps/action_steps_webobjects.rb
124
157
  - specs/support/test_steps/simple_test_steps.rb
125
158
  - specs/table.feature
126
159
  - specs/text_field.feature
160
+ - specs/web_object.feature
127
161
  - symbiont.gemspec
128
162
  homepage: https://github.com/jnyman/symbiont
129
163
  licenses: