Search in sources :

Example 1 with DivTestPanel

use of org.odlabs.wiquery.core.commons.DivTestPanel in project wiquery by WiQuery.

the class JsQueryTestCase method setUp.

@Override
@Before
public void setUp() {
    super.setUp();
    Panel panel = new DivTestPanel("panelId");
    WebMarkupContainer component = new WebMarkupContainer("anId");
    component.setMarkupId("anId");
    panel.add(component);
    jsQuery = new JsQuery(component);
    tester.startComponentInPage(panel);
}
Also used : Panel(org.apache.wicket.markup.html.panel.Panel) DivTestPanel(org.odlabs.wiquery.core.commons.DivTestPanel) DivTestPanel(org.odlabs.wiquery.core.commons.DivTestPanel) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer) Before(org.junit.Before)

Example 2 with DivTestPanel

use of org.odlabs.wiquery.core.commons.DivTestPanel in project wiquery by WiQuery.

the class EffectBehaviorTestCase method setUp.

@Override
@Before
public void setUp() {
    super.setUp();
    effectBehavior = new EffectBehavior(new Hide());
    Panel panel = new DivTestPanel("panelId");
    component = new WebMarkupContainer("anId");
    component.setMarkupId(component.getId());
    component.setOutputMarkupId(true);
    component.add(effectBehavior);
    panel.add(component);
    tester.startComponentInPage(panel);
}
Also used : Hide(org.odlabs.wiquery.core.effects.basic.Hide) Panel(org.apache.wicket.markup.html.panel.Panel) DivTestPanel(org.odlabs.wiquery.core.commons.DivTestPanel) DivTestPanel(org.odlabs.wiquery.core.commons.DivTestPanel) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer) Before(org.junit.Before)

Example 3 with DivTestPanel

use of org.odlabs.wiquery.core.commons.DivTestPanel in project wiquery by WiQuery.

the class JsStatementTestCase method test$Component.

/**
 * Test method for
 * {@link org.odlabs.wiquery.core.javascript.JsStatement#$(org.apache.wicket.Component)}
 * .
 */
@Test
public void test$Component() {
    final WebMarkupContainer component = new WebMarkupContainer("anId");
    Panel panel = new DivTestPanel("panelId");
    component.setMarkupId("anId");
    panel.add(component);
    tester.startComponentInPage(panel);
    assertAndLog("$('#anId');", jsStatement.$(component).render());
}
Also used : Panel(org.apache.wicket.markup.html.panel.Panel) DivTestPanel(org.odlabs.wiquery.core.commons.DivTestPanel) DivTestPanel(org.odlabs.wiquery.core.commons.DivTestPanel) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer) Test(org.junit.Test)

Example 4 with DivTestPanel

use of org.odlabs.wiquery.core.commons.DivTestPanel in project wiquery by WiQuery.

the class JsStatementTestCase method test$ComponentString.

/**
 * Test method for
 * {@link org.odlabs.wiquery.core.javascript.JsStatement#$(org.apache.wicket.Component, java.lang.String)}
 * .
 */
@Test
public void test$ComponentString() {
    assertAndLog("$('span');", jsStatement.$(null, "span").render());
    jsStatement = new JsStatement();
    final WebMarkupContainer component = new WebMarkupContainer("anId");
    Panel panel = new DivTestPanel("panelId");
    component.setMarkupId("anId");
    panel.add(component);
    tester.startComponentInPage(panel);
    assertAndLog("$('#anId span');", jsStatement.$(component, "span").render());
}
Also used : Panel(org.apache.wicket.markup.html.panel.Panel) DivTestPanel(org.odlabs.wiquery.core.commons.DivTestPanel) DivTestPanel(org.odlabs.wiquery.core.commons.DivTestPanel) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer) Test(org.junit.Test)

Aggregations

WebMarkupContainer (org.apache.wicket.markup.html.WebMarkupContainer)4 Panel (org.apache.wicket.markup.html.panel.Panel)4 DivTestPanel (org.odlabs.wiquery.core.commons.DivTestPanel)4 Before (org.junit.Before)2 Test (org.junit.Test)2 Hide (org.odlabs.wiquery.core.effects.basic.Hide)1