watirloo 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,23 +0,0 @@
1
-
2
- text field wrapped in label tag without for attribute defined
3
- - parent of text_field should be Watir Element (FAILED - 1)
4
- - parent tagName should be a LABEL (FAILED - 2)
5
- - parent text returns text of label (FAILED - 3)
6
-
7
- label for text field not wrapped
8
- - text value of label
9
-
10
- SelectList selections
11
- - selected returns preselected item in single select
12
- - selected returns preselected value in single select
13
- - selected returns nil for none selected items in multi select
14
- - selected returns nil for none selected values in multi select
15
- - set item text and find selected item and text for multiselect
16
- - set value and find selected item and value for multiselect
17
- - set and query option by text for single select
18
- - set and query option by value for single select
19
- - set by text multple items for multiselect selects each item
20
- - set by value multple items for multiselect selects each item
21
- - set items array for single select selects each in turn. selected is the last item in array
22
- - set item after multiple items were set returns all values selected for multiselect
23
- - set using position for multiselect
@@ -1,3 +0,0 @@
1
- text field wrapped in label tag without for attribute defined parent of text_field should be Watir Element
2
- text field wrapped in label tag without for attribute defined parent tagName should be a LABEL
3
- text field wrapped in label tag without for attribute defined parent text returns text of label
data/spec/label_spec.rb DELETED
@@ -1,65 +0,0 @@
1
- require File.dirname(__FILE__) + '/spec_helper'
2
-
3
-
4
- describe 'text field wrapped in label tag without for attribute defined' do
5
-
6
- include Watirloo::Page
7
- face(:first) { text_field(:name, 'fn') }
8
- face(:last) { text_field(:name, 'ln') }
9
-
10
- before do
11
- browser.goto testfile('labels.html')
12
- end
13
-
14
- it 'parent of text_field should be Watir Element' do
15
- if browser.kind_of?(FireWatir::Firefox)
16
- first.parent.should be_kind_of(String)
17
- last.parent.should be_kind_of?(String)
18
- flunk('FIXME Firefox returns String for parent and not Element')
19
-
20
- elsif browser.kind_of?(Watir::IE)
21
- first.parent.should be_kind_of(Watir::Element)
22
- last.parent.should be_kind_of(Watir::Element)
23
- end
24
-
25
- end
26
-
27
- it 'parent tagName should be a LABEL' do
28
- if browser.kind_of?(Watir::IE)
29
- first.parent.document.tagName.should == "LABEL"
30
- last.parent.document.tagName.should == "LABEL"
31
-
32
- elsif browser.kind_of?(FireWatir::Firefox)
33
- flunk('FIXME Firefox returns String for parent and not Element')
34
- end
35
- end
36
-
37
- it 'parent text returns text of label' do
38
- if browser.kind_of?(Watir::IE)
39
- first.parent.text.should == 'First Name'
40
- last.parent.text.should == 'Last Name'
41
-
42
- elsif browser.kind_of?(FireWatir::Firefox)
43
- flunk('FIXME Firefox returns String for parent and not Element.')
44
- end
45
- end
46
- end
47
-
48
-
49
-
50
- describe 'label for text field not wrapped' do
51
-
52
- # reopen the class and add more interfaces
53
- include Watirloo::Page
54
- face(:first_label) { label(:for, 'first_nm') }
55
- face(:last_label) { label(:for, 'last_nm') }
56
-
57
- before do
58
- browser.goto testfile('labels.html')
59
- end
60
-
61
- it 'text value of label' do
62
- first_label.text.should == 'FirstName For'
63
- last_label.text.should == 'LastName For'
64
- end
65
- end