Re: FormTester not working in Cheesr (Wicket In Action) update to 1.4.3

2009-11-08 Thread PhilipJohnson

Here's the fix: select the state as follows:

   formTester.select("state-wmc:state", 1);

-- 
View this message in context: 
http://old.nabble.com/FormTester-not-working-in-Cheesr-%28Wicket-In-Action%29-update-to-1.4.3-tp26248438p26259781.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



FormTester not working in Cheesr (Wicket In Action) update to 1.4.3

2009-11-07 Thread Philip Johnson

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:


Here's the Form definition:


Here's the page's HTML:


If you'd like to download the entire application:


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