// Selenium selenium = getSelenium();
// testAppPage("functionalTesting/tabset/tabSetChangeListeners.jsf");
}
private void verifyStyles(TabSetInspector tabSet, int selectedTabIndex) {
ElementInspector firstTab = tabSet.tabs().get(0);
ElementInspector secondTab = tabSet.tabs().get(1);
TableInspector tabSetAsTable = new TableInspector(tabSet);
TableCellInspector emptySpaceCell = tabSetAsTable.body().row(0).cell(4);
emptySpaceCell.assertStyle("background: beige");
// backBorderStyle="2px solid SpringGreen"
if (selectedTabIndex == 0) {
secondTab.assertStyle("border-left: 2px solid SpringGreen; border-right: 2px solid SpringGreen;");
} else if (selectedTabIndex == 1) {
firstTab.assertStyle("border-left: 2px solid SpringGreen; border-right: 2px solid SpringGreen");
}
// frontBorderStyle="3px dashed OliveDrab"
if (selectedTabIndex == 0) {
secondTab.assertStyle("border-bottom: 3px dashed OliveDrab");
firstTab.assertStyle("border-right: 3px dashed OliveDrab");
} else if (selectedTabIndex == 1) {
firstTab.assertStyle("border-bottom: 3px dashed OliveDrab");
secondTab.assertStyle("border-right: 3px dashed OliveDrab");
}
emptySpaceCell.assertStyle("border-bottom: 3px dashed OliveDrab");
tabSetAsTable.body().row(0).cell(0).assertStyle("border-bottom: 3px dashed OliveDrab");
// tabStyle="background: azure; border-top: 1px dotted darkgreen; width: 70px;"
if (selectedTabIndex == 0) {
secondTab.assertStyle("background: azure; width: 70px; border-top: 1px dotted darkgreen");
} else if (selectedTabIndex == 1) {
firstTab.assertStyle("background: azure; width: 70px; border-top: 1px dotted darkgreen");
}
// selectedTabStyle="background: pink; border-top: 1px solid black;"
if (selectedTabIndex == 0) {
firstTab.assertStyle("background: pink; width: 70px; border-top: 1px solid black");
} else if (selectedTabIndex == 1) {
firstTab.assertStyle("background: azure; width: 70px; border-top: 1px dotted darkgreen");
}
// rolloverSelectedTabStyle="border: 2px dashed blue;"
if (selectedTabIndex == 0) {
firstTab.mouseOver();
//todo: uncomment it if JSFC-2991 is in fixed state
/*
assertBorderPropertyRenderedWell(selenium, firstTabId, null, WIDTH, "top", "2px");
assertBorderPropertyRenderedWell(selenium, firstTabId, null, STYLE, "top", "dashed");
assertBorderPropertyRenderedWell(selenium, firstTabId, null, COLOR, "top", "blue");
*/
firstTab.assertStyle("border-bottom: 2px dashed blue");
firstTab.mouseOut();
} else if (selectedTabIndex == 1) {
secondTab.mouseOver();
//todo: uncomment it if JSFC-2991 is in fixed state
/*
assertBorderPropertyRenderedWell(selenium, secondTabId, null, WIDTH, "top", "2px");
assertBorderPropertyRenderedWell(selenium, secondTabId, null, STYLE, "top", "dashed");
assertBorderPropertyRenderedWell(selenium, secondTabId, null, COLOR, "top", "blue");
*/
secondTab.assertStyle("border-bottom: 2px dashed blue");
secondTab.mouseOut();
}
// rolloverTabStyle="background: brown; font-weight: bold; border: 2px dotted green;"
if (selectedTabIndex == 0) {
secondTab.mouseOver();
secondTab.assertStyle("background: brown; font-weight: bold; border: 2px dotted green");
secondTab.mouseOut();
} else if (selectedTabIndex == 1) {
firstTab.mouseOver();
firstTab.assertStyle("background: brown; font-weight: bold; border: 2px dotted green");