Re: Unit Test InMethod DataGrid
Thank you very much Nino and Kent, I've read about Wicketpagetest before and I've been planning to try it out. Looks like now is my chance :-) Ronan On 04/06/2010 02:16, Kent Tong wrote: Hi Ronan, Looking at the output of WicketTester.debugComponentTrees() I can see that the grid row is the deepest level with a wicket id: ... panel:storyGrid:form:bodyContainer:body:row:2:item com.inmethod.grid.common.AbstractGridRow If you use http://wicketpagetest.sourceforge.net, then you can test it easily like: Selenium s = ...; assert s.getText("wicket=//storyGrid//body//row[2]//item[3]").equals("foo"; In this example you're checking the the 3rd cell in the 2nd row (both are 0-based). - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Unit Test InMethod DataGrid
Hi Ronan, Looking at the output of WicketTester.debugComponentTrees() I can see that the grid row is the deepest level with a wicket id: ... panel:storyGrid:form:bodyContainer:body:row:2:item com.inmethod.grid.common.AbstractGridRow If you use http://wicketpagetest.sourceforge.net, then you can test it easily like: Selenium s = ...; assert s.getText("wicket=//storyGrid//body//row[2]//item[3]").equals("foo"; In this example you're checking the the 3rd cell in the 2nd row (both are 0-based). -- Kent Tong Useful news for CIO's at http://www2.cpttm.org.mo/cyberlab/cio-news - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Unit Test InMethod DataGrid
what about grabbing the model behind and checking that instead? 2010/6/3 Ronan O'Connell : > Hi, > > Does anybody know how to check the values of individual cells of an InMethod > DataGrid/Treedrid. in a unit test? > > Looking at the output of WicketTester.debugComponentTrees() I can see that > the grid row is the deepest level with a wicket id: > > NFO - BaseWicketTester - path > panel:storyGrid:form:bodyContainer:body > com.inmethod.grid.datagrid.DataGridBody > INFO - BaseWicketTester - path > panel:storyGrid:form:bodyContainer:body:row > com.inmethod.grid.common.AbstractPageableView > INFO - BaseWicketTester - path > panel:storyGrid:form:bodyContainer:body:row:1 > org.apache.wicket.markup.repeater.Item > INFO - BaseWicketTester - path > panel:storyGrid:form:bodyContainer:body:row:1:item > com.inmethod.grid.common.AbstractGridRow > INFO - BaseWicketTester - path > panel:storyGrid:form:bodyContainer:body:row:2 > org.apache.wicket.markup.repeater.Item > INFO - BaseWicketTester - path > panel:storyGrid:form:bodyContainer:body:row:2:item > com.inmethod.grid.common.AbstractGridRow > > I've looked at those component classes and can't see anything helpful in > them. > > Hoping I'm not missing the obvious, > Ronan > > > > > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Unit Test InMethod DataGrid
Hi, Does anybody know how to check the values of individual cells of an InMethod DataGrid/Treedrid. in a unit test? Looking at the output of WicketTester.debugComponentTrees() I can see that the grid row is the deepest level with a wicket id: NFO - BaseWicketTester - path panel:storyGrid:form:bodyContainer:body com.inmethod.grid.datagrid.DataGridBody INFO - BaseWicketTester - path panel:storyGrid:form:bodyContainer:body:row com.inmethod.grid.common.AbstractPageableView INFO - BaseWicketTester - path panel:storyGrid:form:bodyContainer:body:row:1 org.apache.wicket.markup.repeater.Item INFO - BaseWicketTester - path panel:storyGrid:form:bodyContainer:body:row:1:item com.inmethod.grid.common.AbstractGridRow INFO - BaseWicketTester - path panel:storyGrid:form:bodyContainer:body:row:2 org.apache.wicket.markup.repeater.Item INFO - BaseWicketTester - path panel:storyGrid:form:bodyContainer:body:row:2:item com.inmethod.grid.common.AbstractGridRow I've looked at those component classes and can't see anything helpful in them. Hoping I'm not missing the obvious, Ronan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org