Package org.zanata.page.projectversion

Examples of org.zanata.page.projectversion.CreateVersionPage


        log.info("Click Create Version");
        gotoVersionsTab();

        clickLinkAfterAnimation(versionTabMoreAction);
        clickLinkAfterAnimation(createNewVersion);
        return new CreateVersionPage(getDriver());
    }
View Full Code Here


            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
                    .disableCopyFromVersion()
                    .selectProjectType(versionType);
        }
        return createVersionPage.inputVersionId(versionID).saveVersion();
    }
View Full Code Here

    @Feature(summary = "The user must enter an id to create a project version",
            tcmsTestPlanIds = 5316, tcmsTestCaseIds = 0)
    @Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
    public void idFieldMustNotBeEmpty() throws Exception {
        CreateVersionPage createVersionPage = new LoginWorkFlow()
                .signIn("admin", "admin")
                .goToProjects()
                .goToProject("about fedora")
                .clickCreateVersionLink()
                .inputVersionId("");
        createVersionPage.defocus();

        assertThat(createVersionPage.getErrors())
                .contains("value is required")
                .as("The empty value is rejected");
    }
View Full Code Here

    @Feature(summary = "The user must enter an id that starts and ends with " +
            "alphanumeric character to create a project version",
            tcmsTestPlanIds = 5316, tcmsTestCaseIds = 0)
    @Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
    public void idStartsAndEndsWithAlphanumeric() throws Exception {
        CreateVersionPage createVersionPage = new LoginWorkFlow()
                .signIn("admin", "admin")
                .goToProjects()
                .goToProject("about fedora")
                .clickCreateVersionLink()
                .inputVersionId("-A");
        createVersionPage.defocus();

        assertThat(createVersionPage.expectError(
                    CreateVersionPage.VALIDATION_ERROR))
                .contains(CreateVersionPage.VALIDATION_ERROR)
                .as("The input is rejected");

        createVersionPage = createVersionPage.inputVersionId("B-");
        createVersionPage.defocus();

        assertThat(createVersionPage.expectError(
                    CreateVersionPage.VALIDATION_ERROR))
                .contains(CreateVersionPage.VALIDATION_ERROR)
                .as("The input is rejected");

        createVersionPage = createVersionPage.inputVersionId("_C_");
        createVersionPage.defocus();
        createVersionPage = createVersionPage.waitForNumErrors(1);

        assertThat(createVersionPage.expectError(
                    CreateVersionPage.VALIDATION_ERROR))
                .contains(CreateVersionPage.VALIDATION_ERROR)
                .as("The input is rejected");

        createVersionPage = createVersionPage.inputVersionId("A-B_C");
        createVersionPage.defocus();
        createVersionPage = createVersionPage.waitForNumErrors(0);

        assertThat(createVersionPage.getErrors())
                .doesNotContain(CreateVersionPage.VALIDATION_ERROR)
                .as("The input is acceptable");
    }
View Full Code Here

TOP

Related Classes of org.zanata.page.projectversion.CreateVersionPage

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.