@Test
public void testAjaxFoldingPanelInside() {
testAppFunctionalPage("/components/tabbedpane/foldingPanelIn.jsf");
tabSet("fn:loadingModes").setTabIndex(2, ServerLoadingMode.getInstance());
ElementInspector firstPanelCaption = element("fn:firstFoldingPanelCaption");
firstPanelCaption.assertVisible(true);
ElementInspector firstPanelContent = element("fn:firstFoldingPanelContent");
firstPanelContent.assertElementExists(false);
ElementInspector secondPanelCaption = element("fn:secondFoldingPanelCaption");
secondPanelCaption.assertElementExists(false);
ElementInspector secondPanelContent = element("fn:secondFoldingPanelContent");
secondPanelContent.assertElementExists(false);
foldingPanel("fn:firstFoldingPanelID").toggle().clickAndWait(OpenFacesAjaxLoadingMode.getInstance());
firstPanelContent.assertVisible(true);
element("fn:secondTabID").clickAndWait();
secondPanelCaption.assertVisible(true);
secondPanelContent.assertElementExists(false);
foldingPanel("fn:secondFoldingPanelID").toggle().clickAndWait(OpenFacesAjaxLoadingMode.getInstance());
secondPanelContent.assertVisible(true);
}