Package org.zanata.page.projectversion

Examples of org.zanata.page.projectversion.VersionLanguagesPage


                    if (clicked) break;
                }
                return clicked;
            }
        });
        return new VersionLanguagesPage(getDriver());
    }
View Full Code Here


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

                                + translatorConfig);

        assertThat(client.isPushSuccessful(output)).isTrue();

        new LoginWorkFlow().signIn("admin", "admin");
        VersionLanguagesPage versionPage =
                new BasicWorkFlow().goToPage(String.format(
                        PROJECT_VERSION_TEMPLATE, "plurals", "master"),
                        VersionLanguagesPage.class);
        assertThat(versionPage.getStatisticsForLocale("pl"))
                .contains("0.0%");

        // push trans
        client.callWithTimeout(
                projectRootPath,
                "mvn -B zanata:push -Dzanata.pushType=trans -Dzanata.copyTrans=false -Dzanata.userConfig="
                        + translatorConfig);

        versionPage.reload();
        assertThat(versionPage.getStatisticsForLocale("pl")).contains("6.0%");

        // create new version
        restCaller.createProjectAndVersion("plurals", "beta", "podir");
        File updatedZanataXml = new File(Files.createTempDir(), "zanata.xml");
        generateZanataXml(updatedZanataXml, "plurals", "beta", "podir",
                Lists.newArrayList("pl"));
        // push source and run copyTrans
        client.callWithTimeout(
                projectRootPath,
                "mvn -B zanata:push -Dzanata.pushType=source -Dzanata.copyTrans=true -Dzanata.userConfig="
                        + translatorConfig
                        + " -Dzanata.projectConfig="
                        + updatedZanataXml.getAbsolutePath());

        VersionLanguagesPage betaVersionPage =
                new BasicWorkFlow().goToPage(String.format(
                        PROJECT_VERSION_TEMPLATE, "plurals", "beta"),
                        VersionLanguagesPage.class);

        assertThat(betaVersionPage.getStatisticsForLocale("pl")).contains("6.0%");
    }
View Full Code Here

            public String call() throws Exception {
                return editorPageFinal.getStatistics();
            }
        }, Matchers.containsString("100%"));

        VersionLanguagesPage versionPage =
                new BasicWorkFlow().goToPage(String.format(
                        PROJECT_VERSION_TEMPLATE, "obsolete-test", "master"),
                        VersionLanguagesPage.class);
        assertThat(versionPage.getStatisticsForLocale("fr"),
                Matchers.equalTo("100.0%"));
    }
View Full Code Here

    @Feature(summary = "The administrator can create a project version",
            tcmsTestPlanIds = 5316, tcmsTestCaseIds = 136517)
    @Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
    @Category(BasicAcceptanceTest.class)
    public void createASimpleProjectVersion() throws Exception {
        VersionLanguagesPage versionLanguagesPage = new LoginWorkFlow()
                .signIn("admin", "admin")
                .goToProjects()
                .goToProject("about fedora")
                .clickCreateVersionLink()
                .disableCopyFromVersion()
                .inputVersionId("my-aboutfedora-version")
                .saveVersion();

        assertThat(versionLanguagesPage.getProjectVersionName())
                .isEqualTo("my-aboutfedora-version")
                .as("The version is created with correct ID");
    }
View Full Code Here

TOP

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

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.