Package org.xwiki.test.ui.administration.elements

Examples of org.xwiki.test.ui.administration.elements.TemplatesAdministrationSectionPage


        editTemplatePage.setTitle(templateTitle);
        editTemplatePage.setContent(templateContent);
        editTemplatePage.clickSaveAndView();

        // Create the template provider
        TemplatesAdministrationSectionPage sectionPage = new TemplatesAdministrationSectionPage();
        sectionPage.gotoPage();
        TemplateProviderInlinePage templateProviderInline =
            sectionPage.createTemplateProvider(space, templateProviderName);
        templateProviderInline.setTemplateName("My Template");
        templateProviderInline.setTemplate(templateFullName);
        if (saveAndEdit) {
            templateProviderInline.setSaveAndEdit();
        }
View Full Code Here


        // we'll create all these pages during this test
        getUtil().deletePage(space, "NewUnexistingPage");
        getUtil().deletePage(space, "NewPage");
        getUtil().deletePage(space, "NewLinkedPage");
        // go through all the templates and make sure they are disabled on this space
        TemplatesAdministrationSectionPage sectionPage = new TemplatesAdministrationSectionPage();
        sectionPage.gotoPage();

        // get the links to existing templates, navigate to each of them and disable the current space
        List<String> spacesToExclude = new ArrayList<String>();
        spacesToExclude.add(space);
        List<WebElement> existingTemplatesLinks = sectionPage.getExistingTemplatesLinks();
        for (int i = 0; i < existingTemplatesLinks.size(); i++) {
            WebElement link = existingTemplatesLinks.get(i);
            link.click();
            ViewPage templateViewPage = new ViewPage();
            templateViewPage.editInline();
            TemplateProviderInlinePage providerEditPage = new TemplateProviderInlinePage();
            providerEditPage.excludeSpaces(spacesToExclude);
            providerEditPage.clickSaveAndView();

            // go back to the admin page, to leave this in a valid state
            sectionPage.gotoPage();
            existingTemplatesLinks = sectionPage.getExistingTemplatesLinks();
        }

        // TODO: should reset these template settings at the end of the test, to leave things in the same state as they
        // were at the beginning of the test
View Full Code Here

TOP

Related Classes of org.xwiki.test.ui.administration.elements.TemplatesAdministrationSectionPage

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.