Examples of clickSaveAndView()


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

        // Make sure we can still edit the object.
        oep.switchToEdit("Test", "EditObjectsTestObject");
        oep.getObjectsOfClass("Test.EditObjectsTestClass").get(0).setFieldValue(
            By.id("Test.EditObjectsTestClass_0_prop"), "that|other");
        vp = oep.clickSaveAndView();
        Assert.assertEquals("this is the content: that other", vp.getContent());
    }

    @Test
    public void testObjectAddAndRemove()
View Full Code Here

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

        // Delete the second object
        oep.deleteObject("XWiki.XWikiUsers", 1);

        // Let's save the form and check that changes were persisted.
        oep = oep.clickSaveAndView().editObjects();
        List<FormElement> xwikiUsersForms = oep.getObjectsOfClass("XWiki.XWikiUsers");
        Assert.assertEquals(1, xwikiUsersForms.size());
        Assert.assertEquals("John", xwikiUsersForms.get(0).getFieldValue(By.id("XWiki.XWikiUsers_0_first_name")));
    }
View Full Code Here

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

        // 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

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

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

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

        // Delete the first property from the class
        ClassEditPage cep = getUtil().editClass("Test", "EditObjectsTestClass");
View Full Code Here

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

        Assert.assertNotNull(getDriver().findElement(By.cssSelector(".deprecatedProperties label")));
        Assert.assertEquals("prop1:", getDriver().findElement(By.cssSelector(".deprecatedProperties label")).getText());

        // Remove deprecated properties
        oep.removeAllDeprecatedProperties();
        vp = oep.clickSaveAndView();
        Assert.assertEquals("this is the content: /testing value 2/", vp.getContent());
    }

    @Test
    public void addInvalidProperty()
View Full Code Here

Examples of org.xwiki.test.ui.framework.elements.editor.PreferencesEditPage.clickSaveAndView()

    {
        PreferencesUserProfilePage preferencesPage = this.customProfilePage.switchToPreferences();
        // Setting to Simple user
        PreferencesEditPage preferencesEditPage = preferencesPage.editPreferences();
        preferencesEditPage.setSimpleUserType();
        preferencesEditPage.clickSaveAndView();
        preferencesPage = this.customProfilePage.switchToPreferences();
        Assert.assertEquals(SIMPLE_USER, this.customProfilePage.getUserType());

        // Setting to Advanced user
        preferencesEditPage = preferencesPage.editPreferences();
View Full Code Here

Examples of org.xwiki.test.ui.framework.elements.editor.PreferencesEditPage.clickSaveAndView()

        Assert.assertEquals(SIMPLE_USER, this.customProfilePage.getUserType());

        // Setting to Advanced user
        preferencesEditPage = preferencesPage.editPreferences();
        preferencesEditPage.setAdvancedUserType();
        preferencesEditPage.clickSaveAndView();
        this.customProfilePage.switchToPreferences();
        Assert.assertEquals(ADVANCED_USER, this.customProfilePage.getUserType());
    }

    /** Functionality check: changing the default editor. */
 
View Full Code Here

Examples of org.xwiki.test.ui.framework.elements.editor.PreferencesEditPage.clickSaveAndView()

        PreferencesUserProfilePage preferencesPage = this.customProfilePage.switchToPreferences();

        // Setting to Text Editor
        PreferencesEditPage preferencesEditPage = preferencesPage.editPreferences();
        preferencesEditPage.setDefaultEditorText();
        preferencesEditPage.clickSaveAndView();
        preferencesPage = this.customProfilePage.switchToPreferences();
        Assert.assertEquals(TEXT_EDITOR, this.customProfilePage.getDefaultEditorToUse());

        // Setting to WYSIWYG Editor
        this.customProfilePage.gotoPage();
View Full Code Here

Examples of org.xwiki.test.ui.framework.elements.editor.PreferencesEditPage.clickSaveAndView()

        // Setting to WYSIWYG Editor
        this.customProfilePage.gotoPage();
        preferencesPage = this.customProfilePage.switchToPreferences();
        preferencesEditPage = preferencesPage.editPreferences();
        preferencesEditPage.setDefaultEditorWysiwyg();
        preferencesEditPage.clickSaveAndView();
        preferencesPage = this.customProfilePage.switchToPreferences();
        Assert.assertEquals(WYSIWYG_EDITOR, this.customProfilePage.getDefaultEditorToUse());

        // Setting to Default Editor
        this.customProfilePage.gotoPage();
View Full Code Here

Examples of org.xwiki.test.ui.framework.elements.editor.PreferencesEditPage.clickSaveAndView()

        // Setting to Default Editor
        this.customProfilePage.gotoPage();
        preferencesPage = this.customProfilePage.switchToPreferences();
        preferencesEditPage = preferencesPage.editPreferences();
        preferencesEditPage.setDefaultEditorDefault();
        preferencesEditPage.clickSaveAndView();
        preferencesPage = this.customProfilePage.switchToPreferences();
        Assert.assertEquals(DEFAULT_EDITOR, this.customProfilePage.getDefaultEditorToUse());
    }

    /**
 
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.