@Test
  public void testNestedParams(Template template) {
    AutoTester autoTester = getAutoTester(this);
    autoTester.renderPage(template, RESET_METHOD);

    autoTester.testRequestParameters(params);
  }
  @Test
  public void testAjaxSingle(Template template) {
    AutoTester autoTester = getAutoTester(this);
    autoTester.renderPage(template, RESET_METHOD);

    autoTester.testAjaxSingle();
  }
  @Test
  public void testAjaxSingleWithProcessExternalValidationFailed(Template template) {
    AutoTester autoTester = getAutoTester(this);
    autoTester.renderPage(template, RESET_METHOD);

    autoTester.testAjaxSingleWithProcesExternalValidation(true);
  }
  @Test
  public void testWithExternalvalidationFailure(Template template) {
    AutoTester autoTester = getAutoTester(this);
    autoTester.renderPage(template, RESET_METHOD);

    autoTester.testExtrenalValidationFailure();
  }
  @Test
  public void testRendered(Template template) {
    AutoTester tester = getAutoTester(this);
    tester.renderPage(template, RESET_METHOD);

    tester.testRendered();
  }
  @Test
  public void testByPassUpdates(Template template) {
    AutoTester tester = getAutoTester(this);
    tester.renderPage(template, RESET_METHOD);

    tester.testBypassUpdate();
  }
  @Test
  public void testLimitToList(Template template) {
    AutoTester tester = getAutoTester(this);
    tester.renderPage(template, RESET_METHOD);

    tester.testLimitToList();
  }
  @Test
  public void testOnComplete(Template template) {
    AutoTester tester = getAutoTester(this);
    tester.renderPage(template, RESET_METHOD);

    tester.testOncomplete();
  }
  @Test
  public void testCommonHiperLink(Template template) {
    AutoTester tester = getAutoTester(this);
    tester.renderPage(template, RESET_METHOD);

    String submit = tester.getClientId("submit1");
    selenium.click(submit);
    waitForPageToLoad();

    tester.checkActionListener(true);
  }
예제 #10
0
  @Test()
  public void testClassStylesAndHtmlAttributes(Template template) {
    AutoTester tester = getAutoTester(this);
    tester.renderPage(template, RESET_METHOD);

    String ddMenuId = tester.getClientId(AutoTester.COMPONENT_ID);
    String ddMenuGroup = tester.getClientId("group1");
    String ddMenuItem = tester.getClientId("item1");
    String ddMenuIdPath = "//div[@id='" + ddMenuId + "']/div[1]";

    assertClassNames(
        ddMenuId,
        new String[] {"rich-ddmenu-label", "rich-ddmenu-label-unselect"},
        "Drop down menu has unexpected css classes",
        true);
    assertClassNames(
        ddMenuId,
        new String[] {"dropDownMenuClass"},
        "Class attribute does not work for DropDown menu component",
        true);
    assertClassNames(
        ddMenuGroup,
        new String[] {"rich-menu-group-enabled", "rich-menu-group"},
        "Menu group has unexpected css classes",
        true);
    assertClassNames(
        ddMenuGroup,
        new String[] {"menuGroupClass"},
        "Class attribute does not work for Menu group component",
        true);
    assertClassNames(
        ddMenuItem,
        new String[] {"rich-menu-item-enabled", "rich-menu-item"},
        "Menu item has unexpected css classes",
        true);
    assertClassNames(
        ddMenuItem,
        new String[] {"menuItemClass"},
        "Class attribute does not work for Menu item component",
        true);

    assertStyleAttribute(
        ddMenuId, "color: red", "Style attribute for Drop down menu does not work");
    assertStyleAttribute(
        ddMenuGroup, "color: green", "Style attribute for Menu droup component does not work");
    assertStyleAttribute(
        ddMenuItem, "color: black", "Style attribute for Menu item component does not work");

    selenium.mouseOver(ddMenuIdPath);
    waiteForCondition(getElementById(ddMenuId + "_menu") + ".style.display != 'none'", 5000);
    selenium.mouseOver(ddMenuGroup);
    waiteForCondition(getElementById(ddMenuGroup + "_menu") + ".style.display != 'none'", 5000);
    selenium.mouseOver(ddMenuId);

    assertClassNames(
        ddMenuGroup,
        new String[] {"menuGroupSelectClass"},
        "selectClass attribute does not work for Menu group component",
        true);
    assertEvent(
        "ddmenuOnmouseover", "Onmouseover attribute does not work for DropDown menu component");
    assertEvent("ddmenuOnexpand", "Onexpand attribute does not work for DropDown menu component");
    assertEvent(
        "ddmenuOngroupactivate",
        "Ongroupactivate attribute does not work for DropDown menu component");
    assertEvent(
        "ddmenuGroupOnmouseover", "Onmouseover attribute does not work for Menu group component");
    assertEvent("ddmenuGroupOnopen", "Onopen attribute does not work for Menu group component");

    selenium.mouseMove(ddMenuId);
    selenium.mouseOut(ddMenuId);
    assertEvent("ddmenuOnmousemove", "onmousemove does not work for Drop down menu");
    assertEvent("ddmenuOnmouseout", "onmouseout does not work for Drop down menu");

    selenium.mouseMove(ddMenuGroup);
    selenium.mouseOut(ddMenuGroup);
    assertEvent("ddmenuGroupOnmousemove", "onmousemove does not work for Group menu");
    assertEvent("ddmenuGroupOnmouseout", "onmouseout does not work for Group menu");

    selenium.mouseMove(ddMenuItem);
    selenium.mouseOut(ddMenuItem);
    selenium.mouseDown(ddMenuItem);
    selenium.mouseUp(ddMenuItem);
    selenium.click(ddMenuItem);
    assertEvent("onmousedown", "onmousedown attribute does not work for Menu item component");
    assertEvent("onmousemove", "onmousemove attribute does not work for Menu item component");
    assertEvent("onmouseout", "onmouseout attribute does not work for Menu item component");
    assertEvent("onmouseup", "onmouseup attribute does not work for Menu item component");
    assertEvent("onclick", "onclick attribute does not work for Menu item component");

    assertEvent(
        "ddmenuOnitemselect", "Onitemselect attribute does not work for DropDown menu component");

    selenium.click("//body");
    waiteForCondition(getElementById(ddMenuId + "_menu") + ".style.display == 'none'", 5000);
    assertEvent(
        "ddmenuOncollapse", "oncollapse attribute does not work for DrownDownMenu component");
    assertEvent("ddmenuGroupOnclose", "onclose attribute does not work for Menu group component");
  }