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.
- data/HISTORY.md +6 -0
- data/cucumber.yml +1 -1
- data/lib/symbiont/generators.rb +279 -3
- data/lib/symbiont/platform_watir/platform_object.rb +217 -0
- data/lib/symbiont/version.rb +1 -1
- data/lib/symbiont/web_objects/_common.rb +22 -1
- data/lib/symbiont/web_objects/checkbox.rb +9 -0
- data/lib/symbiont/web_objects/div.rb +9 -0
- data/lib/symbiont/web_objects/radio.rb +9 -0
- data/lib/symbiont/web_objects/select_list.rb +9 -0
- data/lib/symbiont/web_objects/span.rb +9 -0
- data/lib/symbiont/web_objects/table.rb +38 -0
- data/lib/symbiont/web_objects/table_cell.rb +9 -0
- data/lib/symbiont/web_objects/table_row.rb +26 -0
- data/spec/spec_helper.rb +7 -0
- data/spec/symbiont/generators/cell_generators_spec.rb +52 -0
- data/spec/symbiont/generators/checkbox_generators_spec.rb +75 -0
- data/spec/symbiont/generators/div_generators_spec.rb +52 -0
- data/spec/symbiont/generators/radio_generators_spec.rb +78 -0
- data/spec/symbiont/generators/select_list_generators_spec.rb +77 -0
- data/spec/symbiont/generators/span_generators_spec.rb +52 -0
- data/spec/symbiont/generators/table_generators_spec.rb +45 -0
- data/spec/symbiont/web_object_spec.rb +20 -0
- data/spec/symbiont/web_objects/table_row_spec.rb +24 -0
- data/spec/symbiont/web_objects/table_spec.rb +33 -0
- data/specs/button.feature +22 -22
- data/specs/checkbox.feature +40 -0
- data/specs/definitions/pages.rb +88 -41
- data/specs/div.feature +11 -0
- data/specs/frame.feature +2 -2
- data/specs/link.feature +15 -15
- data/specs/radio.feature +38 -0
- data/specs/select_list.feature +38 -0
- data/specs/span.feature +11 -0
- data/specs/support/env.rb +2 -0
- data/specs/support/test_steps/action_steps_buttons.rb +67 -0
- data/specs/support/test_steps/action_steps_checkboxes.rb +75 -0
- data/specs/support/test_steps/action_steps_divs.rb +18 -0
- data/specs/support/test_steps/action_steps_frames.rb +13 -0
- data/specs/support/test_steps/action_steps_links.rb +41 -0
- data/specs/support/test_steps/action_steps_navigate.rb +15 -0
- data/specs/support/test_steps/action_steps_radios.rb +75 -0
- data/specs/support/test_steps/action_steps_select_lists.rb +72 -0
- data/specs/support/test_steps/action_steps_spans.rb +18 -0
- data/specs/support/test_steps/action_steps_tables.rb +69 -0
- data/specs/support/test_steps/action_steps_text_fields.rb +68 -0
- data/specs/table.feature +27 -0
- data/specs/text_field.feature +18 -18
- metadata +42 -9
- data/specs/support/test_steps/action_steps.rb +0 -207
data/specs/definitions/pages.rb
CHANGED
@@ -1,58 +1,105 @@
|
|
1
|
-
class LoggingIn
|
2
|
-
include Symbiont
|
3
|
-
begin_at "http://localhost:4567"
|
4
|
-
|
5
|
-
within_frame(id: "loginSection") do |frame|
|
6
|
-
text_field :clientCode, id: "clientCode", frame: frame
|
7
|
-
text_field :loginName, id: "loginName", frame: frame
|
8
|
-
text_field :loginPassword, id: "password", frame: frame
|
9
|
-
button :login, id: "btnSubmit", frame: frame
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
1
|
class LandingPage
|
14
2
|
include Symbiont
|
15
3
|
|
16
4
|
url_is "http://localhost:4567"
|
17
|
-
title_is "
|
18
|
-
look_for :
|
5
|
+
title_is "Landing Page | Test Application"
|
6
|
+
look_for :simple_object_page
|
19
7
|
|
20
|
-
link :
|
21
|
-
link :
|
22
|
-
link :fake_link, id: "
|
8
|
+
link :simple_object_page, id: "test_page"
|
9
|
+
link :database_app, id: "test_database"
|
10
|
+
link :fake_link, id: "fake_link"
|
23
11
|
end
|
24
12
|
|
25
|
-
class
|
13
|
+
class SimpleObjectPage
|
26
14
|
include Symbiont
|
27
|
-
|
15
|
+
|
28
16
|
url_is "http://localhost:4567/test_page"
|
29
|
-
title_is "
|
17
|
+
title_is "Simple Object Page | Test Application"
|
18
|
+
|
19
|
+
link :avengersID, id: "avengersID"
|
20
|
+
link :avengersName, name: "avengersName"
|
21
|
+
link :avengersClass, class: "avengersClass"
|
22
|
+
link :avengersXPath, xpath: "id('avengersID')"
|
23
|
+
link :avengersIndex, {id: "avengersID", index: 0}
|
24
|
+
|
25
|
+
button :clickmeID, id: "clickmeID"
|
26
|
+
button :clickmeName, name: "clickmeName"
|
27
|
+
button :clickmeClass, class: "clickmeClass"
|
28
|
+
button :clickmeXPath, xpath: "//input[@id='clickmeID']"
|
29
|
+
button :clickmeIndex, {id: "clickmeID", index: 0}
|
30
|
+
|
31
|
+
button :cantClickMeID, id: "cantclickmeID"
|
32
|
+
|
33
|
+
button :fake_button, id: "fake_button"
|
34
|
+
|
35
|
+
text_field :bookTitleID, id: "bookTitleID"
|
36
|
+
text_field :bookTitleName, name: "bookTitleName"
|
37
|
+
text_field :bookTitleClass, class: "bookTitleClass"
|
38
|
+
text_field :bookTitleXPath, xpath: "//input[@id='bookTitleID']"
|
39
|
+
text_field :bookTitleIndex, {id: "bookTitleID", index: 0}
|
30
40
|
|
31
|
-
|
32
|
-
|
33
|
-
link :avengersClass, class: "avengers_assemble_class"
|
34
|
-
link :avengersXPath, xpath: "id('avengers_assemble_id')"
|
35
|
-
link :avengersIndex, {id: "avengers_assemble_id", index: 0}
|
41
|
+
text_field :bookPubID, id: "bookPubID"
|
42
|
+
text_field :fake_text_field, id: "fake_text_field"
|
36
43
|
|
37
|
-
|
44
|
+
select_list :physicsConceptsID, id: "physicsConceptsID"
|
45
|
+
select_list :physicsConceptsName, name: "physicsConceptsName"
|
46
|
+
select_list :physicsConceptsClass, class: "physicsConceptsClass"
|
47
|
+
select_list :physicsConceptsXPath, xpath: "//select[@id='physicsConceptsID']"
|
48
|
+
select_list :physicsConceptsIndex, {id: "physicsConceptsID", index: 0}
|
38
49
|
|
39
|
-
|
40
|
-
|
41
|
-
button :clickmeClass, class: "clickme_class"
|
42
|
-
button :clickmeXPath, xpath: "//input[@id='clickme_id']"
|
43
|
-
button :clickmeIndex, {id: "clickme_id", index: 0}
|
50
|
+
select_list :sithPowerID, id: "sithPowerID"
|
51
|
+
select_list :fake_select_list, id: "fake_select_list"
|
44
52
|
|
45
|
-
|
46
|
-
button :disabled_button, id: "cantclickme_id"
|
53
|
+
checkbox :organicCircuitry, id: "organicCircuitryID"
|
47
54
|
|
48
|
-
|
55
|
+
checkbox :kineticHarpoonID, id: "kineticHarpoonID"
|
56
|
+
checkbox :kineticHarpoonName, name: "kineticHarpoonName"
|
57
|
+
checkbox :kineticHarpoonClass, class: "kineticHarpoonClass"
|
58
|
+
checkbox :kineticHarpoonXPath, xpath: "//input[@id='kineticHarpoonID']"
|
59
|
+
checkbox :kineticHarpoonIndex, {id: "kineticHarpoonID", index: 0}
|
49
60
|
|
50
|
-
|
51
|
-
|
52
|
-
text_field :bookTitleClass, class: "bookClass"
|
53
|
-
text_field :bookTitleXPath, xpath: "//input[@id='title']"
|
54
|
-
text_field :bookTitleIndex, {id: "title", index: 0}
|
61
|
+
checkbox :eigenstate, id: "eigenstateID"
|
62
|
+
checkbox :fake_checkbox, id: "fake_checkbox"
|
55
63
|
|
56
|
-
|
57
|
-
|
64
|
+
radio :warpCoreBreach, id: "wcbID"
|
65
|
+
|
66
|
+
radio :unstablePhaseShiftID, id: "upsID"
|
67
|
+
radio :unstablePhaseShiftName, name: "vaporize"
|
68
|
+
radio :unstablePhaseShiftClass, class: "upsClass"
|
69
|
+
radio :unstablePhaseShiftXPath, xpath: "//input[@id='upsID']"
|
70
|
+
radio :unstablePhaseShiftIndex, {id: "unstablePhaseShiftID", index: 3}
|
71
|
+
|
72
|
+
radio :fake_radio, id: "fake_radio"
|
73
|
+
radio :coronalMassEjection, id: "cmeID"
|
74
|
+
|
75
|
+
table :atomicTable, id: "atomicTableID"
|
76
|
+
|
77
|
+
table :savingsTableID, id: "savingsTableID"
|
78
|
+
table :savingsTableName, name: "savingsTableName"
|
79
|
+
table :savingsTableClass, class: "savingsTableClass"
|
80
|
+
table :savingsTableXPath, xpath: "id('savingsTableID')"
|
81
|
+
|
82
|
+
cell :janSavings, id: "jan_save"
|
83
|
+
cell :febSavings, id: "feb_save"
|
84
|
+
|
85
|
+
div :divTextID, id: "divTextID"
|
86
|
+
div :divTextName, name: "divTextName"
|
87
|
+
div :divTextClass, class: "divTextClass"
|
88
|
+
|
89
|
+
span :spanTextID, id: "spanTextID"
|
90
|
+
span :spanTextName, name: "spanTextName"
|
91
|
+
span :spanTextClass, class: "spanTextClass"
|
92
|
+
end
|
93
|
+
|
94
|
+
class LoggingIn
|
95
|
+
include Symbiont
|
96
|
+
begin_at "http://localhost:4567/test_database"
|
97
|
+
|
98
|
+
within_frame(id: "loginSection") do |frame|
|
99
|
+
text_field :server, id: "serverID", frame: frame
|
100
|
+
text_field :client, id: "clientID", frame: frame
|
101
|
+
text_field :loginName, id: "loginNameID", frame: frame
|
102
|
+
text_field :loginPassword, id: "passwordID", frame: frame
|
103
|
+
button :login, id: "btnSubmit", frame: frame
|
104
|
+
end
|
58
105
|
end
|
data/specs/div.feature
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
Feature: Ability to Support Div Web Objects
|
2
|
+
|
3
|
+
Scenario: Reference a div
|
4
|
+
When on the object test page
|
5
|
+
Then the div text should exist
|
6
|
+
And the div text should be visible
|
7
|
+
And the div text should be a div object
|
8
|
+
|
9
|
+
Scenario: Get text from a div
|
10
|
+
When on the object test page
|
11
|
+
Then the div text should be "This text is within a div tag."
|
data/specs/frame.feature
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
Feature: Ability to Support Frame Web Objects
|
2
2
|
|
3
3
|
Scenario: Access web objects within a frame
|
4
|
-
When the login form on the
|
5
|
-
Then the
|
4
|
+
When the login form on the database application is filled in with standard data
|
5
|
+
Then the entity list page appears
|
data/specs/link.feature
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
Feature: Ability to Support Link Web Objects
|
2
|
-
|
2
|
+
|
3
3
|
Scenario: Reference a link
|
4
4
|
When on the landing page
|
5
|
-
Then the
|
6
|
-
And the
|
7
|
-
And the
|
8
|
-
|
5
|
+
Then the database app link should exist
|
6
|
+
And the database app link should be visible
|
7
|
+
And the database app link should be a link object
|
8
|
+
|
9
9
|
Scenario: Get text from a link
|
10
10
|
When on the landing page
|
11
|
-
Then the text of the
|
12
|
-
|
11
|
+
Then the text of the object test page link should be "Simple Object Page"
|
12
|
+
|
13
13
|
Scenario: Click a link
|
14
|
-
When the test page link on the landing page is clicked
|
15
|
-
Then the
|
16
|
-
|
17
|
-
Scenario:
|
14
|
+
When the object test page link on the landing page is clicked
|
15
|
+
Then the simple object page appears
|
16
|
+
|
17
|
+
Scenario: Handling a non-existent link
|
18
18
|
When on the landing page
|
19
19
|
Then the fake link should not exist
|
20
|
-
But the fake
|
21
|
-
|
20
|
+
But the fake link should be a link object
|
21
|
+
|
22
22
|
Scenario Outline: Finding links with locators
|
23
|
-
When the avengers link on the test page is clicked by "<locator>"
|
24
|
-
Then the success page appears
|
23
|
+
When the avengers link on the object test page is clicked by "<locator>"
|
24
|
+
Then the first success page appears
|
25
25
|
|
26
26
|
Scenarios:
|
27
27
|
| locator |
|
data/specs/radio.feature
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
Feature: Ability to Support Radio Web Objects
|
2
|
+
|
3
|
+
Scenario: Reference a radio
|
4
|
+
When on the object test page
|
5
|
+
Then the warp core breach radio should exist
|
6
|
+
And the warp core breach radio should be visible
|
7
|
+
And the warp core breach radio should be enabled
|
8
|
+
And the warp core breach radio should be a radio object
|
9
|
+
|
10
|
+
Scenario: Modify radio and check state
|
11
|
+
When warp core breach is not selected as the least favorite way to vaporize
|
12
|
+
Then the warp core breach radio should not be set
|
13
|
+
When warp core breach is selected as the least favorite way to vaporize
|
14
|
+
Then the warp core breach radio should be set
|
15
|
+
|
16
|
+
Scenario: Handling a non-existent radio
|
17
|
+
When on the object test page
|
18
|
+
Then the fake radio should not exist
|
19
|
+
But the fake radio should be a radio object
|
20
|
+
|
21
|
+
Scenario: Handling a disabled radio
|
22
|
+
When on the object test page
|
23
|
+
Then the coronal mass ejection radio should exist
|
24
|
+
And the coronal mass ejection radio should be visible
|
25
|
+
And the coronal mass ejection radio should be a radio object
|
26
|
+
But the coronal mass ejection radio should not be enabled
|
27
|
+
|
28
|
+
Scenario Outline: Finding buttons with locators
|
29
|
+
When the unstable phase shift radio on the object test page is selected by "<locator>"
|
30
|
+
Then the unstable phase shift radio should be set
|
31
|
+
|
32
|
+
# Unable to run index
|
33
|
+
Scenarios:
|
34
|
+
| locator |
|
35
|
+
| id |
|
36
|
+
| name |
|
37
|
+
| class |
|
38
|
+
| xpath |
|
@@ -0,0 +1,38 @@
|
|
1
|
+
Feature: Ability to Support Select List Web Objects
|
2
|
+
|
3
|
+
Scenario: Reference a select list
|
4
|
+
When on the object test page
|
5
|
+
Then the physics concepts select list should exist
|
6
|
+
And the physics concepts select list should be visible
|
7
|
+
And the physics concepts select list should be enabled
|
8
|
+
And the physics concepts select list should be a select list object
|
9
|
+
|
10
|
+
Scenario: Select item in select list and get current selection from it
|
11
|
+
When "Tachyonic Antitravel" is selected from physics concepts on the object test page
|
12
|
+
Then the physics concepts select list should have the second option selected
|
13
|
+
And the physics concepts select list should be displaying "Tachyonic Antitravel"
|
14
|
+
|
15
|
+
Scenario: Handling a non-existent select list
|
16
|
+
When on the object test page
|
17
|
+
Then the fake select list should not exist
|
18
|
+
But the fake select list should be a select list object
|
19
|
+
|
20
|
+
Scenario: Handling a disabled select list
|
21
|
+
When on the object test page
|
22
|
+
Then the sith power select list should exist
|
23
|
+
And the sith power select list should be visible
|
24
|
+
And the sith power select list should be displaying "Force Lightning"
|
25
|
+
And the sith power select list object should be a select list object
|
26
|
+
But the sith power select list should not be enabled
|
27
|
+
|
28
|
+
Scenario Outline: Finding select lists with locators
|
29
|
+
When the physics concepts on the object test page is selected by "<locator>"
|
30
|
+
Then the physics concepts select list should be displaying "Tachyonic Antitravel"
|
31
|
+
|
32
|
+
Scenarios:
|
33
|
+
| locator |
|
34
|
+
| id |
|
35
|
+
| name |
|
36
|
+
| class |
|
37
|
+
| xpath |
|
38
|
+
| index |
|
data/specs/span.feature
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
Feature: Ability to Support Span Web Objects
|
2
|
+
|
3
|
+
Scenario: Reference a span
|
4
|
+
When on the object test page
|
5
|
+
Then the span text should exist
|
6
|
+
And the span text should be visible
|
7
|
+
And the span text should be a span object
|
8
|
+
|
9
|
+
Scenario: Get text from a span
|
10
|
+
When on the object test page
|
11
|
+
Then the span text should be "This text is within a span tag."
|
data/specs/support/env.rb
CHANGED
@@ -0,0 +1,67 @@
|
|
1
|
+
When (/^the click me button on the simple object test page is clicked$/) do
|
2
|
+
step %{on the object test page}
|
3
|
+
@page.clickmeID
|
4
|
+
end
|
5
|
+
|
6
|
+
When (/^the click me button on the object test page is clicked by "([^"]*)"$/) do |locator|
|
7
|
+
@page = SimpleObjectPage.new(@browser, true)
|
8
|
+
@page.clickmeID if locator == "id"
|
9
|
+
@page.clickmeName if locator == "name"
|
10
|
+
@page.clickmeClass if locator == "class"
|
11
|
+
@page.clickmeXPath if locator == "xpath"
|
12
|
+
@page.clickmeIndex if locator == "index"
|
13
|
+
end
|
14
|
+
|
15
|
+
Then (/^the click me button should exist$/) do
|
16
|
+
@page.clickmeID_exists?.should == true
|
17
|
+
@page.clickmeID?.should == true
|
18
|
+
end
|
19
|
+
|
20
|
+
Then (/^the can't click me button should exist$/) do
|
21
|
+
@page.cantClickMeID_exists?.should == true
|
22
|
+
end
|
23
|
+
|
24
|
+
Then (/^the click me button should be visible$/) do
|
25
|
+
@page.clickmeID_visible?.should == true
|
26
|
+
@page.clickmeID_?.should == true
|
27
|
+
end
|
28
|
+
|
29
|
+
Then (/^the can't click me button should be visible$/) do
|
30
|
+
@page.cantClickMeID_visible?.should == true
|
31
|
+
end
|
32
|
+
|
33
|
+
Then (/^the click me button should be enabled$/) do
|
34
|
+
@page.clickmeID_enabled?.should == true
|
35
|
+
@page.clickmeID!.should == true
|
36
|
+
end
|
37
|
+
|
38
|
+
Then (/^the can't click me button should not be enabled$/) do
|
39
|
+
@page.cantClickMeID_enabled?.should == false
|
40
|
+
end
|
41
|
+
|
42
|
+
Then (/^the click me button should be a button object$/) do
|
43
|
+
@object = @page.clickmeID_button
|
44
|
+
@object.should be_instance_of Symbiont::WebObjects::Button
|
45
|
+
end
|
46
|
+
|
47
|
+
Then (/^the can't click me button should be a button object$/) do
|
48
|
+
@object = @page.cantClickMeID_button
|
49
|
+
@object.should be_instance_of Symbiont::WebObjects::Button
|
50
|
+
end
|
51
|
+
|
52
|
+
Then (/^the text of the click me button should be "([^"]*)"$/) do |text|
|
53
|
+
@page.clickmeID_text.should == text
|
54
|
+
end
|
55
|
+
|
56
|
+
Then (/^the text of the can't click me button should be "([^"]*)"$/) do |text|
|
57
|
+
@page.cantClickMeID_text.should == text
|
58
|
+
end
|
59
|
+
|
60
|
+
Then (/^the fake button should not exist$/) do
|
61
|
+
@page.fake_button_exists?.should == false
|
62
|
+
end
|
63
|
+
|
64
|
+
Then (/^the fake button should be a button object$/) do
|
65
|
+
@object = @page.fake_button_object
|
66
|
+
@object.should be_instance_of Symbiont::WebObjects::Button
|
67
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
When (/^organic circuitry is not chosen as the futuristic technology$/) do
|
2
|
+
step %{on the object test page}
|
3
|
+
end
|
4
|
+
|
5
|
+
When (/^organic circuitry is chosen as the futuristic technology$/) do
|
6
|
+
step %{on the object test page}
|
7
|
+
@page.check_organicCircuitry
|
8
|
+
end
|
9
|
+
|
10
|
+
When (/^the kinetic harpoon checkbox on the object test page is checked by "([^"]*)"$/) do |locator|
|
11
|
+
@page = SimpleObjectPage.new(@browser, true)
|
12
|
+
@page.check_kineticHarpoonID if locator == "id"
|
13
|
+
@page.check_kineticHarpoonName if locator == "name"
|
14
|
+
@page.check_kineticHarpoonClass if locator == "class"
|
15
|
+
@page.check_kineticHarpoonXPath if locator == "xpath"
|
16
|
+
@page.check_kineticHarpoonIndex if locator == "index"
|
17
|
+
end
|
18
|
+
|
19
|
+
Then (/^the organic circuitry checkbox should exist$/) do
|
20
|
+
@page.organicCircuitry_exists?.should == true
|
21
|
+
@page.organicCircuitry?.should == true
|
22
|
+
end
|
23
|
+
|
24
|
+
Then (/^the organic circuitry checkbox should be visible$/) do
|
25
|
+
@page.organicCircuitry_visible?.should == true
|
26
|
+
@page.organicCircuitry_?.should == true
|
27
|
+
end
|
28
|
+
|
29
|
+
Then (/^the organic circuitry checkbox should be enabled$/) do
|
30
|
+
@page.organicCircuitry_enabled?.should == true
|
31
|
+
@page.organicCircuitry!.should == true
|
32
|
+
end
|
33
|
+
|
34
|
+
Then (/^the organic circuitry checkbox should be a checkbox object$/) do
|
35
|
+
@object = @page.organicCircuitry_checkbox
|
36
|
+
@object.should be_instance_of Symbiont::WebObjects::CheckBox
|
37
|
+
end
|
38
|
+
|
39
|
+
Then (/^the organic circuitry checkbox should be unchecked$/) do
|
40
|
+
@page.organicCircuitry_checked?.should == false
|
41
|
+
end
|
42
|
+
|
43
|
+
Then (/^the organic circuitry checkbox should be checked$/) do
|
44
|
+
@page.organicCircuitry_checked?.should == true
|
45
|
+
end
|
46
|
+
|
47
|
+
Then (/^the fake checkbox should not exist$/) do
|
48
|
+
@page.fake_checkbox_exists?.should == false
|
49
|
+
end
|
50
|
+
|
51
|
+
Then (/^the fake checkbox should be a checkbox object$/) do
|
52
|
+
@object = @page.fake_checkbox_checkbox
|
53
|
+
@object.should be_instance_of Symbiont::WebObjects::CheckBox
|
54
|
+
end
|
55
|
+
|
56
|
+
Then (/^the preferential eigenstate selector checkbox should exist$/) do
|
57
|
+
@page.eigenstate_exists?.should == true
|
58
|
+
end
|
59
|
+
|
60
|
+
Then (/^the preferential eigenstate selector checkbox should be visible$/) do
|
61
|
+
@page.eigenstate_visible?.should == true
|
62
|
+
end
|
63
|
+
|
64
|
+
Then (/^the preferential eigenstate selector checkbox should be a checkbox object$/) do
|
65
|
+
@object = @page.eigenstate_checkbox
|
66
|
+
@object.should be_instance_of Symbiont::WebObjects::CheckBox
|
67
|
+
end
|
68
|
+
|
69
|
+
Then (/^the preferential eigenstate selector checkbox should not be enabled$/) do
|
70
|
+
@page.eigenstate_enabled?.should == false
|
71
|
+
end
|
72
|
+
|
73
|
+
Then (/^the kinetic harpoon checkbox should be checked$/) do
|
74
|
+
@page.kineticHarpoonID_checked?.should == true
|
75
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
Then (/^the div text should exist$/) do
|
2
|
+
@page.divTextID_exists?.should == true
|
3
|
+
@page.divTextID?.should == true
|
4
|
+
end
|
5
|
+
|
6
|
+
Then (/^the div text should be visible$/) do
|
7
|
+
@page.divTextID_visible?.should == true
|
8
|
+
@page.divTextID_?.should == true
|
9
|
+
end
|
10
|
+
|
11
|
+
Then (/^the div text should be a div object$/) do
|
12
|
+
@object = @page.divTextID_div
|
13
|
+
@object.should be_instance_of Symbiont::WebObjects::Div
|
14
|
+
end
|
15
|
+
|
16
|
+
Then (/^the div text should be "([^"]*)"$/) do |text|
|
17
|
+
@page.divTextID.should == text
|
18
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
When /^the login form on the database application is filled in with standard data$/ do
|
2
|
+
@activity = LoggingIn.new(@browser)
|
3
|
+
@activity.start
|
4
|
+
@activity.server = "Staging"
|
5
|
+
@activity.client = "QA"
|
6
|
+
@activity.loginName = "jnyman"
|
7
|
+
@activity.loginPassword = "P@ssw0rd!"
|
8
|
+
@activity.login
|
9
|
+
end
|
10
|
+
|
11
|
+
Then /^the entity list page appears$/ do
|
12
|
+
@browser.title.should == "Entity List | Test Application"
|
13
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
When (/^the object test page link on the landing page is clicked$/) do
|
2
|
+
step %{on the landing page}
|
3
|
+
@page.simple_object_page
|
4
|
+
end
|
5
|
+
|
6
|
+
When (/^the avengers link on the object test page is clicked by "([^"]*)"$/) do |locator|
|
7
|
+
@page = SimpleObjectPage.new(@browser, true)
|
8
|
+
@page.avengersID if locator == "id"
|
9
|
+
@page.avengersName if locator == "name"
|
10
|
+
@page.avengersClass if locator == "class"
|
11
|
+
@page.avengersXPath if locator == "xpath"
|
12
|
+
@page.avengersIndex if locator == "index"
|
13
|
+
end
|
14
|
+
|
15
|
+
Then (/^the database app link should exist$/) do
|
16
|
+
@page.database_app_exists?.should == true
|
17
|
+
@page.database_app?.should == true
|
18
|
+
end
|
19
|
+
|
20
|
+
Then (/^the fake link should not exist$/) do
|
21
|
+
@page.fake_link_exists?.should == false
|
22
|
+
end
|
23
|
+
|
24
|
+
Then (/^the database app link should be visible$/) do
|
25
|
+
@page.database_app_visible?.should == true
|
26
|
+
@page.database_app_?.should == true
|
27
|
+
end
|
28
|
+
|
29
|
+
Then (/^the database app link should be a link object$/) do
|
30
|
+
@object = @page.database_app_link
|
31
|
+
@object.should be_instance_of Symbiont::WebObjects::Link
|
32
|
+
end
|
33
|
+
|
34
|
+
Then (/^the fake link should be a link object$/) do
|
35
|
+
@object = @page.fake_link_object
|
36
|
+
@object.should be_instance_of Symbiont::WebObjects::Link
|
37
|
+
end
|
38
|
+
|
39
|
+
Then (/^the text of the object test page link should be "([^"]*)"$/) do |text|
|
40
|
+
@page.simple_object_page_text.should == text
|
41
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
When (/^on the landing page$/) do
|
2
|
+
@page = LandingPage.new(@browser, true)
|
3
|
+
end
|
4
|
+
|
5
|
+
When (/^on the object test page$/) do
|
6
|
+
@page = SimpleObjectPage.new(@browser, true)
|
7
|
+
end
|
8
|
+
|
9
|
+
Then (/^the simple object page appears$/) do
|
10
|
+
@browser.title.should == "Simple Object Page | Test Application"
|
11
|
+
end
|
12
|
+
|
13
|
+
Then (/^the first success page appears$/) do
|
14
|
+
@browser.title.should == "Success 1 | Test Application"
|
15
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
When (/^warp core breach is not selected as the least favorite way to vaporize$/) do
|
2
|
+
step %{on the object test page}
|
3
|
+
end
|
4
|
+
|
5
|
+
When (/^warp core breach is selected as the least favorite way to vaporize$/) do
|
6
|
+
step %{on the object test page}
|
7
|
+
@page.set_warpCoreBreach
|
8
|
+
end
|
9
|
+
|
10
|
+
When (/^the unstable phase shift radio on the object test page is selected by "([^"]*)"$/) do |locator|
|
11
|
+
@page = SimpleObjectPage.new(@browser, true)
|
12
|
+
@page.set_unstablePhaseShiftID if locator == "id"
|
13
|
+
@page.set_unstablePhaseShiftName if locator == "name"
|
14
|
+
@page.set_unstablePhaseShiftClass if locator == "class"
|
15
|
+
@page.set_unstablePhaseShiftXPath if locator == "xpath"
|
16
|
+
@page.set_unstablePhaseShiftIndex if locator == "index"
|
17
|
+
end
|
18
|
+
|
19
|
+
Then (/^the warp core breach radio should exist$/) do
|
20
|
+
@page.warpCoreBreach_exists?.should == true
|
21
|
+
@page.warpCoreBreach?.should == true
|
22
|
+
end
|
23
|
+
|
24
|
+
Then (/^the warp core breach radio should be visible$/) do
|
25
|
+
@page.warpCoreBreach_visible?.should == true
|
26
|
+
@page.warpCoreBreach_?.should == true
|
27
|
+
end
|
28
|
+
|
29
|
+
Then (/^the warp core breach radio should be enabled$/) do
|
30
|
+
@page.warpCoreBreach_enabled?.should == true
|
31
|
+
@page.warpCoreBreach!.should == true
|
32
|
+
end
|
33
|
+
|
34
|
+
Then (/^the warp core breach radio should be a radio object$/) do
|
35
|
+
@object = @page.warpCoreBreach_radio
|
36
|
+
@object.should be_instance_of Symbiont::WebObjects::Radio
|
37
|
+
end
|
38
|
+
|
39
|
+
Then (/^the warp core breach radio should not be set$/) do
|
40
|
+
@page.warpCoreBreach_selected?.should == false
|
41
|
+
end
|
42
|
+
|
43
|
+
Then (/^the warp core breach radio should be set$/) do
|
44
|
+
@page.warpCoreBreach_selected?.should == true
|
45
|
+
end
|
46
|
+
|
47
|
+
Then (/^the fake radio should not exist$/) do
|
48
|
+
@page.fake_radio_exists?.should == false
|
49
|
+
end
|
50
|
+
|
51
|
+
Then (/^the fake radio should be a radio object$/) do
|
52
|
+
@object = @page.fake_radio_object
|
53
|
+
@object.should be_instance_of Symbiont::WebObjects::Radio
|
54
|
+
end
|
55
|
+
|
56
|
+
Then (/^the coronal mass ejection radio should exist$/) do
|
57
|
+
@page.coronalMassEjection_exists?.should == true
|
58
|
+
end
|
59
|
+
|
60
|
+
Then (/^the coronal mass ejection radio should be visible$/) do
|
61
|
+
@page.coronalMassEjection_visible?.should == true
|
62
|
+
end
|
63
|
+
|
64
|
+
Then (/^the coronal mass ejection radio should be a radio object$/) do
|
65
|
+
@object = @page.coronalMassEjection_radio
|
66
|
+
@object.should be_instance_of Symbiont::WebObjects::Radio
|
67
|
+
end
|
68
|
+
|
69
|
+
Then (/^the coronal mass ejection radio should not be enabled$/) do
|
70
|
+
@page.coronalMassEjection_enabled?.should == false
|
71
|
+
end
|
72
|
+
|
73
|
+
Then (/^the unstable phase shift radio should be set$/) do
|
74
|
+
@page.set_unstablePhaseShiftID
|
75
|
+
end
|