Package org.xwiki.test.ui.po

Examples of org.xwiki.test.ui.po.ViewPage


     * @return the page that represents the class template
     */
    public ViewPage clickTemplateLink()
    {
        templateLink.click();
        return new ViewPage();
    }
View Full Code Here


     * @return the page that represents the class sheet
     */
    public ViewPage clickSheetLink()
    {
        sheetLink.click();
        return new ViewPage();
    }
View Full Code Here

     * @return the page object corresponding to the space home page
     */
    public ViewPage clickSpaceHome(String spaceName)
    {
        getDriver().findElement(By.xpath("//div[@class = 'spSpaceName']/a[. = '" + spaceName + "']")).click();
        return new ViewPage();
    }
View Full Code Here

    {
        String title = RandomStringUtils.randomAlphanumeric(3);
        this.editPage.setTitle(title);
        this.editPage.clickPreview();
        // The preview page has the action buttons but otherwise it is similar to a view page.
        Assert.assertEquals(title, new ViewPage().getDocumentTitle());
    }
View Full Code Here

        editPage.clickSaveAndView();
        getUtil().gotoPage(getTestClassName(), getTestMethodName(), "edit");
        Assert.assertEquals("icon:bell", editPage.getIcon());

        ApplicationsPanel panel = ApplicationsPanel.gotoPage();
        ViewPage page = panel.clickApplication(getTestClassName());
        // Verify we're on the right page!
        Assert.assertEquals(getTestClassName(), page.getMetaDataValue("space"));
        Assert.assertEquals(getTestMethodName(), page.getMetaDataValue("page"));
    }
View Full Code Here

        Assert.assertEquals("info", log.get(logSize - 1).getLevel());
        Assert.assertEquals("Finished job of type [install] with identifier "
            + "[extension/action/alice-xar-extension/wiki:xwiki]", log.get(logSize - 1).getMessage());

        // Test that both extensions are usable.
        ViewPage viewPage = getUtil().createPage(getTestClassName(), getTestMethodName(), "{{alice/}}\n\n{{bob/}}", "");
        String content = viewPage.getContent();
        Assert.assertTrue(content.contains("Alice says hello!"));
        Assert.assertTrue(content.contains("Bob says hi!"));

        // Check the list of installed extensions.
        adminPage = ExtensionAdministrationPage.gotoPage().clickInstalledExtensionsSection();
View Full Code Here

        Assert.assertEquals("info", log.get(log.size() - 1).getLevel());
        Assert.assertEquals("Finished job of type [install] with identifier "
            + "[extension/action/alice-xar-extension/wiki:xwiki]", log.get(log.size() - 1).getMessage());

        // Assert the changes.
        ViewPage viewPage = getUtil().gotoPage("ExtensionTest", "Alice");
        Assert.assertEquals("Alice Wiki Macro (upgraded)", viewPage.getDocumentTitle());
        Assert.assertTrue(viewPage.getContent().contains("Alice says hi guys!"));
    }
View Full Code Here

        Assert.assertEquals("info", lastLogItem.getLevel());
        Assert.assertEquals("Finished job of type [install] with identifier "
            + "[extension/action/alice-xar-extension/wiki:xwiki]", lastLogItem.getMessage());

        // Check the merge result.
        ViewPage mergedPage = getUtil().gotoPage("ExtensionTest", "Alice");
        Assert.assertEquals("Alice Wiki Macro (upgraded)", mergedPage.getDocumentTitle());
    }
View Full Code Here

        Assert.assertEquals("info", log.get(log.size() - 1).getLevel());
        Assert.assertEquals("Finished job of type [install] with identifier "
            + "[extension/action/alice-xar-extension/wiki:xwiki]", log.get(log.size() - 1).getMessage());

        // Assert the changes.
        ViewPage viewPage = getUtil().gotoPage("ExtensionTest", "Alice");
        Assert.assertEquals("Alice Macro", viewPage.getDocumentTitle());
        Assert.assertTrue(viewPage.getContent().contains("Alice says hello!"));
    }
View Full Code Here

     */
    @Test
    public void testInstallScriptService() throws Exception
    {
        // Make sure the script service is not available before the extension is installed.
        ViewPage viewPage =
            getUtil().createPage(
                getTestClassName(),
                getTestMethodName(),
                "{{velocity}}$services.greeter.greet('world') "
                    + "$services.greeter.greet('XWiki', 'default'){{/velocity}}", "");
        Assert.assertFalse(viewPage.getContent().contains("Hello world! Hello XWiki!"));

        // Setup the extension.
        ExtensionId extensionId = new ExtensionId("scriptServiceJarExtension", "4.2-milestone-1");
        TestExtension extension = getRepositoryTestUtils().getTestExtension(extensionId, "jar");
        getRepositoryTestUtils().addExtension(extension);
View Full Code Here

TOP

Related Classes of org.xwiki.test.ui.po.ViewPage

Copyright © 2018 www.massapicom. 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.