Examples of TwoListSelectionInspector


Examples of org.seleniuminspector.openfaces.TwoListSelectionInspector

     @Test
    public void testTwoListSelectionInside() {
        testAppFunctionalPage("/components/foldingpanel/twoListSelectionIn.jsf");

        TwoListSelectionInspector twoListSelection = twoListSelection("fn:twoListSelectionID");
        twoListSelection.assertElementExists(false);

        foldingPanel("fn:TLSFoldingPanel").toggle().clickAndWait(OpenFacesAjaxLoadingMode.getInstance());
        twoListSelection.assertElementExists(true);
        twoListSelection.assertVisible(true);

        twoListSelection.addAllButton().click();
        twoListSelection.rightList().assertText("item 1 labelitem 5 labelitem 3 label");
    }
View Full Code Here

Examples of org.seleniuminspector.openfaces.TwoListSelectionInspector

    public void testTabindex() {
        testAppFunctionalPage("/components/twolistselection/twoListSelection_tabindex.jsf");

        final String tslTabindex = "123";

        TwoListSelectionInspector tls = twoListSelection("form1:tls1");

        checkTabindex(tls.leftList(), tslTabindex);
        checkTabindex(tls.rightList(), tslTabindex);

        checkTabindex(tls.addAllButton(), tslTabindex);
        checkTabindex(tls.removeButton(), tslTabindex);
        checkTabindex(tls.addButton(), tslTabindex);
        checkTabindex(tls.removeAllButton(), tslTabindex);

        checkTabindex(tls.moveUpButton(), tslTabindex);
        checkTabindex(tls.moveDownButton(), tslTabindex);

    }
View Full Code Here

Examples of org.seleniuminspector.openfaces.TwoListSelectionInspector

        assertTrue(selenium.isTextPresent("onadd works"));
        //todo: uncomment if JSFC-2698 and JSFC-1459 fixed
        /*assertTrue(selenium.isTextPresent("add"));*/

        //onremove
        TwoListSelectionInspector onremoveTwoListSelection = twoListSelection("formID:onremoveID");
        onremoveTwoListSelection.addAllButton().click();
        onremoveTwoListSelection.removeAllButton().click();
        assertTrue(selenium.isTextPresent("onremove works"));
        //todo: uncomment if JSFC-2698 and JSFC-1459 fixed
        /*assertTrue(selenium.isTextPresent("remove"));*/
    }
View Full Code Here

Examples of org.seleniuminspector.openfaces.TwoListSelectionInspector

        String[] oldTLSValues = new String[7];
        for (int i = 0; i < oldTLSValues.length; i++) {
            oldTLSValues[i] = window().document().getElementsByTagName("option").get(i).text();
        }

        TwoListSelectionInspector twoListSelection = twoListSelection("formID:TLS_ID");
        twoListSelection.addAllButton().click();
        element("formID:refresher").click();
        RichFacesAjaxLoadingMode.getInstance().waitForLoad();

        twoListSelection.addAllButton().click();
        for (int i = 0; i < oldTLSValues.length; i++) {
            String newValue = window().document().getElementsByTagName("option").get(i).text();
            assertFalse(newValue.equals(oldTLSValues[i]));
        }
    }
View Full Code Here

Examples of org.seleniuminspector.openfaces.TwoListSelectionInspector

        ElementInspector getValueButton = element("getValue");

        getValueButton.click();
        ElementInspector getOutputDiv = element("getOutput");
        getOutputDiv.assertText("itemV_3,itemV_5");
        TwoListSelectionInspector tls = twoListSelection("formID:withJSFunctions");
        checkLabelsCorrectness(tls, new String[]{"itemL_1", "itemL_2", "itemL_4", "itemL_6"},
                new String[]{"itemL_3", "itemL_5"}, null, null);
        ElementInspector serverValueOutput = element("formID:serverValue");
        serverValueOutput.assertText("itemV_3 itemV_5 ");
View Full Code Here

Examples of org.seleniuminspector.openfaces.TwoListSelectionInspector

        if (makeSubmit) {
            element("formID:submit").clickAndWait();
        }

        String tlsId = "formID:styled";
        TwoListSelectionInspector tls = twoListSelection(tlsId);
        ElementInspector leftList = tls.leftList();
        ElementInspector rightList = tls.rightList();
        ElementInspector leftHeader = tls.leftListHeader();
        ElementInspector rightHeader = tls.rightListHeader();
        InputInspector addBtn = tls.addButton();
        InputInspector addAllBtn = tls.addAllButton();
        InputInspector removeBtn = tls.removeButton();
        InputInspector removeAllBtn = tls.removeAllButton();
        InputInspector moveUpBtn = tls.moveUpButton();
        InputInspector moveDownBtn = tls.moveDownButton();

        String allButtonsStyle = "color: red; background-color: yellow; border: 2px solid green;";
        addAllBtn.assertStyle(allButtonsStyle);
        addBtn.assertStyle(allButtonsStyle);
        removeBtn.assertStyle(allButtonsStyle);
        removeAllBtn.assertStyle(allButtonsStyle);
        moveUpBtn.assertStyle(allButtonsStyle);
        moveDownBtn.assertStyle(allButtonsStyle);

        //headerStyle="color: pink; border: 2px dashed blue; background: beige;"
        leftHeader.assertText("Available items");
        rightHeader.assertText("Selected items");
        leftHeader.assertStyle("background-color: beige; color: pink; border: 2px dashed blue;");
        rightHeader.assertStyle("background-color: beige; color: pink; border: 2px dashed blue;");

        leftList.assertStyle("background-color: azure;");
        rightList.assertStyle("background-color: azure;");
        List<ElementInspector> options = leftList.childNodesByName("option");
        for (int i = 0; i < 6; i++) {
            ElementInspector option = options.get(i);
            option.assertText("itemL_" + (i + 1));
            option.assertStyle("font-weight: bold");
        }

        //style="width: 500px; border: 3px dotted brown;"
        tls.assertWidth(500);

        addAllBtn.assertExpressionEquals("title", "add all hint");
        addAllBtn.assertValue("add all");

        addBtn.assertExpressionEquals("title", "add hint");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.