Package org.zanata.workflow

Examples of org.zanata.workflow.BasicWorkFlow


    @Feature(summary = "The user must enter both an account name and email " +
            "address to reset their password",
            tcmsTestPlanIds = 5316, tcmsTestCaseIds = 0)
    @Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
    public void emptyResetPasswordFieldEntries() {
        ResetPasswordPage resetPasswordPage = new BasicWorkFlow()
                .goToHome()
                .clickSignInLink()
                .goToResetPassword()
                .clearFields()
                .resetFailure();
View Full Code Here


        // open editor
        new LoginWorkFlow().signIn("admin", "admin");
        // webTrans
        final EditorPage editorPage =
                new BasicWorkFlow().goToEditor("base", "master", "pl",
                        "test.pot");

        String translation = editorPage.getMessageTargetAtRowIndex(0);
        // for some reason getText() will return one space in it
        assertThat(translation.trim()).isEmpty();
View Full Code Here

        // open editor
        new LoginWorkFlow().signIn("admin", "admin");
        // webTrans
        final EditorPage editorPage =
                new BasicWorkFlow().goToEditor("base", "beta", "pl",
                        "test.pot");

        String translation = editorPage.getMessageTargetAtRowIndex(0);
        // for some reason getText() will return one space in it
        assertThat(translation.trim()).isEmpty();
View Full Code Here

    private TestFileGenerator testFileGenerator = new TestFileGenerator();
    private String documentStorageDirectory;

    @Before
    public void before() {
        new BasicWorkFlow().goToHome().deleteCookiesAndRefresh();
        zanataRestCaller = new ZanataRestCaller();
        zanataRestCaller.createProjectAndVersion("uploadtest",
                "txt-upload", "file");
        documentStorageDirectory = CleanDocumentStorageRule
                .getDocumentStoragePath()
View Full Code Here

    private TestFileGenerator testFileGenerator = new TestFileGenerator();
    private String documentStorageDirectory;

    @Before
    public void before() {
        new BasicWorkFlow().goToHome().deleteCookiesAndRefresh();
        zanataRestCaller = new ZanataRestCaller();
        zanataRestCaller.createProjectAndVersion("multi-upload", "multi-upload",
            "file");
        documentStorageDirectory = CleanDocumentStorageRule
                .getDocumentStoragePath()
View Full Code Here

        new LoginWorkFlow().signIn("admin", "admin");
    }

    @Before
    public void goToGroupPage() {
        groupPage = new BasicWorkFlow()
                .goToHome()
                .goToGroups()
                .createNewGroup();
    }
View Full Code Here

    }

    private static EditorPage verifyPluralPushedToEditor() {
        // verify first message
        new LoginWorkFlow().signIn("admin", "admin");
        EditorPage editorPage = new BasicWorkFlow()
                .goToEditor("plurals", "master", "pl", "test");

        assertThat(editorPage.getMessageSourceAtRowIndex(0, Plurals.SourceSingular))
                .isEqualTo("One file removed");
        assertThat(editorPage.getMessageSourceAtRowIndex(0, Plurals.SourcePlural))
View Full Code Here

        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 static String TEST_html = "html";

    @Before
    public void before() {
        zanataRestCaller = new ZanataRestCaller();
        new BasicWorkFlow().goToHome().deleteCookiesAndRefresh();
        assumeFalse(
                "",
                new File(CleanDocumentStorageRule.getDocumentStoragePath()
                        .concat(File.separator).concat("documents")
                        .concat(File.separator)).exists());
View Full Code Here

                .as("Glossary delete was successful");


        new LoginWorkFlow().signIn("admin", "admin");
        EditorPage editorPage =
                new BasicWorkFlow().goToEditor("about-fedora", "master", "hi",
                        "About_Fedora")
                        .searchGlossary("hello");

        assertThat(editorPage.getGlossaryResultTable())
                .as("Glossary table is empty").isEmpty();

        editorPage = new BasicWorkFlow().goToEditor("about-fedora", "master",
                "pl", "About_Fedora")
                .searchGlossary("hello");

        assertThat(editorPage.getGlossaryResultTable()
                .get(1).get(1)).isEqualTo("cześć")
View Full Code Here

TOP

Related Classes of org.zanata.workflow.BasicWorkFlow

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.