Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

submit form #4

Open
rosscdh opened this issue Sep 20, 2013 · 3 comments
Open

submit form #4

rosscdh opened this issue Sep 20, 2013 · 3 comments

Comments

@rosscdh
Copy link

rosscdh commented Sep 20, 2013

Hi there, great work first of all; I had been looking for an integration with phantom for some time. Well done.

I've been using this app for some time; but have run into a strange situation where I am unable to submit a form and test the response and redirect.

Have you had this issue before?

I notice your tests have no test of a form submission? is this by design?

Thanks in advance
Ross

@senko
Copy link
Member

senko commented Sep 30, 2013

Hey @rosscdh,

The form submissions tests worked for us. You can see one such test here: https://github.com/dobarkod/django-casper#passing-extra-arguments (the second one, form fill and submit). In the test after that we usually check the url of the page we arrived on to see whether the redirection was correct.

The issue may be in how you're waiting for the test. Recently we come to think that the scenario helper might not be the best way to use Casper (as in some cases you want something else instead of then). If you're using scenario in the case where you have this problem, I'd suggest using the Casper API directly instead and seeing if it solves your problem

If you can consistently reproduce this, it would be great if you could give an example of a minimal case where it fails for you and I'll look into it in more detail.

Best,
Senko

@rosscdh
Copy link
Author

rosscdh commented Oct 2, 2013

Thanks for the tip! ill investigate further.

I believe you are right regarding the "scenario" concept it adds a level of confusion especially for those witha bit of casperJS experience!

Thanks again and great work!

@rosscdh rosscdh closed this as completed Oct 2, 2013
@rosscdh
Copy link
Author

rosscdh commented Oct 17, 2013

@senko Just a note the example above does not test for the form submit and the processes response.. ie when i submit this form i should be able to test what happens next.

@rosscdh rosscdh reopened this Oct 17, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants