Package org.xwiki.test.ui.po.editor

Examples of org.xwiki.test.ui.po.editor.ObjectEditPage.clickSaveAndView()


        ViewPage vp = wep.clickSaveAndView();

        // Add an XWikiGroups object
        ObjectEditPage oep = vp.editObjects();
        oep.addObject("XWiki.XWikiGroups");
        vp = oep.clickSaveAndView();

        oep = vp.editObjects();
        Assert.assertEquals(1, oep.getObjectsOfClass("XWiki.XWikiGroups").size());
    }
View Full Code Here


        // Add an object of the class created and set the value to be the test page
        ObjectEditPage oep = vp.editObjects();
        FormElement objectForm = oep.addObject("Test.EditObjectsTestClass");
        objectForm.setFieldValue(By.id("Test.EditObjectsTestClass_0_prop"), "Test.EditObjectsTestClass");
        oep.clickSaveAndView();

        // Set multiselect to true
        cep = ClassEditPage.gotoPage("Test", "EditObjectsTestClass");
        cep.getDatabaseListClassEditElement("prop").setMultiSelect(true);
        cep.clickSaveAndView();
View Full Code Here

        // Select a second document in the DB list select field.
        oep = ObjectEditPage.gotoPage("Test", "EditObjectsTestObject");
        oep.getObjectsOfClass("Test.EditObjectsTestClass").get(0).setFieldValue(
            By.id("Test.EditObjectsTestClass_0_prop"), "Test.EditObjectsTestObject");
        vp = oep.clickSaveAndView();

        Assert.assertEquals("this is the content", vp.getContent());
    }

    /**
 
View Full Code Here

        // Add object
        ObjectEditPage oep = vp.editObjects();
        FormElement objectForm = oep.addObject("Test.EditObjectsTestClass");
        objectForm.setFieldValue(By.id("Test.EditObjectsTestClass_0_prop"), "3");
        vp = oep.clickSaveAndView();
        Assert.assertEquals("this is the content: 3", vp.getContent());

        // Change number to double type
        cep = ClassEditPage.gotoPage("Test", "EditObjectsTestClass");
        cep.getNumberClassEditElement("prop").setNumberType("double");
View Full Code Here

        // Verify conversion
        oep = ObjectEditPage.gotoPage("Test", "EditObjectsTestObject");
        oep.getObjectsOfClass("Test.EditObjectsTestClass").get(0).setFieldValue(
            By.id("Test.EditObjectsTestClass_0_prop"), "2.5");
        vp = oep.clickSaveAndView();
        Assert.assertEquals("this is the content: 2.5", vp.getContent());

        // Change number to long type
        cep = ClassEditPage.gotoPage("Test", "EditObjectsTestClass");
        cep.getNumberClassEditElement("prop").setNumberType("long");
View Full Code Here

        vp = cep.clickSaveAndView();
        Assert.assertEquals("this is the content", vp.getContent());

        // Verify conversion
        oep = ObjectEditPage.gotoPage("Test", "EditObjectsTestObject");
        vp = oep.clickSaveAndView();
        Assert.assertEquals("this is the content: 2", vp.getContent());
    }

    /**
     * Prove that a list can be changed from relational storage to plain storage and back without database corruption.
View Full Code Here

        // Add an object of the class created
        ObjectEditPage oep = vp.editObjects();
        FormElement objectForm = oep.addObject("Test.EditObjectsTestClass");
        objectForm.setFieldValue(By.id("Test.EditObjectsTestClass_0_prop"), "testing value");
        vp = oep.clickSaveAndView();

        Assert.assertEquals("this is the content: testing value", vp.getContent());
    }

    @Test
View Full Code Here

        // Add an XWikiGroups object
        ObjectEditPage oep = vp.editObjects();
        FormElement objectForm = oep.addObject("XWiki.JavaScriptExtension");
        objectForm.setFieldValue(By.id("XWiki.JavaScriptExtension_0_code"), SCRIPT);
        objectForm.getSelectElement(By.id("XWiki.JavaScriptExtension_0_use")).select("always");
        oep.clickSaveAndView();
        waitForScriptResult();
        HomePage.gotoPage();
        waitForScriptResult();

        oep = ObjectEditPage.gotoPage("Test", "SkinxTest");
View Full Code Here

        waitForScriptResult();

        oep = ObjectEditPage.gotoPage("Test", "SkinxTest");
        objectForm = oep.getObjectsOfClass("XWiki.JavaScriptExtension").get(0);
        objectForm.getSelectElement(By.id("XWiki.JavaScriptExtension_0_use")).select("currentPage");
        oep.clickSaveAndView();
        waitForScriptResult();
        HomePage.gotoPage();
        try {
            waitForScriptResult();
            Assert.fail("The JSX should be active only on the current page.");
View Full Code Here

        }

        oep = ObjectEditPage.gotoPage("Test", "SkinxTest");
        objectForm = oep.getObjectsOfClass("XWiki.JavaScriptExtension").get(0);
        objectForm.getSelectElement(By.id("XWiki.JavaScriptExtension_0_use")).select("onDemand");
        oep.clickSaveAndView();
        try {
            waitForScriptResult();
            Assert.fail("The JSX should be active only on demand.");
        } catch (TimeoutException e) {
        }
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.