Hi Mike,
hello_world example also is showing errors.
I ran both the test cases, viz. hello_world_spec.rb
and hello_world_2_spec.rb. Both of them showed errors.
Here are the errors which were displayed on the console...
For hello_world_spec.rb file:
C:\Users\sunny\Desktop\hello_world\spec>lebowski-spec -f n
hello_world_
spec.rb
Hello World Test
will check that label has an initial value 'click a button' (FAILED
- 1)
will check that hello button has title 'hello' (FAILED - 2)
will check that world button has title 'world' (FAILED - 3)
will click hello button and then confirm label has value
'hello' (FAILED - 4)
will click world button and then confirm label has value
'world' (FAILED - 5)
Failures:
1) Hello World Test will check that label has an initial value
'click a button
'
Failure/Error: @label = App['group.label', 'SC.LabelView']
Did not get expected type 'SC.LabelView' for path
'mainPage.mainPane.groupV
iew.label'. Instead got object: SC.LabelView
# ./hello_world_spec.rb:166:in `block (2 levels) in <top
(required)>'
2) Hello World Test will check that hello button has title 'hello'
Failure/Error: @label = App['group.label', 'SC.LabelView']
Did not get expected type 'SC.LabelView' for path
'mainPage.mainPane.groupV
iew.label'. Instead got object: SC.LabelView
# ./hello_world_spec.rb:166:in `block (2 levels) in <top
(required)>'
3) Hello World Test will check that world button has title 'world'
Failure/Error: @label = App['group.label', 'SC.LabelView']
Did not get expected type 'SC.LabelView' for path
'mainPage.mainPane.groupV
iew.label'. Instead got object: SC.LabelView
# ./hello_world_spec.rb:166:in `block (2 levels) in <top
(required)>'
4) Hello World Test will click hello button and then confirm label
has value '
hello'
Failure/Error: @label = App['group.label', 'SC.LabelView']
Did not get expected type 'SC.LabelView' for path
'mainPage.mainPane.groupV
iew.label'. Instead got object: SC.LabelView
# ./hello_world_spec.rb:166:in `block (2 levels) in <top
(required)>'
5) Hello World Test will click world button and then confirm label
has value '
world'
Failure/Error: @label = App['group.label', 'SC.LabelView']
Did not get expected type 'SC.LabelView' for path
'mainPage.mainPane.groupV
iew.label'. Instead got object: SC.LabelView
# ./hello_world_spec.rb:166:in `block (2 levels) in <top
(required)>'
Finished in 0.242 seconds
5 examples, 5 failures
On making the changes to hello_world_spec.rb as
changing this:
before(:all) do
@label = App['group.label', 'SC.LabelView']
@hello_button = App['group.helloButton', ButtonView]
@world_button = App['#world-button', ButtonView] # Using the
view's layer ID
end
to:
before(:all) do
@label = App['group.label']
@hello_button = App['group.helloButton']
@world_button = App['#world-button'] # Using the view's layer ID
end
following were the errors that were displayed on the console:
C:\Users\sunny\Desktop\hello_world\spec>lebowski-spec -f n
hello_world_
spec.rb
Hello World Test
will check that label has an initial value 'click a button'
will check that hello button has title 'hello'
will check that world button has title 'world'
will click hello button and then confirm label has value
'hello' (FAILED - 1)
will click world button and then confirm label has value
'world' (FAILED - 2)
Failures:
1) Hello World Test will click hello button and then confirm label
has value '
hello'
Failure/Error: @hello_button.click
undefined method `click' for #<Lebowski::Foundation::SCObject:
0x2d08298>
# ./hello_world_spec.rb:260:in `block (2 levels) in <top
(required)>'
2) Hello World Test will click world button and then confirm label
has value '
world'
Failure/Error: @world_button.click
undefined method `click' for #<Lebowski::Foundation::SCObject:
0x2cccda8>
# ./hello_world_spec.rb:275:in `block (2 levels) in <top
(required)>'
Finished in 0.848 seconds
5 examples, 2 failures
For hello_world_2_spec.rb file:
C:\Users\sunny\Desktop\hello_world\spec>lebowski-spec -f n
hello_world_
2_spec.rb
Hello World Test
will check that label has an initial value 'click a button' (FAILED
- 1)
will check that hello button has title 'hello' (FAILED - 2)
will check that world button has title 'world' (FAILED - 3)
will click hello button and then confirm label has value
'hello' (FAILED - 4)
will click world button and then confirm label has value
'world' (FAILED - 5)
Failures:
1) Hello World Test will check that label has an initial value
'click a button
'
Failure/Error: @group = App['group']
Did not get expected type 'SC.View' for path
'mainPage.mainPane.groupView'.
Instead got object: SC.View
# ./hello_world_2_spec.rb:82:in `block (2 levels) in <top
(required)>'
2) Hello World Test will check that hello button has title 'hello'
Failure/Error: @group = App['group']
Did not get expected type 'SC.View' for path
'mainPage.mainPane.groupView'.
Instead got object: SC.View
# ./hello_world_2_spec.rb:82:in `block (2 levels) in <top
(required)>'
3) Hello World Test will check that world button has title 'world'
Failure/Error: @group = App['group']
Did not get expected type 'SC.View' for path
'mainPage.mainPane.groupView'.
Instead got object: SC.View
# ./hello_world_2_spec.rb:82:in `block (2 levels) in <top
(required)>'
4) Hello World Test will click hello button and then confirm label
has value '
hello'
Failure/Error: @group = App['group']
Did not get expected type 'SC.View' for path
'mainPage.mainPane.groupView'.
Instead got object: SC.View
# ./hello_world_2_spec.rb:82:in `block (2 levels) in <top
(required)>'
5) Hello World Test will click world button and then confirm label
has value '
world'
Failure/Error: @group = App['group']
Did not get expected type 'SC.View' for path
'mainPage.mainPane.groupView'.
Instead got object: SC.View
# ./hello_world_2_spec.rb:82:in `block (2 levels) in <top
(required)>'
Finished in 0.347 seconds
5 examples, 5 failures
Sunny