Examples of HomePage


Examples of org.xwiki.test.ui.xe.elements.HomePage

        getUtil().createPage(space, existingPageName, "Page that already exists", "Existing page");
        String existingSpace = this.getClass().getSimpleName() + ((int) (Math.random() * 1000));
        getUtil().createPage(existingSpace, "WebHome", "{{spaceindex /}}", "New random space");

        // 1/ create an empty page that already exists
        HomePage homePage = new HomePage();
        homePage.gotoPage();
        CreatePagePage createPage = homePage.createPage();
        createPage.setSpace(space);
        createPage.setPage(existingPageName);
        String currentURL = getDriver().getCurrentUrl();
        createPage.clickCreate();
        // make sure that we stay on the same page and that an error is displayed to the user. Maybe we should check the
        // error
        Assert.assertEquals(currentURL, getDriver().getCurrentUrl());
        createPage.waitForErrorMessage();

        // 2/ create a page from template that already exists
        // restart everything to make sure it's not the error before
        homePage.gotoPage();
        createPage = homePage.createPage();
        createPage.setSpace(space);
        createPage.setPage(existingPageName);
        createPage.setTemplate(space + "." + templateProviderName);
        currentURL = getDriver().getCurrentUrl();
        createPage.clickCreate();
        // make sure that we stay on the same page and that an error is displayed to the user. Maybe we should check the
        // error
        Assert.assertEquals(currentURL, getDriver().getCurrentUrl());
        createPage.waitForErrorMessage();

        // 3/ create a space that already exists
        homePage.gotoPage();
        CreateSpacePage createSpace = homePage.createSpace();
        currentURL = getDriver().getCurrentUrl();
        // strip the parameters out of this URL
        currentURL =
            currentURL.substring(0, currentURL.indexOf('?') > 0 ? currentURL.indexOf('?') : currentURL.length());
        createSpace.createSpace(existingSpace);
View Full Code Here

Examples of org.xwiki.test.ui.xe.elements.HomePage

     * Verify that we can skip the default delete result page and instead redirect to any page we want.
     */
    @Test
    public void testDeletePageCanDoRedirect()
    {
        HomePage homePage = new HomePage();
        getUtil().gotoPage(SPACE_VALUE, PAGE_VALUE, DELETE_ACTION, "xredirect=" + homePage.getURL());
        WebElement yesButton = getDriver().findElement(By.xpath("//input[@value='yes']"));
        yesButton.click();
        Assert.assertTrue(homePage.isOnHomePage());
    }
View Full Code Here

Examples of org.xwiki.test.ui.xe.elements.HomePage

        super.setUp();

        getUtil().deletePage("\u0219", "WebHome");
        getUtil().deletePage("Main", "\u0219");

        this.homePage = new HomePage();
        this.homePage.gotoPage();
    }
View Full Code Here

Examples of org.xwiki.test.ui.xe.elements.HomePage

     * Tests if a new space can be created from the Space dashboard.
     */
    @Test
    public void testCreateSpace()
    {
        HomePage homePage = new HomePage();
        homePage.gotoPage();
        WYSIWYGEditPage editPage = homePage.getSpacesPane().createSpace(getTestClassName());

        // Verify that space creation uses the space name as the space home page's title
        Assert.assertEquals(getTestClassName(), editPage.getDocumentTitle());

        // Verify that the space created is correct by looking at the generate metadata in the HTML header
View Full Code Here

Examples of org.xwiki.test.ui.xe.elements.HomePage

        editPage.switchToEdit(spaceName, "WebHome");
        editPage.setContent("Content");
        editPage.clickSaveAndView();

        // Navigate to the Home Page and click on the SpaceIndex.
        HomePage homePage = new HomePage();
        homePage.gotoPage();
        homePage.getSpacesPane().clickSpaceIndex(spaceName);

        // TODO: Improve the following test by asserting the content of the Livetable in the SpaceIndexPage
        Assert.assertEquals(getUtil().getURL("Main", "SpaceIndex", "view", "space=" + getUtil().escapeURL(spaceName)),
            getDriver().getCurrentUrl());
    }
View Full Code Here

Examples of org.zanata.page.utility.HomePage

    @Feature(summary = "The administrator can edit the home screen in " +
            "WYSIWYG mode",
            tcmsTestPlanIds = 5316, tcmsTestCaseIds = 0)
    @Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
    public void editPageContent() throws Exception {
        HomePage homePage = new LoginWorkFlow()
                .signIn("admin", "admin")
                .goToHomePage()
                .goToEditPageContent()
                .enterText("Test")
                .update();

        assertThat(homePage.getMainBodyContent()).isEqualTo("Test")
                .as("Homepage text has been updated");
    }
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.