[6.5] testing Ajax stuff

2013-01-31 Thread Pierre Goupil
Good afternoon, I'd like to test an Ajax response. More precisely, I'd like to get the list of HTML tags which attributes have a given value. I know of TagTester#createTagsByAttribute but it looks like it is for non-Ajax only, correct me if I'm wrong. Is there any way to do that in a Wicket 6

Re: [6.5] testing Ajax stuff

2013-01-31 Thread Andrea Del Bene
Hi, I haven't tested it but I think you could get the last response from WicketTester (with getLastResponse or getLastResponseAsString), then you should be able to search your attributes inside the response. Good afternoon, I'd like to test an Ajax response. More precisely, I'd like to get

Re: [6.5] testing Ajax stuff

2013-01-31 Thread Pierre Goupil
Yes, I could but in fact it returns the last non-Ajax response. I see it when providing it to TagTester#createTagsByAttribute. Thank you anyway. On Thu, Jan 31, 2013 at 4:38 PM, Andrea Del Bene an.delb...@gmail.comwrote: Hi, I haven't tested it but I think you could get the last response

Re: [6.5] testing Ajax stuff

2013-01-31 Thread Pierre Goupil
!!! It looks like I made a mistake: getLastResponseAsString do give the last Ajax response. I thought you were speaking about getLastResponse().getDocument() which doesn't take Ajax into account. Thanks, I'll look for that! Regards, Pierre On Thu, Jan 31, 2013 at 4:44 PM, Pierre Goupil

Re: [6.5] testing Ajax stuff

2013-01-31 Thread Pierre Goupil
After various tries, I must admit my failure. Here is the Ajax response that I want to test against: ?xml version=1.0 encoding=UTF-8?ajax-response component id=galleryParent ![CDATA[span wicket:id=galleryParent id=galleryParent span wicket:id=gallery id=handGallerywicket:panel

Re: [6.5] testing Ajax stuff

2013-01-31 Thread Andrea Del Bene
I think you should extract the HTML from CDATA section. I've run a test with the response you wrote in your email and if I get rid of outer tags it works fine. ?xml version=1.0 encoding=UTF-8?ajax-response component id=galleryParent ![CDATA[span wicket:id=galleryParent id=galleryParent

Re: [6.5] testing Ajax stuff

2013-01-31 Thread Pierre Goupil
Good idea! So you think this comes from the CDATA section too: funny... On Thu, Jan 31, 2013 at 7:33 PM, Andrea Del Bene an.delb...@gmail.comwrote: I think you should extract the HTML from CDATA section. I've run a test with the response you wrote in your email and if I get rid of outer tags

Re: [6.5] testing Ajax stuff

2013-01-31 Thread Pierre Goupil
That's it! What a shame to be forced to manipulate the Ajax response by hand to test this... Anyway, it is possible! On Thu, Jan 31, 2013 at 7:36 PM, Pierre Goupil goupilpie...@gmail.comwrote: Good idea! So you think this comes from the CDATA section too: funny... On Thu, Jan 31, 2013 at

Re: [6.5] testing Ajax stuff

2013-01-31 Thread Martin Grigorov
File a ticket please. Preferably with a patch, or at least a test case. On Thu, Jan 31, 2013 at 11:25 PM, Pierre Goupil goupilpie...@gmail.comwrote: That's it! What a shame to be forced to manipulate the Ajax response by hand to test this... Anyway, it is possible! On Thu, Jan 31, 2013 at

Re: [6.5] testing Ajax stuff

2013-01-31 Thread Pierre Goupil
OK, I'll do it ASAP! On Thu, Jan 31, 2013 at 11:33 PM, Martin Grigorov mgrigo...@apache.orgwrote: File a ticket please. Preferably with a patch, or at least a test case. On Thu, Jan 31, 2013 at 11:25 PM, Pierre Goupil goupilpie...@gmail.com wrote: That's it! What a shame to be forced