Greetings, Wicketopians,

I am updating the Cheesr application to 1.4.3, and with some help from Andrig Miller, have got the actual application working fine.

The problem I am having is with the unit tests that I wrote for the 1.3.6 version. I use FormTester to fill out the fields on a Checkout page and then submit the results. When running the application interactively, submitting the form works correctly and sends you back to an Index page. My test code looks like this:

FormTester formTester = tester.newFormTester("form");
formTester.setValue("name", "Philip");
formTester.setValue("street", "Main Street");
formTester.setValue("zipcode", "96822");
formTester.setValue("city", "Anchorage");
formTester.setValue("state-wmc:state", "Alaska");
formTester.submit();
tester.assertRenderedPage(Index.class);

But it doesn't work: the last assertion indicates that we're still on the Checkout page. This test worked under 1.3.6. I've played around with this for a couple of hours now and am convinced that there's something simple going on that I simply can't see. Can any of you straighten me out?

Here's the test class:
<http://code.google.com/p/ics-wicket-examples/source/browse/trunk/example04/src/com/cheesr/TestCheckoutPage.java>

Here's the Form definition:
<http://code.google.com/p/ics-wicket-examples/source/browse/trunk/example04/src/com/cheesr/CheckoutPage.java>

Here's the page's HTML:
<http://code.google.com/p/ics-wicket-examples/source/browse/trunk/example04/src/com/cheesr/CheckoutPage.html>

If you'd like to download the entire application:
<http://ics-wicket-examples.googlecode.com/files/wicket-example04-1.0.1107.zip>

Thanks so much for any help you can provide,
Philip


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to