watirloo 0.0.7 → 0.0.8
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/.gitignore +1 -0
- data/Rakefile +43 -18
- data/VERSION +1 -1
- data/_irbrc +37 -0
- data/lib/watirloo.rb +1 -2
- data/lib/watirloo/browsers.rb +9 -5
- data/lib/watirloo/extension/firewatir_ducktape.rb +66 -75
- data/lib/watirloo/extension/watir_ducktape.rb +0 -1
- data/lib/watirloo/locker.rb +15 -0
- data/lib/watirloo/screenshot.rb +50 -0
- data/spec/checkbox_group_spec.rb +9 -9
- data/spec/checkbox_groups_spec.rb +15 -16
- data/spec/ff.opts +14 -0
- data/spec/results/ff-failed.txt +0 -0
- data/spec/results/ff.html +409 -0
- data/spec/results/ff.txt +107 -0
- data/spec/{spec_results_failed.txt → results/ie-failed.txt} +0 -0
- data/spec/{spec_results.html → results/ie.html} +209 -229
- data/spec/{spec_results.txt → results/ie.txt} +64 -73
- data/spec/spec_helper.rb +4 -0
- data/watirloo.gemspec +11 -12
- metadata +11 -12
- data/spec/firewatir/attach_instance_test.rb +0 -38
- data/spec/firewatir/spec_results.html +0 -263
- data/spec/firewatir/spec_results.txt +0 -23
- data/spec/firewatir/spec_results_failed.txt +0 -3
- data/spec/label_spec.rb +0 -65
@@ -1,29 +1,33 @@
|
|
1
1
|
|
2
|
-
|
3
|
-
-
|
4
|
-
-
|
5
|
-
- should start second browser with a named keyword
|
6
|
-
- should attach to second browser with keyword and navigate to a testfile
|
7
|
-
- should attach to two distinct browsers by key values by kewords used to start them
|
8
|
-
|
9
|
-
Watirloo multiple browsers and threads
|
10
|
-
- open 5 new browsers in threads and add them to locker
|
11
|
-
- use locker to reattach to 5 browsers and load 5 diff pages at once
|
12
|
-
- reattach and close all 5 browsers
|
13
|
-
|
14
|
-
setting and getting values for individual checkboxes with value attributes in face definitions
|
15
|
-
- semantic name accesses individual CheckBox
|
16
|
-
- set individual checkbox does not set other checkboxes sharing the same name
|
17
|
-
|
18
|
-
checkbox_groups access for browser
|
19
|
-
- browser responds to checkbox_group
|
20
|
-
- returns group object and its values from the page
|
2
|
+
browser checkbox_groups method
|
3
|
+
- browser responds to checkbox_groups method
|
4
|
+
- returns CheckboxGroups object
|
21
5
|
- lenght returns integer count of groups
|
22
|
-
- each iterator returns CheckboxGroup
|
6
|
+
- each iterator returns CheckboxGroup object 4 times
|
23
7
|
- each accesses the group and returns name
|
24
8
|
- bracket access[] returns 1-based indexed group
|
25
|
-
-
|
26
|
-
|
9
|
+
- page should have 2 checkbox groups in form 2
|
10
|
+
|
11
|
+
SelectList selections
|
12
|
+
- selected returns preselected item in single select
|
13
|
+
- selected returns preselected value in single select
|
14
|
+
- selected returns nil for none selected items in multi select
|
15
|
+
- selected returns nil for none selected values in multi select
|
16
|
+
- set item text and find selected item and text for multiselect
|
17
|
+
- set value and find selected item and value for multiselect
|
18
|
+
- set and query option by text for single select
|
19
|
+
- set and query option by value for single select
|
20
|
+
- set by text multple items for multiselect selects each item
|
21
|
+
- set by value multple items for multiselect selects each item
|
22
|
+
- set items array for single select selects each in turn. selected is the last item in array
|
23
|
+
- set item after multiple items were set returns all values selected for multiselect
|
24
|
+
- set using position for multiselect
|
25
|
+
- set using position and item for multiselect
|
26
|
+
- set using position for single select
|
27
|
+
- clear removes selected attribute for all selected items in multiselect
|
28
|
+
- clear removes selected attribute for item in single select list (FAILED - 1)
|
29
|
+
- set_value selects value atribute text
|
30
|
+
- set_value for multiselect returns selected and selected_values
|
27
31
|
|
28
32
|
browser checkbox_group accesses a group of checkboxes sharing the same name on a page
|
29
33
|
- browser responds to checkbox_group
|
@@ -53,6 +57,29 @@ checkbox_group set by numberical position
|
|
53
57
|
- set Fixnum checks checkbox by position in a group. Position is 1 based.
|
54
58
|
- set array of Fixnums checks each checkbox by position
|
55
59
|
|
60
|
+
Page class with face definitions
|
61
|
+
- has face method as singleton
|
62
|
+
- face class method defines method
|
63
|
+
- face accepts args used by method body
|
64
|
+
- when optional args not supplied provide default arg in method
|
65
|
+
|
66
|
+
Page faces included in rspec
|
67
|
+
- face defines a watir element access
|
68
|
+
- faces with arguments
|
69
|
+
|
70
|
+
Page doc provides access to frame in frameset browser
|
71
|
+
- face defines a watir element access
|
72
|
+
- faces with arguments
|
73
|
+
|
74
|
+
Locker
|
75
|
+
- locker file does not exist. create it. mapping should return empty hash
|
76
|
+
- clear should create locker file and save empty mapping
|
77
|
+
- add stores ie.hwnd with friendly name and adds it to mapping
|
78
|
+
- mapping holds what was added
|
79
|
+
- remove deletes a key value record
|
80
|
+
- browser reattaches to named browser based on windows handle
|
81
|
+
- browser attach to nonexisting windows behaves like IE.attach, it raises error
|
82
|
+
|
56
83
|
Watirloo Desktop
|
57
84
|
- clear closes all browsers on the desktop and browsers should be empty
|
58
85
|
- adding first browser should report 1 addition and no deletions
|
@@ -69,36 +96,16 @@ Mystery input element
|
|
69
96
|
- the label points to text_field
|
70
97
|
- the id should return select_list
|
71
98
|
|
72
|
-
|
73
|
-
-
|
74
|
-
-
|
75
|
-
-
|
76
|
-
|
77
|
-
|
78
|
-
- text value of label
|
79
|
-
|
80
|
-
Locker
|
81
|
-
- locker file does not exist. create it. mapping should return empty hash
|
82
|
-
- clear should create locker file and save empty mapping
|
83
|
-
- add stores ie.hwnd with friendly name and adds it to mapping
|
84
|
-
- mapping holds what was added
|
85
|
-
- remove deletes a key value record
|
86
|
-
- browser reattaches to named browser based on windows handle
|
87
|
-
- browser attach to nonexisting windows behaves like IE.attach, it raises error
|
88
|
-
|
89
|
-
Page class with face definitions
|
90
|
-
- has face method as singleton
|
91
|
-
- face class method defines method
|
92
|
-
- face accepts args used by method body
|
93
|
-
- when optional args not supplied provide default arg in method
|
94
|
-
|
95
|
-
Page faces included in rspec
|
96
|
-
- face defines a watir element access
|
97
|
-
- faces with arguments
|
99
|
+
Watirloo browser when no browsers on desktop nor in locker
|
100
|
+
- should start a default new browser and load a testfile
|
101
|
+
- should attach to a default browser with loaded testfile and return its title
|
102
|
+
- should start second browser with a named keyword
|
103
|
+
- should attach to second browser with keyword and navigate to a testfile
|
104
|
+
- should attach to two distinct browsers by key values by kewords used to start them
|
98
105
|
|
99
|
-
|
100
|
-
-
|
101
|
-
-
|
106
|
+
setting and getting values for individual checkboxes with value attributes in face definitions
|
107
|
+
- semantic name accesses individual CheckBox
|
108
|
+
- set individual checkbox does not set other checkboxes sharing the same name
|
102
109
|
|
103
110
|
Person Page interfaces defined by def wrappers and class definitions
|
104
111
|
- calling face when there is wrapper method
|
@@ -130,26 +137,10 @@ RadioGroup class interface in watirloo
|
|
130
137
|
- set value throws exception if value not found in options
|
131
138
|
- set throws exception if sybmol is used. it should accept Fixnum or String element only
|
132
139
|
|
133
|
-
|
134
|
-
-
|
135
|
-
-
|
136
|
-
-
|
137
|
-
- selected returns nil for none selected values in multi select
|
138
|
-
- set item text and find selected item and text for multiselect
|
139
|
-
- set value and find selected item and value for multiselect
|
140
|
-
- set and query option by text for single select
|
141
|
-
- set and query option by value for single select
|
142
|
-
- set by text multple items for multiselect selects each item
|
143
|
-
- set by value multple items for multiselect selects each item
|
144
|
-
- set items array for single select selects each in turn. selected is the last item in array
|
145
|
-
- set item after multiple items were set returns all values selected for multiselect
|
146
|
-
- set using position for multiselect
|
147
|
-
- set using position and item for multiselect
|
148
|
-
- set using position for single select
|
149
|
-
- clear removes selected attribute for all selected items in multiselect
|
150
|
-
- clear removes selected attribute for item in single select list (FAILED - 1)
|
151
|
-
- set_value selects value atribute text
|
152
|
-
- set_value for multiselect returns selected and selected_values
|
140
|
+
Watirloo multiple browsers and threads
|
141
|
+
- open 5 new browsers in threads and add them to locker
|
142
|
+
- use locker to reattach to 5 browsers and load 5 diff pages at once
|
143
|
+
- reattach and close all 5 browsers
|
153
144
|
|
154
145
|
SelectList options as visible items and values as hidden to the user attributes
|
155
146
|
- values of options by facename method
|
@@ -170,6 +161,6 @@ expected not: == "F",
|
|
170
161
|
got: "F"
|
171
162
|
./spec/select_lists_spec.rb:134:
|
172
163
|
|
173
|
-
Finished in
|
164
|
+
Finished in 456.067 seconds
|
174
165
|
|
175
|
-
|
166
|
+
110 examples, 1 failure
|
data/spec/spec_helper.rb
CHANGED
data/watirloo.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{watirloo}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.8"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["marekj"]
|
12
|
-
s.date = %q{2009-12-
|
12
|
+
s.date = %q{2009-12-30}
|
13
13
|
s.description = %q{Helps you write tests in the language of the customer's domain}
|
14
14
|
s.email = %q{marekj.com@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -22,6 +22,7 @@ Gem::Specification.new do |s|
|
|
22
22
|
"README.rdoc",
|
23
23
|
"Rakefile",
|
24
24
|
"VERSION",
|
25
|
+
"_irbrc",
|
25
26
|
"lib/watirloo.rb",
|
26
27
|
"lib/watirloo/browsers.rb",
|
27
28
|
"lib/watirloo/desktop.rb",
|
@@ -31,6 +32,7 @@ Gem::Specification.new do |s|
|
|
31
32
|
"lib/watirloo/extension/watir_reflector.rb",
|
32
33
|
"lib/watirloo/locker.rb",
|
33
34
|
"lib/watirloo/page.rb",
|
35
|
+
"lib/watirloo/screenshot.rb",
|
34
36
|
"spec/browser_spec.rb",
|
35
37
|
"spec/browser_threads_spec.rb",
|
36
38
|
"spec/checkbox_group_spec.rb",
|
@@ -40,10 +42,7 @@ Gem::Specification.new do |s|
|
|
40
42
|
"spec/extra/browser_events_spec.rb",
|
41
43
|
"spec/extra/page_objects_metrics.rb",
|
42
44
|
"spec/face_mixing_spec.rb",
|
43
|
-
"spec/
|
44
|
-
"spec/firewatir/spec_results.html",
|
45
|
-
"spec/firewatir/spec_results.txt",
|
46
|
-
"spec/firewatir/spec_results_failed.txt",
|
45
|
+
"spec/ff.opts",
|
47
46
|
"spec/html/census.html",
|
48
47
|
"spec/html/checkbox_group1.html",
|
49
48
|
"spec/html/frameset1.html",
|
@@ -53,21 +52,23 @@ Gem::Specification.new do |s|
|
|
53
52
|
"spec/html/radio_group.html",
|
54
53
|
"spec/html/select_lists.html",
|
55
54
|
"spec/input_element_spec.rb",
|
56
|
-
"spec/label_spec.rb",
|
57
55
|
"spec/locker_spec.rb",
|
58
56
|
"spec/page_spec.rb",
|
59
57
|
"spec/person_def_wrappers_spec.rb",
|
60
58
|
"spec/radio_group_spec.rb",
|
61
59
|
"spec/radio_groups_spec.rb",
|
62
60
|
"spec/reflector_spec.rb",
|
61
|
+
"spec/results/ff-failed.txt",
|
62
|
+
"spec/results/ff.html",
|
63
|
+
"spec/results/ff.txt",
|
64
|
+
"spec/results/ie-failed.txt",
|
65
|
+
"spec/results/ie.html",
|
66
|
+
"spec/results/ie.txt",
|
63
67
|
"spec/select_list_options_spec.rb",
|
64
68
|
"spec/select_lists_spec.rb",
|
65
69
|
"spec/spec_helper.rb",
|
66
70
|
"spec/spec_helper_ff.rb",
|
67
71
|
"spec/spec_helper_runner.rb",
|
68
|
-
"spec/spec_results.html",
|
69
|
-
"spec/spec_results.txt",
|
70
|
-
"spec/spec_results_failed.txt",
|
71
72
|
"spec/text_fields_spec.rb",
|
72
73
|
"watirloo.gemspec"
|
73
74
|
]
|
@@ -86,9 +87,7 @@ Gem::Specification.new do |s|
|
|
86
87
|
"spec/extra/browser_events_spec.rb",
|
87
88
|
"spec/extra/page_objects_metrics.rb",
|
88
89
|
"spec/face_mixing_spec.rb",
|
89
|
-
"spec/firewatir/attach_instance_test.rb",
|
90
90
|
"spec/input_element_spec.rb",
|
91
|
-
"spec/label_spec.rb",
|
92
91
|
"spec/locker_spec.rb",
|
93
92
|
"spec/page_spec.rb",
|
94
93
|
"spec/person_def_wrappers_spec.rb",
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: watirloo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- marekj
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-12-
|
12
|
+
date: 2009-12-30 00:00:00 -06:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -47,6 +47,7 @@ files:
|
|
47
47
|
- README.rdoc
|
48
48
|
- Rakefile
|
49
49
|
- VERSION
|
50
|
+
- _irbrc
|
50
51
|
- lib/watirloo.rb
|
51
52
|
- lib/watirloo/browsers.rb
|
52
53
|
- lib/watirloo/desktop.rb
|
@@ -56,6 +57,7 @@ files:
|
|
56
57
|
- lib/watirloo/extension/watir_reflector.rb
|
57
58
|
- lib/watirloo/locker.rb
|
58
59
|
- lib/watirloo/page.rb
|
60
|
+
- lib/watirloo/screenshot.rb
|
59
61
|
- spec/browser_spec.rb
|
60
62
|
- spec/browser_threads_spec.rb
|
61
63
|
- spec/checkbox_group_spec.rb
|
@@ -65,10 +67,7 @@ files:
|
|
65
67
|
- spec/extra/browser_events_spec.rb
|
66
68
|
- spec/extra/page_objects_metrics.rb
|
67
69
|
- spec/face_mixing_spec.rb
|
68
|
-
- spec/
|
69
|
-
- spec/firewatir/spec_results.html
|
70
|
-
- spec/firewatir/spec_results.txt
|
71
|
-
- spec/firewatir/spec_results_failed.txt
|
70
|
+
- spec/ff.opts
|
72
71
|
- spec/html/census.html
|
73
72
|
- spec/html/checkbox_group1.html
|
74
73
|
- spec/html/frameset1.html
|
@@ -78,21 +77,23 @@ files:
|
|
78
77
|
- spec/html/radio_group.html
|
79
78
|
- spec/html/select_lists.html
|
80
79
|
- spec/input_element_spec.rb
|
81
|
-
- spec/label_spec.rb
|
82
80
|
- spec/locker_spec.rb
|
83
81
|
- spec/page_spec.rb
|
84
82
|
- spec/person_def_wrappers_spec.rb
|
85
83
|
- spec/radio_group_spec.rb
|
86
84
|
- spec/radio_groups_spec.rb
|
87
85
|
- spec/reflector_spec.rb
|
86
|
+
- spec/results/ff-failed.txt
|
87
|
+
- spec/results/ff.html
|
88
|
+
- spec/results/ff.txt
|
89
|
+
- spec/results/ie-failed.txt
|
90
|
+
- spec/results/ie.html
|
91
|
+
- spec/results/ie.txt
|
88
92
|
- spec/select_list_options_spec.rb
|
89
93
|
- spec/select_lists_spec.rb
|
90
94
|
- spec/spec_helper.rb
|
91
95
|
- spec/spec_helper_ff.rb
|
92
96
|
- spec/spec_helper_runner.rb
|
93
|
-
- spec/spec_results.html
|
94
|
-
- spec/spec_results.txt
|
95
|
-
- spec/spec_results_failed.txt
|
96
97
|
- spec/text_fields_spec.rb
|
97
98
|
- watirloo.gemspec
|
98
99
|
has_rdoc: true
|
@@ -133,9 +134,7 @@ test_files:
|
|
133
134
|
- spec/extra/browser_events_spec.rb
|
134
135
|
- spec/extra/page_objects_metrics.rb
|
135
136
|
- spec/face_mixing_spec.rb
|
136
|
-
- spec/firewatir/attach_instance_test.rb
|
137
137
|
- spec/input_element_spec.rb
|
138
|
-
- spec/label_spec.rb
|
139
138
|
- spec/locker_spec.rb
|
140
139
|
- spec/page_spec.rb
|
141
140
|
- spec/person_def_wrappers_spec.rb
|
@@ -1,38 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/../../lib/watirloo/firewatir_ducktape'
|
2
|
-
|
3
|
-
# TESTS FIXME kill all browsers before and after the test
|
4
|
-
require 'test/spec'
|
5
|
-
|
6
|
-
describe 'firefox.new has option key :attach that does not start new browser' do
|
7
|
-
|
8
|
-
before :each do
|
9
|
-
@b = FireWatir::Firefox.start 'file:///' + File.dirname(__FILE__) + '/../html/person.html'
|
10
|
-
sleep 5
|
11
|
-
end
|
12
|
-
|
13
|
-
after :each do
|
14
|
-
@b.close
|
15
|
-
sleep 5
|
16
|
-
end
|
17
|
-
|
18
|
-
it 'new with option :atach => true attaches to existing window and does not start new window' do
|
19
|
-
@b.title.should == 'Person'
|
20
|
-
b = FireWatir::Firefox.new :attach => true
|
21
|
-
b.title.should == 'Person'
|
22
|
-
end
|
23
|
-
|
24
|
-
it 'why does attach instance method throw exception when only one window exists on the desktop' do
|
25
|
-
assert_raise(Watir::Exception::NoMatchingWindowFoundException) do
|
26
|
-
b = @b.attach :title, 'Person'
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
it 'why does attach instance method throw exception when attaching to original window while another exists' do
|
31
|
-
b = FireWatir::Firefox.start 'file:///' + File.dirname(__FILE__) + '/../html/census.html'
|
32
|
-
sleep 3
|
33
|
-
assert_raise(Watir::Exception::NoMatchingWindowFoundException) do
|
34
|
-
c = b.attach :title, 'Person' #attach to the setup window
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
end
|
@@ -1,263 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
5
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
6
|
-
<head>
|
7
|
-
<title>RSpec results</title>
|
8
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
9
|
-
<meta http-equiv="Expires" content="-1" />
|
10
|
-
<meta http-equiv="Pragma" content="no-cache" />
|
11
|
-
<style type="text/css">
|
12
|
-
body {
|
13
|
-
margin: 0;
|
14
|
-
padding: 0;
|
15
|
-
background: #fff;
|
16
|
-
font-size: 80%;
|
17
|
-
}
|
18
|
-
</style>
|
19
|
-
<script type="text/javascript">
|
20
|
-
// <![CDATA[
|
21
|
-
function moveProgressBar(percentDone) {
|
22
|
-
document.getElementById("rspec-header").style.width = percentDone +"%";
|
23
|
-
}
|
24
|
-
function makeRed(element_id) {
|
25
|
-
document.getElementById(element_id).style.background = '#C40D0D';
|
26
|
-
document.getElementById(element_id).style.color = '#FFFFFF';
|
27
|
-
}
|
28
|
-
|
29
|
-
function makeYellow(element_id) {
|
30
|
-
if (element_id == "rspec-header" && document.getElementById(element_id).style.background != '#C40D0D')
|
31
|
-
{
|
32
|
-
document.getElementById(element_id).style.background = '#FAF834';
|
33
|
-
document.getElementById(element_id).style.color = '#000000';
|
34
|
-
}
|
35
|
-
else
|
36
|
-
{
|
37
|
-
document.getElementById(element_id).style.background = '#FAF834';
|
38
|
-
document.getElementById(element_id).style.color = '#000000';
|
39
|
-
}
|
40
|
-
}
|
41
|
-
|
42
|
-
// ]]>
|
43
|
-
</script>
|
44
|
-
<style type="text/css">
|
45
|
-
#rspec-header {
|
46
|
-
background: #65C400; color: #fff; height: 4em;
|
47
|
-
}
|
48
|
-
|
49
|
-
.rspec-report h1 {
|
50
|
-
margin: 0px 10px 0px 10px;
|
51
|
-
padding: 10px;
|
52
|
-
font-family: "Lucida Grande", Helvetica, sans-serif;
|
53
|
-
font-size: 1.8em;
|
54
|
-
position: absolute;
|
55
|
-
}
|
56
|
-
|
57
|
-
#summary {
|
58
|
-
margin: 0; padding: 5px 10px;
|
59
|
-
font-family: "Lucida Grande", Helvetica, sans-serif;
|
60
|
-
text-align: right;
|
61
|
-
top: 0px;
|
62
|
-
right: 0px;
|
63
|
-
float:right;
|
64
|
-
}
|
65
|
-
|
66
|
-
#summary p {
|
67
|
-
margin: 0 0 0 2px;
|
68
|
-
}
|
69
|
-
|
70
|
-
#summary #totals {
|
71
|
-
font-size: 1.2em;
|
72
|
-
}
|
73
|
-
|
74
|
-
.example_group {
|
75
|
-
margin: 0 10px 5px;
|
76
|
-
background: #fff;
|
77
|
-
}
|
78
|
-
|
79
|
-
dl {
|
80
|
-
margin: 0; padding: 0 0 5px;
|
81
|
-
font: normal 11px "Lucida Grande", Helvetica, sans-serif;
|
82
|
-
}
|
83
|
-
|
84
|
-
dt {
|
85
|
-
padding: 3px;
|
86
|
-
background: #65C400;
|
87
|
-
color: #fff;
|
88
|
-
font-weight: bold;
|
89
|
-
}
|
90
|
-
|
91
|
-
dd {
|
92
|
-
margin: 5px 0 5px 5px;
|
93
|
-
padding: 3px 3px 3px 18px;
|
94
|
-
}
|
95
|
-
|
96
|
-
dd.spec.passed {
|
97
|
-
border-left: 5px solid #65C400;
|
98
|
-
border-bottom: 1px solid #65C400;
|
99
|
-
background: #DBFFB4; color: #3D7700;
|
100
|
-
}
|
101
|
-
|
102
|
-
dd.spec.failed {
|
103
|
-
border-left: 5px solid #C20000;
|
104
|
-
border-bottom: 1px solid #C20000;
|
105
|
-
color: #C20000; background: #FFFBD3;
|
106
|
-
}
|
107
|
-
|
108
|
-
dd.spec.not_implemented {
|
109
|
-
border-left: 5px solid #FAF834;
|
110
|
-
border-bottom: 1px solid #FAF834;
|
111
|
-
background: #FCFB98; color: #131313;
|
112
|
-
}
|
113
|
-
|
114
|
-
dd.spec.pending_fixed {
|
115
|
-
border-left: 5px solid #0000C2;
|
116
|
-
border-bottom: 1px solid #0000C2;
|
117
|
-
color: #0000C2; background: #D3FBFF;
|
118
|
-
}
|
119
|
-
|
120
|
-
.backtrace {
|
121
|
-
color: #000;
|
122
|
-
font-size: 12px;
|
123
|
-
}
|
124
|
-
|
125
|
-
a {
|
126
|
-
color: #BE5C00;
|
127
|
-
}
|
128
|
-
|
129
|
-
/* Ruby code, style similar to vibrant ink */
|
130
|
-
.ruby {
|
131
|
-
font-size: 12px;
|
132
|
-
font-family: monospace;
|
133
|
-
color: white;
|
134
|
-
background-color: black;
|
135
|
-
padding: 0.1em 0 0.2em 0;
|
136
|
-
}
|
137
|
-
|
138
|
-
.ruby .keyword { color: #FF6600; }
|
139
|
-
.ruby .constant { color: #339999; }
|
140
|
-
.ruby .attribute { color: white; }
|
141
|
-
.ruby .global { color: white; }
|
142
|
-
.ruby .module { color: white; }
|
143
|
-
.ruby .class { color: white; }
|
144
|
-
.ruby .string { color: #66FF00; }
|
145
|
-
.ruby .ident { color: white; }
|
146
|
-
.ruby .method { color: #FFCC00; }
|
147
|
-
.ruby .number { color: white; }
|
148
|
-
.ruby .char { color: white; }
|
149
|
-
.ruby .comment { color: #9933CC; }
|
150
|
-
.ruby .symbol { color: white; }
|
151
|
-
.ruby .regex { color: #44B4CC; }
|
152
|
-
.ruby .punct { color: white; }
|
153
|
-
.ruby .escape { color: white; }
|
154
|
-
.ruby .interp { color: white; }
|
155
|
-
.ruby .expr { color: white; }
|
156
|
-
|
157
|
-
.ruby .offending { background-color: gray; }
|
158
|
-
.ruby .linenum {
|
159
|
-
width: 75px;
|
160
|
-
padding: 0.1em 1em 0.2em 0;
|
161
|
-
color: #000000;
|
162
|
-
background-color: #FFFBD3;
|
163
|
-
}
|
164
|
-
|
165
|
-
</style>
|
166
|
-
</head>
|
167
|
-
<body>
|
168
|
-
<div class="rspec-report">
|
169
|
-
|
170
|
-
<div id="rspec-header">
|
171
|
-
<div id="label">
|
172
|
-
<h1>RSpec Code Examples</h1>
|
173
|
-
</div>
|
174
|
-
|
175
|
-
<div id="summary">
|
176
|
-
<p id="totals"> </p>
|
177
|
-
<p id="duration"> </p>
|
178
|
-
</div>
|
179
|
-
</div>
|
180
|
-
|
181
|
-
<div class="results">
|
182
|
-
<div class="example_group">
|
183
|
-
<dl>
|
184
|
-
<dt id="example_group_1">text field wrapped in label tag without for attribute defined</dt>
|
185
|
-
<script type="text/javascript">makeRed('rspec-header');</script>
|
186
|
-
<script type="text/javascript">makeRed('example_group_1');</script>
|
187
|
-
<script type="text/javascript">moveProgressBar('0.9');</script>
|
188
|
-
<dd class="spec failed">
|
189
|
-
<span class="failed_spec_name">parent of text_field should be Watir Element</span>
|
190
|
-
<div class="failure" id="failure_1">
|
191
|
-
<div class="message"><pre>undefined method `kind_of??' for "":String</pre></div>
|
192
|
-
<div class="backtrace"><pre>./spec/label_spec.rb:17:</pre></div>
|
193
|
-
<pre class="ruby"><code><span class="linenum">15</span> <span class="keyword">if</span> <span class="ident">browser</span><span class="punct">.</span><span class="ident">kind_of?</span><span class="punct">(</span><span class="constant">FireWatir</span><span class="punct">::</span><span class="constant">Firefox</span><span class="punct">)</span>
|
194
|
-
<span class="linenum">16</span> <span class="ident">first</span><span class="punct">.</span><span class="ident">parent</span><span class="punct">.</span><span class="ident">should</span> <span class="ident">be_kind_of</span><span class="punct">(</span><span class="constant">String</span><span class="punct">)</span>
|
195
|
-
<span class="offending"><span class="linenum">17</span> <span class="ident">last</span><span class="punct">.</span><span class="ident">parent</span><span class="punct">.</span><span class="ident">should</span> <span class="ident">be_kind_of?</span><span class="punct">(</span><span class="constant">String</span><span class="punct">)</span></span>
|
196
|
-
<span class="linenum">18</span> <span class="ident">flunk</span><span class="punct">('</span><span class="string">FIXME Firefox returns String for parent and not Element</span><span class="punct">')</span>
|
197
|
-
<span class="linenum">19</span> </code></pre>
|
198
|
-
</div>
|
199
|
-
</dd>
|
200
|
-
<script type="text/javascript">moveProgressBar('1.8');</script>
|
201
|
-
<dd class="spec failed">
|
202
|
-
<span class="failed_spec_name">parent tagName should be a LABEL</span>
|
203
|
-
<div class="failure" id="failure_2">
|
204
|
-
<div class="message"><pre>undefined method `flunk' for #<Spec::Example::ExampleGroup::Subclass_1:0x33ca070></pre></div>
|
205
|
-
<div class="backtrace"><pre>./spec/label_spec.rb:33:</pre></div>
|
206
|
-
<pre class="ruby"><code><span class="linenum">31</span>
|
207
|
-
<span class="linenum">32</span> <span class="keyword">elsif</span> <span class="ident">browser</span><span class="punct">.</span><span class="ident">kind_of?</span><span class="punct">(</span><span class="constant">FireWatir</span><span class="punct">::</span><span class="constant">Firefox</span><span class="punct">)</span>
|
208
|
-
<span class="offending"><span class="linenum">33</span> <span class="ident">flunk</span><span class="punct">('</span><span class="string">FIXME Firefox returns String for parent and not Element</span><span class="punct">')</span></span>
|
209
|
-
<span class="linenum">34</span> <span class="keyword">end</span>
|
210
|
-
<span class="linenum">35</span> <span class="keyword">end</span></code></pre>
|
211
|
-
</div>
|
212
|
-
</dd>
|
213
|
-
<script type="text/javascript">moveProgressBar('2.7');</script>
|
214
|
-
<dd class="spec failed">
|
215
|
-
<span class="failed_spec_name">parent text returns text of label</span>
|
216
|
-
<div class="failure" id="failure_3">
|
217
|
-
<div class="message"><pre>undefined method `flunk' for #<Spec::Example::ExampleGroup::Subclass_1:0x3324cd8></pre></div>
|
218
|
-
<div class="backtrace"><pre>./spec/label_spec.rb:43:</pre></div>
|
219
|
-
<pre class="ruby"><code><span class="linenum">41</span>
|
220
|
-
<span class="linenum">42</span> <span class="keyword">elsif</span> <span class="ident">browser</span><span class="punct">.</span><span class="ident">kind_of?</span><span class="punct">(</span><span class="constant">FireWatir</span><span class="punct">::</span><span class="constant">Firefox</span><span class="punct">)</span>
|
221
|
-
<span class="offending"><span class="linenum">43</span> <span class="ident">flunk</span><span class="punct">('</span><span class="string">FIXME Firefox returns String for parent and not Element.</span><span class="punct">')</span></span>
|
222
|
-
<span class="linenum">44</span> <span class="keyword">end</span>
|
223
|
-
<span class="linenum">45</span> <span class="keyword">end</span></code></pre>
|
224
|
-
</div>
|
225
|
-
</dd>
|
226
|
-
</dl>
|
227
|
-
</div>
|
228
|
-
<div class="example_group">
|
229
|
-
<dl>
|
230
|
-
<dt id="example_group_2">label for text field not wrapped</dt>
|
231
|
-
<script type="text/javascript">moveProgressBar('3.6');</script>
|
232
|
-
<dd class="spec passed"><span class="passed_spec_name">text value of label</span></dd>
|
233
|
-
</dl>
|
234
|
-
</div>
|
235
|
-
<div class="example_group">
|
236
|
-
<dl>
|
237
|
-
<dt id="example_group_3">SelectList selections</dt>
|
238
|
-
<script type="text/javascript">moveProgressBar('4.5');</script>
|
239
|
-
<dd class="spec passed"><span class="passed_spec_name">selected returns preselected item in single select</span></dd>
|
240
|
-
<script type="text/javascript">moveProgressBar('5.4');</script>
|
241
|
-
<dd class="spec passed"><span class="passed_spec_name">selected returns preselected value in single select</span></dd>
|
242
|
-
<script type="text/javascript">moveProgressBar('6.3');</script>
|
243
|
-
<dd class="spec passed"><span class="passed_spec_name">selected returns nil for none selected items in multi select</span></dd>
|
244
|
-
<script type="text/javascript">moveProgressBar('7.2');</script>
|
245
|
-
<dd class="spec passed"><span class="passed_spec_name">selected returns nil for none selected values in multi select</span></dd>
|
246
|
-
<script type="text/javascript">moveProgressBar('8.1');</script>
|
247
|
-
<dd class="spec passed"><span class="passed_spec_name">set item text and find selected item and text for multiselect</span></dd>
|
248
|
-
<script type="text/javascript">moveProgressBar('9.0');</script>
|
249
|
-
<dd class="spec passed"><span class="passed_spec_name">set value and find selected item and value for multiselect</span></dd>
|
250
|
-
<script type="text/javascript">moveProgressBar('10.0');</script>
|
251
|
-
<dd class="spec passed"><span class="passed_spec_name">set and query option by text for single select</span></dd>
|
252
|
-
<script type="text/javascript">moveProgressBar('10.9');</script>
|
253
|
-
<dd class="spec passed"><span class="passed_spec_name">set and query option by value for single select</span></dd>
|
254
|
-
<script type="text/javascript">moveProgressBar('11.8');</script>
|
255
|
-
<dd class="spec passed"><span class="passed_spec_name">set by text multple items for multiselect selects each item</span></dd>
|
256
|
-
<script type="text/javascript">moveProgressBar('12.7');</script>
|
257
|
-
<dd class="spec passed"><span class="passed_spec_name">set by value multple items for multiselect selects each item</span></dd>
|
258
|
-
<script type="text/javascript">moveProgressBar('13.6');</script>
|
259
|
-
<dd class="spec passed"><span class="passed_spec_name">set items array for single select selects each in turn. selected is the last item in array</span></dd>
|
260
|
-
<script type="text/javascript">moveProgressBar('14.5');</script>
|
261
|
-
<dd class="spec passed"><span class="passed_spec_name">set item after multiple items were set returns all values selected for multiselect</span></dd>
|
262
|
-
<script type="text/javascript">moveProgressBar('15.4');</script>
|
263
|
-
<dd class="spec passed"><span class="passed_spec_name">set using position for multiselect</span></dd>
|