Running Lebowski on IE8

4 views
Skip to first unread message

SunnyT

unread,
Feb 21, 2011, 2:08:00 AM2/21/11
to lebowskifw
Hi,

I am trying to run lebowski test cases on IE8 ( WIndows 7 OS ).
I have installed ruby-1.9.2p136 and lebowski 0.3.0 and other required
gems.
Also I have incorporated the fix mentioned in http://gist.github.com/536260.

Step-1: lebowski-start-server -forcedBrowserMode *iexploreproxy
Step-2: lebowski-spec -f n test_script.rb

Test cases with simple tests like, checking for labels value or button
titles etc., are getting passed.
However the test cases which perform user actions, like button click,
selection and deselection of an item in a list etc., are failing.

Following is the test script used: test_script.rb

App = MainApplication.new \
:app_root_path => "/my_app",
:app_name => "MyApp",
:browser => :firefox,
:app_server_host => "162.12.25.36",
:app_server_port => "4020"

App.start
App.maximize

App.define_path 'mainPane', 'mainPage.mainPane'

describe "My app testing" do
before(:all) do
@label = App['mainPane.labelView']
@button = App['mainPane.buttonView']
end

it "dummy test" do

@label.value.should eql "Welcome to SproutCore!"
@button.should have_title "My Button"
sleep 5
@button.mouse_down
sleep 5
@button.mouse_up

end

end


On running the above test script, I am getting the following error in
the console:

My app testing
dummy test (FAILED - 1)

Failures:
1) My app testing dummy test
Failure/Error: @button.mouse_down
Unrecognized returned type 'function' for path
mainPage.mainPane.buttonView
.mouseDown
# ./test_script.rb:35:in `block (2 levels) in <top (required)>'

SunnyT

unread,
Feb 21, 2011, 2:11:32 AM2/21/11
to lebowskifw
Any pointers on why the error is coming, in the above mentioned
post???


Thanks,
Sunny


SunnyT

unread,
Feb 21, 2011, 3:34:36 AM2/21/11
to lebowskifw
*typo

App = MainApplication.new \
:app_root_path => "/my_app",
:app_name => "MyApp",
:browser => :iexploreproxy,
:app_server_host => "162.12.25.36",
:app_server_port => "4020"


MikeC

unread,
Feb 21, 2011, 12:15:48 PM2/21/11
to lebowskifw
Hey Sunny,

It appears that the problem you are facing is one with waiting for the
app to be rendered fully. When you start your app object, you are just
doing the following:

App.start

The problem with doing this minimal start is that Lebowski will only
checks for the presence of the SproutCore framework and your app's
root object (MyApp) -- it doesn't check if the application has been
fully rendered. In order to assure buttons, labels and such are
rendered in the browser, you need to check a pane's isPaneAttached
property, like so:

App.start do |app|
app['mainPage.mainPane.isPaneAttached'] == true
end

The isPaneAttached is only ever true when the pane has actually
covered the in-memory representation of its child views and converted
them into actual DOM elements that are attached to the browser's body
element.

Give that a try and let me know if you're still running into issues.

Mike

SunnyT

unread,
Feb 22, 2011, 3:56:49 AM2/22/11
to lebowskifw
Hi Mike,

Thanks for the reply.

I tried as you suggested.
However, the problem still persists. The test case is still getting
failed. Same error!

Any other pointers?

Sunny

MikeC

unread,
Feb 25, 2011, 11:44:13 AM2/25/11
to lebowskifw
Could try running the lebowski hello world example and letting me know
if it works as expected for you. I want to know if you're getting this
problem across the board of it is more localized for your particular
case.

Mike

SunnyT

unread,
Feb 28, 2011, 4:10:15 AM2/28/11
to lebowskifw
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

MikeC

unread,
Mar 8, 2011, 7:26:56 PM3/8/11
to lebowskifw
A quick update. I've located the issues and am currently addressing
them. Apologies for keeping you so long in the dark about this. Expect
an update to the Lebowski framework in the next few days.

-Mike

MikeC

unread,
Mar 14, 2011, 2:30:39 AM3/14/11
to lebowskifw
I've updated Lebowski with some initial fixes that will allow the
framework to work with IE 7/8. You'll need to install the latest gem
(v0.3.3.pre.0). I'm still working on fixes, such as getting all drag
and drop operations working, but these initial changes at least get
things off the ground. More updates to come.

https://github.com/FrozenCanuck/Lebowski/tree/REL-0.3.3.pre.0

-Mike
Reply all
Reply to author
Forward
0 new messages