I got the Error "Some of your tests did a full page reload!"

11,080 views
Skip to first unread message

Ramesh Kumar

unread,
Oct 7, 2013, 11:02:48 AM10/7/13
to karma...@googlegroups.com
Hello ,

I wrote nested Test suite ,

main Testsuite :
        before each ( successfully login )
       write some test in ngview-1 .(active)
       sub suite :
            before Each
            click the action button in ngview-1
            write some test cases  updated view
             then back to previous Screen

in this case i got error like "Some of your tests did a full page reload!" then test cases are not execute.

please share your idea.


     

Ramesh Kumar

unread,
Oct 7, 2013, 11:04:28 AM10/7/13
to karma...@googlegroups.com

    <system-out><![CDATA[PhantomJS 1.9.2 (Windows XP) ERROR

    Some of your tests did a full page reload!

]]></system-out>


     

Vojta Jína

unread,
Oct 12, 2013, 8:46:23 PM10/12/13
to karma...@googlegroups.com
That means that the test did a full page reload. It's really hard to help more based on your description.

Is it an e2e test with angular-scenario ? Or just a unit test ?

V.


--
You received this message because you are subscribed to the Google Groups "karma-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to karma-users...@googlegroups.com.
To post to this group, send email to karma...@googlegroups.com.
Visit this group at http://groups.google.com/group/karma-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/karma-users/84fda7cb-c994-43a0-94bf-21b8bb15a949%40googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

Ramesh Kumar

unread,
Oct 21, 2013, 5:08:54 AM10/21/13
to karma...@googlegroups.com
yes , e2e test with angular-scenario

Vojta Jína

unread,
Oct 26, 2013, 4:21:14 PM10/26/13
to karma...@googlegroups.com
Sorry, I don't know. Can you share the failing test somewhere? Gist?
It's really hard to help otherwise.

V.


phka...@gmail.com

unread,
Nov 12, 2013, 9:06:25 AM11/12/13
to karma...@googlegroups.com
Why does karma loses its hook, when there is full page reload? 

In my case, I have written a unit test case (using qunit) for a method which has some business logic followed by " window.history.back();". When I run the test cass  using karma, the following error is thrown for the firefox browser:
Some of your tests did a full page reload! 

And subsequently, all my test cases fail. But, no such issue occurred for Chrome. Is there is any solution for this? or Am I missing something?

Vojta Jína

unread,
Nov 12, 2013, 9:59:49 AM11/12/13
to karma...@googlegroups.com
You need to mock this out. You can not do window.history.back() in a unit test.
The page you are refreshing contains all the Jasmine stuff and context of execution, so there's no way Jasmine can continue execution if you reload that frame.

If you really wanna do this, you need to create your own iframe. However I strongly recommend to mock this out, for instance:

var historyBack = spyOn(window.history, 'back');
expect(historyBack).toHaveBeenCalled();

V.



--
You received this message because you are subscribed to the Google Groups "karma-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to karma-users...@googlegroups.com.
To post to this group, send email to karma...@googlegroups.com.
Visit this group at http://groups.google.com/group/karma-users.
Reply all
Reply to author
Forward
0 new messages