symbiont 0.0.4 → 0.1.0

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 (50) hide show
  1. data/HISTORY.md +6 -0
  2. data/cucumber.yml +1 -1
  3. data/lib/symbiont/generators.rb +279 -3
  4. data/lib/symbiont/platform_watir/platform_object.rb +217 -0
  5. data/lib/symbiont/version.rb +1 -1
  6. data/lib/symbiont/web_objects/_common.rb +22 -1
  7. data/lib/symbiont/web_objects/checkbox.rb +9 -0
  8. data/lib/symbiont/web_objects/div.rb +9 -0
  9. data/lib/symbiont/web_objects/radio.rb +9 -0
  10. data/lib/symbiont/web_objects/select_list.rb +9 -0
  11. data/lib/symbiont/web_objects/span.rb +9 -0
  12. data/lib/symbiont/web_objects/table.rb +38 -0
  13. data/lib/symbiont/web_objects/table_cell.rb +9 -0
  14. data/lib/symbiont/web_objects/table_row.rb +26 -0
  15. data/spec/spec_helper.rb +7 -0
  16. data/spec/symbiont/generators/cell_generators_spec.rb +52 -0
  17. data/spec/symbiont/generators/checkbox_generators_spec.rb +75 -0
  18. data/spec/symbiont/generators/div_generators_spec.rb +52 -0
  19. data/spec/symbiont/generators/radio_generators_spec.rb +78 -0
  20. data/spec/symbiont/generators/select_list_generators_spec.rb +77 -0
  21. data/spec/symbiont/generators/span_generators_spec.rb +52 -0
  22. data/spec/symbiont/generators/table_generators_spec.rb +45 -0
  23. data/spec/symbiont/web_object_spec.rb +20 -0
  24. data/spec/symbiont/web_objects/table_row_spec.rb +24 -0
  25. data/spec/symbiont/web_objects/table_spec.rb +33 -0
  26. data/specs/button.feature +22 -22
  27. data/specs/checkbox.feature +40 -0
  28. data/specs/definitions/pages.rb +88 -41
  29. data/specs/div.feature +11 -0
  30. data/specs/frame.feature +2 -2
  31. data/specs/link.feature +15 -15
  32. data/specs/radio.feature +38 -0
  33. data/specs/select_list.feature +38 -0
  34. data/specs/span.feature +11 -0
  35. data/specs/support/env.rb +2 -0
  36. data/specs/support/test_steps/action_steps_buttons.rb +67 -0
  37. data/specs/support/test_steps/action_steps_checkboxes.rb +75 -0
  38. data/specs/support/test_steps/action_steps_divs.rb +18 -0
  39. data/specs/support/test_steps/action_steps_frames.rb +13 -0
  40. data/specs/support/test_steps/action_steps_links.rb +41 -0
  41. data/specs/support/test_steps/action_steps_navigate.rb +15 -0
  42. data/specs/support/test_steps/action_steps_radios.rb +75 -0
  43. data/specs/support/test_steps/action_steps_select_lists.rb +72 -0
  44. data/specs/support/test_steps/action_steps_spans.rb +18 -0
  45. data/specs/support/test_steps/action_steps_tables.rb +69 -0
  46. data/specs/support/test_steps/action_steps_text_fields.rb +68 -0
  47. data/specs/table.feature +27 -0
  48. data/specs/text_field.feature +18 -18
  49. metadata +42 -9
  50. data/specs/support/test_steps/action_steps.rb +0 -207
@@ -0,0 +1,72 @@
1
+ When (/^"([^"]*)" is selected from physics concepts on the object test page$/) do |text|
2
+ step %{on the object test page}
3
+ @page.physicsConceptsID = text
4
+ end
5
+
6
+ When (/^the physics concepts on the object test page is selected by "([^"]*)"$/) do |locator|
7
+ option = "Tachyonic Antitravel"
8
+ @page = SimpleObjectPage.new(@browser, true)
9
+ @page.physicsConceptsID = option if locator == "id"
10
+ @page.physicsConceptsName = option if locator == "name"
11
+ @page.physicsConceptsClass = option if locator == "class"
12
+ @page.physicsConceptsXPath = option if locator == "xpath"
13
+ @page.physicsConceptsIndex = option if locator == "index"
14
+ end
15
+
16
+ Then (/^the physics concepts select list should exist$/) do
17
+ @page.physicsConceptsID_exists?.should == true
18
+ @page.physicsConceptsID?.should == true
19
+ end
20
+
21
+ Then (/^the physics concepts select list should be visible$/) do
22
+ @page.physicsConceptsID_visible?.should == true
23
+ @page.physicsConceptsID?.should == true
24
+ end
25
+
26
+ Then (/^the physics concepts select list should be enabled$/) do
27
+ @page.physicsConceptsID_enabled?.should == true
28
+ @page.physicsConceptsID!.should == true
29
+ end
30
+
31
+ Then (/^the physics concepts select list should be a select list object$/) do
32
+ @object = @page.physicsConceptsID_select_list
33
+ @object.should be_instance_of Symbiont::WebObjects::SelectList
34
+ end
35
+
36
+ Then (/^the physics concepts select list should have the second option selected$/) do
37
+ @page.physicsConceptsID_option?.should == "option2"
38
+ end
39
+
40
+ Then (/^the physics concepts select list should be displaying "([^"]*)"$/) do |text|
41
+ @page.physicsConceptsID.should == text
42
+ end
43
+
44
+ Then (/^the fake select list should not exist$/) do
45
+ @page.fake_select_list_exists?.should == false
46
+ end
47
+
48
+ Then (/^the fake select list should be a select list object$/) do
49
+ @object = @page.fake_select_list_object
50
+ @object.should be_instance_of Symbiont::WebObjects::SelectList
51
+ end
52
+
53
+ Then (/^the sith power select list should exist$/) do
54
+ @page.sithPowerID_exists?.should == true
55
+ end
56
+
57
+ Then (/^the sith power select list should be visible$/) do
58
+ @page.sithPowerID_visible?.should == true
59
+ end
60
+
61
+ Then (/^the sith power select list should be displaying "([^"]*)"$/) do |text|
62
+ @page.sithPowerID.should == text
63
+ end
64
+
65
+ Then (/^the sith power select list object should be a select list object$/) do
66
+ @object = @page.sithPowerID_object
67
+ @object.should be_instance_of Symbiont::WebObjects::SelectList
68
+ end
69
+
70
+ Then (/^the sith power select list should not be enabled$/) do
71
+ @page.sithPowerID_enabled?.should == false
72
+ end
@@ -0,0 +1,18 @@
1
+ Then (/^the span text should exist$/) do
2
+ @page.spanTextID_exists?.should == true
3
+ @page.spanTextID?.should == true
4
+ end
5
+
6
+ Then (/^the span text should be visible$/) do
7
+ @page.spanTextID_visible?.should == true
8
+ @page.spanTextID_?.should == true
9
+ end
10
+
11
+ Then (/^the span text should be a span object$/) do
12
+ @object = @page.spanTextID_span
13
+ @object.should be_instance_of Symbiont::WebObjects::Span
14
+ end
15
+
16
+ Then (/^the span text should be "([^"]*)"$/) do |text|
17
+ @page.spanTextID.should == text
18
+ end
@@ -0,0 +1,69 @@
1
+ When (/^getting information from the atomic elements table$/) do
2
+ step %{on the object test page}
3
+ @object = @page.atomicTable_table
4
+ end
5
+
6
+ Then (/^the atomic elements table should exist$/) do
7
+ @page.atomicTable_exists?.should == true
8
+ @page.atomicTable?.should == true
9
+ end
10
+
11
+ Then (/^the atomic elements table should be visible$/) do
12
+ @page.atomicTable_visible?.should == true
13
+ @page.atomicTable_?.should == true
14
+ end
15
+
16
+ Then (/^the atomic elements table should be a table object$/) do
17
+ @object = @page.atomicTable_table
18
+ @object.should be_instance_of Symbiont::WebObjects::Table
19
+ end
20
+
21
+ Then (/^the savings value cell for January should exist$/) do
22
+ @page.janSavings_exists?.should == true
23
+ @page.janSavings?.should == true
24
+ end
25
+
26
+ Then (/^the savings value cell for January should be visible$/) do
27
+ @page.janSavings_visible?.should == true
28
+ @page.janSavings_?.should == true
29
+ end
30
+
31
+ Then (/^the savings value cell for January should be a table cell object$/) do
32
+ @object = @page.janSavings_cell
33
+ @object.should be_instance_of Symbiont::WebObjects::TableCell
34
+ end
35
+
36
+ Then (/^the savings value cell for January should be "([^"]*)"$/) do |text|
37
+ @page.janSavings.should == text
38
+ end
39
+
40
+ Then (/^the savings value cell for February should be "([^"]*)"$/) do |text|
41
+ @page.febSavings.should == text
42
+ end
43
+
44
+ Then (/^the data for row "([^"]*)" should be "([^"]*)", "([^"]*)", and "([^"]*)"$/) do |row, col1, col2, col3|
45
+ table_row = @object[row.to_i - 1]
46
+ table_row[0].text.should == col1
47
+ table_row[1].text.should == col2
48
+ table_row[2].text.should == col3
49
+ end
50
+
51
+ Then (/^the atomic elements table should have "([^\"]*)" rows$/) do |rows|
52
+ @object.rows.should == rows.to_i
53
+ end
54
+
55
+ Then (/^row "([^\"]*)" should have "([^\"]*)" columns$/) do |row, cols|
56
+ @object[row.to_i - 1].columns.should == cols.to_i
57
+ end
58
+
59
+ Then (/^the data for the first row should be "([^"]*)", "([^"]*)", and "([^"]*)"$/) do |col1, col2, col3|
60
+ @object.first_row[0].text.should == col1
61
+ @object.first_row[1].text.should == col2
62
+ @object.first_row[2].text.should == col3
63
+ end
64
+
65
+ Then (/^the data for the last row should be "([^"]*)", "([^"]*)", and "([^"]*)"$/) do |col1, col2, col3|
66
+ @object.last_row[0].text.should == col1
67
+ @object.last_row[1].text.should == col2
68
+ @object.last_row[2].text.should == col3
69
+ end
@@ -0,0 +1,68 @@
1
+ When (/^the book title on the simple object test page is set to "([^"]*)"$/) do |text|
2
+ step %{on the object test page}
3
+ @page.bookTitleID = "Revelation Space"
4
+ end
5
+
6
+ When (/^the book title text field on the object test page is set by "([^"]*)"$/) do |locator|
7
+ title = "Revelation Space"
8
+ @page = SimpleObjectPage.new(@browser, true)
9
+ @page.bookTitleID = title if locator == "id"
10
+ @page.bookTitleName = title if locator == "name"
11
+ @page.bookTitleClass = title if locator == "class"
12
+ @page.bookTitleXPath = title if locator == "xpath"
13
+ @page.bookTitleIndex = title if locator == "index"
14
+ end
15
+
16
+ Then (/^the book title text field should exist$/) do
17
+ @page.bookTitleID_exists?.should == true
18
+ @page.bookTitleID?.should == true
19
+ end
20
+
21
+ Then (/^the book title text field should be visible$/) do
22
+ @page.bookTitleID_visible?.should == true
23
+ @page.bookTitleID_?.should == true
24
+ end
25
+
26
+ Then (/^the book title text field should be enabled$/) do
27
+ @page.bookTitleID_enabled?.should == true
28
+ @page.bookTitleID!.should == true
29
+ end
30
+
31
+ Then (/^the book title text field should be a text field object$/) do
32
+ @object = @page.bookTitleID_object
33
+ @object.should be_instance_of Symbiont::WebObjects::TextField
34
+ end
35
+
36
+ Then (/^the book title should be "([^"]*)"$/) do |text|
37
+ @page.bookTitleID.should == text
38
+ end
39
+
40
+ Then (/^the fake text field should not exist$/) do
41
+ @page.fake_text_field_exists?.should == false
42
+ end
43
+
44
+ Then (/^the fake text field should be a text field object$/) do
45
+ @object = @page.fake_text_field_object
46
+ @object.should be_instance_of Symbiont::WebObjects::TextField
47
+ end
48
+
49
+ Then (/^the book publisher ID text field should exist$/) do
50
+ @page.bookPubID_exists?.should == true
51
+ end
52
+
53
+ Then (/^the book publisher ID text field should be visible$/) do
54
+ @page.bookPubID_visible?.should == true
55
+ end
56
+
57
+ Then (/^the book publisher ID text field should not be enabled$/) do
58
+ @page.bookPubID_enabled?.should == false
59
+ end
60
+
61
+ Then (/^the text of the book publisher ID text field should be "([^"]*)"$/) do |text|
62
+ @page.bookPubID.should == text
63
+ end
64
+
65
+ Then (/^the book publisher ID text field object should be a text field object$/) do
66
+ @object = @page.bookPubID_object
67
+ @object.should be_instance_of Symbiont::WebObjects::TextField
68
+ end
@@ -0,0 +1,27 @@
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"
@@ -1,31 +1,31 @@
1
1
  Feature: Ability to Support Text Field Web Objects
2
-
2
+
3
3
  Scenario: Reference a text field
4
- When on the test page
4
+ When on the object test page
5
5
  Then the book title text field should exist
6
6
  And the book title text field should be visible
7
7
  And the book title text field should be enabled
8
- And the book title text field object should be usable
9
-
8
+ And the book title text field should be a text field object
9
+
10
10
  Scenario: Set text in a text field and get text from it
11
- When the book title on the test page is set to "Revelation Space"
11
+ When the book title on the simple object test page is set to "Revelation Space"
12
12
  Then the book title should be "Revelation Space"
13
-
14
- Scenario: A non-existent text field
15
- When on the test page
13
+
14
+ Scenario: Handling a non-existent text field
15
+ When on the object test page
16
16
  Then the fake text field should not exist
17
- But the fake text field object should be usable
18
-
19
- Scenario: A disabled text field
20
- When on the test page
21
- Then the disabled text field should exist
22
- And the disabled text field should be visible
23
- And the disabled text field should not be enabled
24
- And the text of the disabled text field should be "ESC:001678:FNC"
25
- But the disabled text field object should be usable
17
+ But the fake text field should be a text field object
18
+
19
+ Scenario: Handling a disabled text field
20
+ When on the object test page
21
+ Then the book publisher ID text field should exist
22
+ And the book publisher ID text field should be visible
23
+ And the text of the book publisher ID text field should be "ESC:001678:FNC"
24
+ And the book publisher ID text field object should be a text field object
25
+ But the book publisher ID text field should not be enabled
26
26
 
27
27
  Scenario Outline: Finding text fields with locators
28
- When the book title on the test page is set by "<locator>"
28
+ When the book title text field on the object test page is set by "<locator>"
29
29
  Then the book title should be "Revelation Space"
30
30
 
31
31
  Scenarios:
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.0.4
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-14 00:00:00.000000000Z
12
+ date: 2012-05-16 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &25920216 !ruby/object:Gem::Requirement
16
+ requirement: &26222412 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 2.9.0
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *25920216
24
+ version_requirements: *26222412
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: simplecov
27
- requirement: &25919832 !ruby/object:Gem::Requirement
27
+ requirement: &26222136 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 0.6.1
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *25919832
35
+ version_requirements: *26222136
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: watir-webdriver
38
- requirement: &25919460 !ruby/object:Gem::Requirement
38
+ requirement: &26221860 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - =
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: 0.5.3
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *25919460
46
+ version_requirements: *26221860
47
47
  description: An endosymbiotic facultative library for web application testing.
48
48
  email:
49
49
  - jeffnyman@gmail.com
@@ -69,27 +69,60 @@ files:
69
69
  - lib/symbiont/version.rb
70
70
  - lib/symbiont/web_objects/_common.rb
71
71
  - lib/symbiont/web_objects/button.rb
72
+ - lib/symbiont/web_objects/checkbox.rb
73
+ - lib/symbiont/web_objects/div.rb
72
74
  - lib/symbiont/web_objects/link.rb
75
+ - lib/symbiont/web_objects/radio.rb
76
+ - lib/symbiont/web_objects/select_list.rb
77
+ - lib/symbiont/web_objects/span.rb
78
+ - lib/symbiont/web_objects/table.rb
79
+ - lib/symbiont/web_objects/table_cell.rb
80
+ - lib/symbiont/web_objects/table_row.rb
73
81
  - lib/symbiont/web_objects/text_field.rb
74
82
  - spec/spec_helper.rb
75
83
  - spec/symbiont/enclosers_spec.rb
76
84
  - spec/symbiont/factory_spec.rb
77
85
  - spec/symbiont/generators/button_generators_spec.rb
86
+ - spec/symbiont/generators/cell_generators_spec.rb
87
+ - spec/symbiont/generators/checkbox_generators_spec.rb
88
+ - spec/symbiont/generators/div_generators_spec.rb
78
89
  - spec/symbiont/generators/link_generators_spec.rb
90
+ - spec/symbiont/generators/radio_generators_spec.rb
91
+ - spec/symbiont/generators/select_list_generators_spec.rb
92
+ - spec/symbiont/generators/span_generators_spec.rb
93
+ - spec/symbiont/generators/table_generators_spec.rb
79
94
  - spec/symbiont/generators/text_field_generators_spec.rb
80
95
  - spec/symbiont/generators_spec.rb
81
96
  - spec/symbiont/platform_object_spec.rb
82
97
  - spec/symbiont/symbiont_spec.rb
83
98
  - spec/symbiont/web_object_spec.rb
99
+ - spec/symbiont/web_objects/table_row_spec.rb
100
+ - spec/symbiont/web_objects/table_spec.rb
84
101
  - specs/button.feature
102
+ - specs/checkbox.feature
85
103
  - specs/definitions/pages.rb
104
+ - specs/div.feature
86
105
  - specs/frame.feature
87
106
  - specs/link.feature
107
+ - specs/radio.feature
108
+ - specs/select_list.feature
88
109
  - specs/simple_test.feature
110
+ - specs/span.feature
89
111
  - specs/support/env.rb
90
112
  - specs/support/hooks.rb
91
- - specs/support/test_steps/action_steps.rb
113
+ - specs/support/test_steps/action_steps_buttons.rb
114
+ - specs/support/test_steps/action_steps_checkboxes.rb
115
+ - specs/support/test_steps/action_steps_divs.rb
116
+ - specs/support/test_steps/action_steps_frames.rb
117
+ - specs/support/test_steps/action_steps_links.rb
118
+ - specs/support/test_steps/action_steps_navigate.rb
119
+ - specs/support/test_steps/action_steps_radios.rb
120
+ - specs/support/test_steps/action_steps_select_lists.rb
121
+ - specs/support/test_steps/action_steps_spans.rb
122
+ - specs/support/test_steps/action_steps_tables.rb
123
+ - specs/support/test_steps/action_steps_text_fields.rb
92
124
  - specs/support/test_steps/simple_test_steps.rb
125
+ - specs/table.feature
93
126
  - specs/text_field.feature
94
127
  - symbiont.gemspec
95
128
  homepage: https://github.com/jnyman/symbiont
@@ -1,207 +0,0 @@
1
- When (/^on the landing page$/) do
2
- @page = LandingPage.new(@browser, true)
3
- end
4
-
5
- When (/^on the test page$/) do
6
- @page = TestPage.new(@browser, true)
7
- end
8
-
9
- When (/^the test page link on the landing page is clicked$/) do
10
- step %{on the landing page}
11
- @page.static_test_page
12
- end
13
-
14
- When (/^the avengers link on the test page is clicked by "([^"]*)"$/) do |locator|
15
- @page = TestPage.new(@browser, true)
16
- @page.avengersID if locator == "id"
17
- @page.avengersName if locator == "name"
18
- @page.avengersClass if locator == "class"
19
- @page.avengersXPath if locator == "xpath"
20
- @page.avengersIndex if locator == "index"
21
- end
22
-
23
- When (/^the book title on the test page is set to "([^"]*)"$/) do |text|
24
- step %{on the test page}
25
- @page.book_title = "Revelation Space"
26
- end
27
-
28
- When (/^the book title on the test page is set by "([^"]*)"$/) do |locator|
29
- title = "Revelation Space"
30
- @page = TestPage.new(@browser, true)
31
- @page.bookTitleID = title if locator == "id"
32
- @page.bookTitleName = title if locator == "name"
33
- @page.bookTitleClass = title if locator == "class"
34
- @page.bookTitleXPath = title if locator == "xpath"
35
- @page.bookTitleIndex = title if locator == "index"
36
- end
37
-
38
- When (/^the login form on the login page is filled in with standard data$/) do
39
- @activity = LoggingIn.new(@browser)
40
- @activity.start
41
- @activity.clientCode = "Testing"
42
- @activity.loginName = "jnyman"
43
- @activity.loginPassword = "P@ssw0rd!"
44
- @activity.login
45
- end
46
-
47
- Then (/^the test page link should exist$/) do
48
- @page.static_test_page_exists?.should == true
49
- @page.static_test_page?.should == true
50
- end
51
-
52
- Then (/^the fake link should not exist$/) do
53
- @page.fake_link_exists?.should == false
54
- end
55
-
56
- Then (/^the test page link should be visible$/) do
57
- @page.static_test_page_visible?.should == true
58
- @page.static_test_page_?.should == true
59
- end
60
-
61
- Then (/^the text of the home page link should be "([^"]*)"$/) do |text|
62
- @page.test_app_text.should == text
63
- end
64
-
65
- Then (/^the test page link object should be usable$/) do
66
- @object = @page.static_test_page_link
67
- @object.should be_instance_of Symbiont::WebObjects::Link
68
- end
69
-
70
- Then (/^the fake page link object should be usable$/) do
71
- @object = @page.fake_link_object
72
- @object.should be_instance_of Symbiont::WebObjects::Link
73
- end
74
-
75
- Then (/^the click me button should exist$/) do
76
- @page.clickme_exists?.should == true
77
- @page.clickme?.should == true
78
- end
79
-
80
- Then (/^the click me button should be visible$/) do
81
- @page.clickme_visible?.should == true
82
- @page.clickme_?.should == true
83
- end
84
-
85
- Then (/^the click me button should be enabled$/) do
86
- @page.clickme_enabled?.should == true
87
- @page.clickme!.should == true
88
- end
89
-
90
- Then (/^the click me button object should be usable$/) do
91
- @object = @page.clickme_button
92
- @object.should be_instance_of Symbiont::WebObjects::Button
93
- end
94
-
95
- Then (/^the text of the click me button should be "([^"]*)"$/) do |text|
96
- @page.clickme_text.should == text
97
- end
98
-
99
- When (/^the click me button on the test page is clicked$/) do
100
- step %{on the test page}
101
- @page.clickme
102
- end
103
-
104
- When (/^the click me button on the test page is clicked by "([^"]*)"$/) do |locator|
105
- @page = TestPage.new(@browser, true)
106
- @page.clickmeID if locator == "id"
107
- @page.clickmeName if locator == "name"
108
- @page.clickmeClass if locator == "class"
109
- @page.clickmeXPath if locator == "xpath"
110
- @page.clickmeIndex if locator == "index"
111
- end
112
-
113
- Then (/^the fake button should not exist$/) do
114
- @page.fake_button_exists?.should == false
115
- end
116
-
117
- Then (/^the fake button object should be usable$/) do
118
- @object = @page.fake_button_object
119
- @object.should be_instance_of Symbiont::WebObjects::Button
120
- end
121
-
122
- Then (/^the disabled button should exist$/) do
123
- @page.disabled_button_exists?.should == true
124
- end
125
-
126
- Then (/^the disabled button should be visible$/) do
127
- @page.disabled_button_visible?.should == true
128
- end
129
-
130
- Then (/^the disabled button should not be enabled$/) do
131
- @page.disabled_button_enabled?.should == false
132
- end
133
-
134
- Then (/^the disabled button object should be usable$/) do
135
- @object = @page.disabled_button_object
136
- @object.should be_instance_of Symbiont::WebObjects::Button
137
- end
138
-
139
- Then (/^the text of the disabled button should be "([^"]*)"$/) do |text|
140
- @page.disabled_button_text.should == text
141
- end
142
-
143
- Then (/^the book title text field should exist$/) do
144
- @page.book_title_exists?.should == true
145
- @page.book_title?.should == true
146
- end
147
-
148
- Then (/^the book title text field should be visible$/) do
149
- @page.book_title_visible?.should == true
150
- @page.book_title_?.should == true
151
- end
152
-
153
- Then (/^the book title text field should be enabled$/) do
154
- @page.book_title_enabled?.should == true
155
- @page.book_title!.should == true
156
- end
157
-
158
- Then (/^the book title text field object should be usable$/) do
159
- @object = @page.book_title_object
160
- @object.should be_instance_of Symbiont::WebObjects::TextField
161
- end
162
-
163
- Then (/^the book title should be "([^"]*)"$/) do |text|
164
- @page.book_title.should == text
165
- end
166
-
167
- Then (/^the fake text field should not exist$/) do
168
- @page.fake_text_field_exists?.should == false
169
- end
170
-
171
- Then (/^the fake text field object should be usable$/) do
172
- @object = @page.fake_text_field_object
173
- @object.should be_instance_of Symbiont::WebObjects::TextField
174
- end
175
-
176
- Then (/^the disabled text field should exist$/) do
177
- @page.disabled_text_field_exists?.should == true
178
- end
179
-
180
- Then (/^the disabled text field should be visible$/) do
181
- @page.disabled_text_field_visible?.should == true
182
- end
183
-
184
- Then (/^the disabled text field should not be enabled$/) do
185
- @page.disabled_text_field_enabled?.should == false
186
- end
187
-
188
- Then (/^the text of the disabled text field should be "([^"]*)"$/) do |text|
189
- @page.disabled_text_field.should == text
190
- end
191
-
192
- Then (/^the disabled text field object should be usable$/) do
193
- @object = @page.disabled_text_field_object
194
- @object.should be_instance_of Symbiont::WebObjects::TextField
195
- end
196
-
197
- Then (/^the success page appears$/) do
198
- @browser.title.should == "Success Page: 1 | Test App"
199
- end
200
-
201
- Then (/^the static test page appears$/) do
202
- @browser.title.should == "Test Page | Test App"
203
- end
204
-
205
- Then (/^the entities page appears$/) do
206
- @browser.title.should == "Landing Page | Test App"
207
- end