// All DataTable features, that use Ajax is Tested on the demo (DataTable_general.jsf) @Test public void testFoldingPanelAjax() throws Exception { testAppFunctionalPage("/components/foldingpanel/foldingPanelAjax.jsf"); element("form1:Output").assertElementExists(false); foldingPanel("form1:fp1").toggle().clickAndWait(OpenFacesAjaxLoadingMode.getInstance()); element("form1:output1").assertElementExists(true); element("form1:input1").assertElementExists(true); }
// JSFC-1954 @Ignore @Test public void disabledTestFPClientValidation() throws Exception { Selenium selenium = getSelenium(); testAppFunctionalPage("/components/foldingpanel/foldingPanelAjax.jsf"); foldingPanel("form1:fp1").toggle().clickAndWait(OpenFacesAjaxLoadingMode.getInstance()); selenium.type("form1:input1", ""); selenium.click("form1:sumbitForm1"); assertTrue(selenium.isTextPresent("\"input1\": Value is required.")); assertTrue(selenium.isTextPresent("Validation Error")); }
@Test public void testTabbedPaneAjax() throws Exception { testAppFunctionalPage("/components/tabbedpane/tabbedPaneAjax.jsf"); ElementInspector tab1Output = element("form1:tab1Output"); tab1Output.assertElementExists(true); ElementInspector tab2Output = element("form1:tab2Output"); tab2Output.assertElementExists(false); ElementInspector tab3Output = element("form1:tab3Output"); tab3Output.assertElementExists(false); ElementInspector tab4Output = element("form1:tab4Output"); tab4Output.assertElementExists(false); List<ElementInspector> tabs = tabbedPane("form1:tp1").tabSet().tabs(); tabs.get(1).clickAndWait(OpenFacesAjaxLoadingMode.getInstance()); tab2Output.assertElementExists(true); tabs.get(2).clickAndWait(OpenFacesAjaxLoadingMode.getInstance()); tab3Output.assertElementExists(true); tabs.get(3).clickAndWait(OpenFacesAjaxLoadingMode.getInstance()); tab4Output.assertElementExists(true); tabs.get(0).click(); tab1Output.assertElementExists(true); }
// JSFC-1954 @Ignore @Test public void disabledTestTPClientValidation() throws Exception { Selenium selenium = getSelenium(); testAppFunctionalPage("/components/tabbedpane/tabbedPaneAjax.jsf"); tabbedPane("form1:tp1").tabSet().tabs().get(1).click(); OpenFacesAjaxLoadingMode.getInstance().waitForLoad(); selenium.type("form1:input2", ""); selenium.click("form1:submitForm"); assertTrue(selenium.isTextPresent("\"input2\": Value is required.")); assertTrue(selenium.isTextPresent("Validation Error")); }
@Ignore @Test public void disabledTestPagingValidation() throws Exception { Selenium selenium = getSelenium(); testAppFunctionalPage("/components/datatable/dataTableAjax.jsf"); selenium.type("form2:dataTable2:0:inputProfession2", ""); selenium.click("form2:dataTable2:paginator2--nextPage"); OpenFacesAjaxLoadingMode.getInstance().waitForLoad(); assertEquals("John Smith", selenium.getValue("form2:dataTable2:0:inputName2")); assertTrue(selenium.isTextPresent("\"inputProfession2\": Value is required.")); assertTrue(selenium.isTextPresent("Validation Error")); assertEquals("1", selenium.getValue("form2:dataTable2:paginator2--pageNo")); }
// JSFC-1953 @Ignore @Test public void disabledTestFPMessages() throws Exception { Selenium selenium = getSelenium(); testAppFunctionalPage("/components/foldingpanel/foldingPanelAjax.jsf"); FoldingPanelInspector fp2 = foldingPanel("form2:fp2"); fp2.toggle().click(); OpenFacesAjaxLoadingMode.getInstance().waitForLoad(); selenium.type("form2:input2", ""); selenium.click("form2:submitForm2"); waitForPageToLoad(); fp2.toggle().click(); selenium.click("form2:submitForm2"); waitForPageToLoad(); assertFalse(selenium.isElementPresent("form1:input2")); assertFalse(selenium.isTextPresent("\"input2\": Value is required.")); assertFalse(selenium.isTextPresent("Validation Error")); }