Package org.zanata.page.projects

Examples of org.zanata.page.projects.ProjectsPage


    @Feature(summary = "The system will provide no results on an " +
            "unsuccessful search",
            tcmsTestPlanIds = 5316, tcmsTestCaseIds = 0)
    @Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
    public void unsuccessfulProjectSearch() throws Exception {
        ProjectsPage projectsPage = new BasicWorkFlow()
                .goToHome()
                .enterSearch("arodef")
                .waitForSearchListContains("Search Zanata for 'arodef'")
                .submitSearch();

        assertThat(projectsPage.getProjectNamesOnCurrentPage().isEmpty())
                .isTrue()
                .as("No projects are displayed");
    }
View Full Code Here


     *            Project short name
     * @return new Project page for created project
     */
    public ProjectVersionsPage createNewSimpleProject(String projectId,
            String projectName) {
        ProjectsPage projectsPage = goToHome().goToProjects();
        List<String> projects = projectsPage.getProjectNamesOnCurrentPage();
        log.info("current projects: {}", projects);

        if (projects.contains(projectName)) {
            log.warn("{} already exists. This test environment is not clean.",
                    projectId);
            // since we can't create same project multiple times,
            // if we run this test more than once manually, we don't want it to
            // fail
            return projectsPage.goToProject(projectName);
        }
        return projectsPage.clickOnCreateProjectLink()
                .enterProjectId(projectId).enterProjectName(projectName)
                .pressCreateProject();
    }
View Full Code Here

     *            A HashMap of project identifiers and settings
     * @return a new Project page for the created project
     * @see {@link #projectDefaults()}
     */
    public ProjectVersionsPage createNewProject(HashMap<String, String> settings) {
        ProjectsPage projectsPage = goToHome().goToProjects();
        List<String> projects = projectsPage.getProjectNamesOnCurrentPage();
        log.info("current projects: {}", projects);
        CreateProjectPage createProjectPage = projectsPage
                .clickOnCreateProjectLink()
                .enterProjectName(settings.get("Name"))
                .enterProjectId(settings.get("Project ID"))
                .enterDescription(settings.get("Description"))
                .selectProjectType(settings.get("Project Type"));
View Full Code Here

        }
        return createVersionPage.inputVersionId(versionID).saveVersion();
    }

    public ProjectVersionsPage goToProjectByName(String projectName) {
        ProjectsPage projects = goToHome().goToProjects();
        log.info("go to project by name with current projects: {}, name: {}",
                projects.getProjectNamesOnCurrentPage(), projectName);
        return projects.goToProject(projectName);
    }
View Full Code Here

    }

    public ProjectsPage goToProjects() {
        log.info("Click Projects");
        clickNavMenuItem(getDriver().findElement(By.id("projects_link")));
        return new ProjectsPage(getDriver());
    }
View Full Code Here

    public ProjectsPage submitSearch() {
        log.info("Press Enter on Project search");
        getDriver().findElement(
                By.id("projectAutocomplete-autocomplete__input")).sendKeys(
                Keys.ENTER);
        return new ProjectsPage(getDriver());
    }
View Full Code Here

    @Feature(summary = "The administrator can set a project to read-only",
            tcmsTestPlanIds = 5316, tcmsTestCaseIds = 135848)
    @Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
    public void setAProjectToReadOnly() throws Exception {
        ProjectsPage projectsPage = new LoginWorkFlow()
                .signIn("admin", "admin")
                .goToProjects()
                .goToProject("about fedora")
                .gotoSettingsTab()
                .gotoSettingsGeneral()
                .lockProject()
                .goToProjects()
                .setActiveFilterEnabled(true)
                .setReadOnlyFilterEnabled(false)
                .setObsoleteFilterEnabled(false)
                .waitForProjectVisibility("about fedora", false);

        assertThat(projectsPage.getProjectNamesOnCurrentPage())
                .doesNotContain("about fedora")
                .as("The project is not displayed");

        projectsPage = projectsPage.setActiveFilterEnabled(false)
                .setReadOnlyFilterEnabled(true)
                .setObsoleteFilterEnabled(false)
                .waitForProjectVisibility("about fedora", true);

        assertThat(projectsPage.getProjectNamesOnCurrentPage())
                .contains("about fedora")
                .as("The project is now displayed");
    }
View Full Code Here

                .waitForProjectVisibility("about fedora", true)
                .getProjectNamesOnCurrentPage())
                .contains("about fedora")
                .as("The project is locked");

        ProjectsPage projectsPage = new BasicWorkFlow()
                .goToHome()
                .goToProjects()
                .goToProject("about fedora")
                .gotoSettingsTab()
                .gotoSettingsGeneral()
                .unlockProject()
                .goToProjects()
                .setActiveFilterEnabled(true)
                .setReadOnlyFilterEnabled(false)
                .setObsoleteFilterEnabled(false)
                .waitForProjectVisibility("about fedora", true);

        assertThat(projectsPage.getProjectNamesOnCurrentPage())
                .contains("about fedora")
                .as("The project is now displayed");
    }
View Full Code Here

    @Feature(summary = "The administrator can set a project to obsolete",
            tcmsTestPlanIds = 5316, tcmsTestCaseIds = 135846)
    @Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
    public void setAProjectObsolete() throws Exception {
        ProjectsPage projectsPage = new LoginWorkFlow()
                .signIn("admin", "admin")
                .goToProjects()
                .goToProject("about fedora")
                .gotoSettingsTab()
                .gotoSettingsGeneral()
                .archiveProject()
                .goToProjects();

        assertThat(projectsPage.getProjectNamesOnCurrentPage())
                .doesNotContain("about fedora")
                .as("The project is not displayed");

        projectsPage = projectsPage.setActiveFilterEnabled(false)
                .setReadOnlyFilterEnabled(false)
                .setObsoleteFilterEnabled(true);

        projectsPage.waitForProjectVisibility("about fedora", true);

        assertThat(projectsPage.getProjectNamesOnCurrentPage())
                .contains("about fedora")
                .as("The project is now displayed");

        projectsPage.logout();

        assertThat(new LoginWorkFlow()
                .signIn("translator", "translator")
                .goToProjects()
                .getProjectNamesOnCurrentPage())
View Full Code Here

TOP

Related Classes of org.zanata.page.projects.ProjectsPage

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.