You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Martin Grigorov <mg...@apache.org> on 2012/03/19 17:17:40 UTC

Re: Can't get FormTester.submitLink to work (required testfield always missing)

Hi,

Create a quickstart app with Wicket 1.5 and attach it to Jira.

On Mon, Mar 19, 2012 at 6:06 PM, Fabiosakiyam <fa...@gmail.com> wrote:
> Hi,
>
> Old post but, any solutions for this, using wicket tester?
>
> Thx
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Can-t-get-FormTester-submitLink-to-work-required-testfield-always-missing-tp1888944p4485338.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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


Re: Can't get FormTester.submitLink to work (required testfield always missing)

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

Create a quickstart (Wicket 1.5+)

On Mon, Mar 19, 2012 at 7:54 PM, Fabio Sakiyama <fa...@gmail.com> wrote:
> Hi Martin,
>
> Thx for answering,
>
> Hmm, i dont know the jira's conxtext on wicket, but where i use it, i create
> a jira when there's actually a problem.
> I don't think it is a wicket problem (idk, just guessing), probably it's
> just me not using it correctly.
>
> I didn't create a new post cause this post reflects my problem.
>
> My problem:
>
> I made a wicketTester for a page, worked perfectly.
> I'm doing the same to other page, but i dont know if its because of the
> submitLink or anything else, its not working.
> My formTester is setting values , but when i do a submitLink and
> assertNoErrorMessage, it fails.
>
> My test is doing this:
>
> this.tester.startPage(CadastroPerfilPropagacao.class);
> this.tester.assertRenderedPage(CadastroPerfilPropagacao.class);
> FormTester formtester = this.tester.newFormTester("mainForm");
> ...
> formtester.setValue("pathFromForm", "VALUE TEST");
> formtester.setValue("pathFromForm", "DESCRIPTION TEST");
> this.tester.executeAjaxEvent("pathFromForm", "onchange");
> formtester.setValue("pathFromFormAfterAjaxEvent", "VALUE");
> ...
> formtester.submitLink("btnAdd", false);   <-- This button adds an object
> inside a list
> formtester.submitLink("btnSave", false); <-- This one submits
> this.tester.assertNoErrorMessage();
>
> And then i get the assertionFailed error, it says the fields are required.
>
> I don't know if this helps, if you think the quickstar is still needed,
> please tell me.
>
> Thx
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Can-t-get-FormTester-submitLink-to-work-required-testfield-always-missing-tp1888944p4485748.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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


Re: Can't get FormTester.submitLink to work (required testfield always missing)

Posted by Fabio Sakiyama <fa...@gmail.com>.
Hi Martin,

Thx for answering,

Hmm, i dont know the jira's conxtext on wicket, but where i use it, i create
a jira when there's actually a problem. 
I don't think it is a wicket problem (idk, just guessing), probably it's
just me not using it correctly.

I didn't create a new post cause this post reflects my problem.

My problem:

I made a wicketTester for a page, worked perfectly. 
I'm doing the same to other page, but i dont know if its because of the
submitLink or anything else, its not working.
My formTester is setting values , but when i do a submitLink and
assertNoErrorMessage, it fails.

My test is doing this:

this.tester.startPage(CadastroPerfilPropagacao.class);
this.tester.assertRenderedPage(CadastroPerfilPropagacao.class);
FormTester formtester = this.tester.newFormTester("mainForm");
...
formtester.setValue("pathFromForm", "VALUE TEST");
formtester.setValue("pathFromForm", "DESCRIPTION TEST");
this.tester.executeAjaxEvent("pathFromForm", "onchange");
formtester.setValue("pathFromFormAfterAjaxEvent", "VALUE");
...
formtester.submitLink("btnAdd", false);   <-- This button adds an object
inside a list
formtester.submitLink("btnSave", false); <-- This one submits
this.tester.assertNoErrorMessage();

And then i get the assertionFailed error, it says the fields are required.

I don't know if this helps, if you think the quickstar is still needed,
please tell me.

Thx














--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Can-t-get-FormTester-submitLink-to-work-required-testfield-always-missing-tp1888944p4485748.html
Sent from the Users forum mailing list archive at Nabble.com.

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