Package org.zanata.page.projects

Examples of org.zanata.page.projects.ProjectVersionsPage


    public void createABasicProject() throws Exception {
        assertThat(new LoginWorkFlow().signIn("admin", "admin").loggedInAs())
                .isEqualTo("admin")
                .as("User logs in");

        ProjectVersionsPage projectVersionsPage = new ProjectWorkFlow()
                .createNewSimpleProject("basicproject", "basicproject");

        assertThat(projectVersionsPage.getProjectName().trim())
                .isEqualTo("basicproject")
                .as("The project name is correct");
    }
View Full Code Here


     * @param versionType type of the version
     * @return new Version page, on the default Languages tab
     */
    public VersionLanguagesPage createNewProjectVersion(String projectName,
            String versionID, String versionType) {
        ProjectVersionsPage projectVersionsPage =
                goToProjectByName(projectName);
        if (projectVersionsPage.getVersions().contains(versionID)) {
            log.warn("{} has already been created. " +
                    "Presumably you are running this test manually and more" +
                    " than once.", versionID);
            return projectVersionsPage.gotoVersion(versionID);
        }
        CreateVersionPage createVersionPage = projectVersionsPage
                .clickCreateVersionLink();
        // First version has no copy options
        if (driver.findElements(By.id("create-version-form:copy-from-version"))
                .size() > 0) {
            createVersionPage = createVersionPage
View Full Code Here

                        .getTableRows(getDriver(), versionsInGroupTable);
        WebElement projectLink =
                tableRows.get(row).getCells().get(0)
                        .findElement(By.tagName("a"));
        projectLink.click();
        return new ProjectVersionsPage(getDriver());
    }
View Full Code Here

                        }
                        return null;
                    }
                });
        searchItem.click();
        return new ProjectVersionsPage(getDriver());
    }
View Full Code Here

    public ProjectVersionsPage clickProjectLink(String projectName) {
        log.info("Click Project link");
        waitForWebElement(versionPage)
                .findElement(By.linkText(projectName))
                .click();
        return new ProjectVersionsPage(getDriver());
    }
View Full Code Here

    @Feature(summary = "The administrator can change a project's name",
            tcmsTestPlanIds = 5316, tcmsTestCaseIds = 198431)
    @Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
    public void changeProjectName() throws Exception {
        String replacementText = "a new name";
        ProjectVersionsPage projectVersionsPage = new LoginWorkFlow()
                .signIn("admin", "admin")
                .goToProjects()
                .goToProject("about fedora")
                .gotoSettingsTab()
                .gotoSettingsGeneral()
                .enterProjectName(replacementText)
                .updateProject()
                .goToProjects()
                .goToProject(replacementText);

        assertThat(projectVersionsPage.getProjectName())
                .isEqualTo(replacementText)
                .as("The project name has changed");
    }
View Full Code Here

    @Feature(summary = "The administrator can change a project's description",
            tcmsTestPlanIds = 5316, tcmsTestCaseIds = 198431)
    @Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
    public void changeProjectDescription() throws Exception {
        String replacementText = "a new description";
        ProjectVersionsPage projectVersionsPage = new LoginWorkFlow()
                .signIn("admin", "admin")
                .goToProjects()
                .goToProject("about fedora");

        assertThat(projectVersionsPage.getContentAreaParagraphs())
                .doesNotContain(replacementText)
                .as("The description is default");

        ProjectGeneralTab projectGeneralTab = projectVersionsPage
                .gotoSettingsTab()
                .gotoSettingsGeneral()
                .enterDescription(replacementText)
                .updateProject();
View Full Code Here

    @Feature(summary = "The administrator can change a project's source urls",
            tcmsTestPlanIds = 5316, tcmsTestCaseIds = 198431)
    @Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
    public void changeSourceLinks() throws Exception {
        ProjectVersionsPage projectVersionsPage = new LoginWorkFlow()
                .signIn("admin", "admin")
                .goToProjects()
                .goToProject("about fedora")
                .gotoSettingsTab()
                .gotoSettingsGeneral()
                .enterHomePage("http://www.example.com")
                .enterRepository("http://www.test.com")
                .updateProject()
                .goToProjects()
                .goToProject("about fedora");

        assertThat(projectVersionsPage.getHomepage())
                .isEqualTo("http://www.example.com")
                .as("The homepage is correct");

        assertThat(projectVersionsPage.getGitUrl())
                .isEqualTo("http://www.test.com")
                .as("The git url is correct");
    }
View Full Code Here

                .signIn("translator", "translator")
                .loggedInAs())
                .isEqualTo("translator")
                .as("Login as translator");

        ProjectVersionsPage projectVersionsPage = new ProjectWorkFlow()
                .goToProjectByName(projectName)
                .waitForDisplayedVersions(2);

        assertVersions(projectVersionsPage, 2, new String[]{"bravo", "alpha"});

        projectVersionsPage = projectVersionsPage
                .clickSearchIcon()
                .enterVersionSearch("alpha")
                .waitForDisplayedVersions(1);

        assertVersions(projectVersionsPage, 1, new String[]{"alpha"});

        projectVersionsPage = projectVersionsPage
                .clearVersionSearch()
                .waitForDisplayedVersions(2);

        assertVersions(projectVersionsPage, 2, new String[]{"bravo", "alpha"});

        projectVersionsPage = projectVersionsPage
                .enterVersionSearch("bravo")
                .waitForDisplayedVersions(1);

        assertVersions(projectVersionsPage, 1, new String[]{"bravo"});

        projectVersionsPage = projectVersionsPage
                .clearVersionSearch()
                .enterVersionSearch("charlie")
                .waitForDisplayedVersions(0);

        assertVersions(projectVersionsPage, 0, new String[]{});

        projectVersionsPage = projectVersionsPage
                .clearVersionSearch()
                .waitForDisplayedVersions(2);

        assertVersions(projectVersionsPage, 2, new String[]{"bravo", "alpha"});
    }
View Full Code Here

                .createNewSimpleProject("version-nums", projectName)
                .getProjectName())
                .isEqualTo(projectName)
                .as("The project is created");

        ProjectVersionsPage projectVersionsPage = new ProjectWorkFlow()
                .createNewProjectVersion(projectName, "alpha")
                .clickProjectLink(projectName);
        projectVersionsPage.waitForDisplayedVersions(1);

        assertThat(projectVersionsPage.getNumberOfDisplayedVersions())
                .isEqualTo(1)
                .as("The version count is 1");

        projectVersionsPage = new ProjectWorkFlow()
                .createNewProjectVersion("version nums", "bravo")
                .clickProjectLink(projectName);
        projectVersionsPage.waitForDisplayedVersions(2);

        assertThat(projectVersionsPage.getNumberOfDisplayedVersions())
                .isEqualTo(2)
                .as("The version count is 2");
    }
View Full Code Here

TOP

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

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.