Examples of EditorPage


Examples of org.zanata.page.webtrans.EditorPage

                .as("The translation source is correct");
    }

    @Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
    public void formattingInSubEntries() throws Exception {
        EditorPage editorPage = uploadAndGoToDocument(
                testFileGenerator.generateTestFileWithContent(
                        "formattedsubfile",
                        ".sub",
                        "00:04:35.03,00:04:38.82" + sep +
                        "<b>Exactly the same text</b> {u}and more{/u}"));

        assertThat(editorPage.getMessageSourceAtRowIndex(0))
                .isEqualTo("<x1/>Exactly the same text<x2/> {u}and more{/u}")
                .as("The translation source is correct");
    }
View Full Code Here

Examples of org.zanata.page.webtrans.EditorPage

                .gotoSettingsTranslationTab()
                .setValidationLevel("Tab characters (\\t)", "Error");

        assumeTrue("RHBZ1017458", versionTranslationTab.hasNoCriticalErrors());

        EditorPage editorPage = new ProjectWorkFlow()
                .goToProjectByName("about fedora")
                .gotoVersion("master")
                .translate("fr", "About_Fedora");

        assertThat(editorPage.getBasicTranslationTargetAtRowIndex(0))
                .isEqualTo("")
                .as("The text in the translation target is blank");

        editorPage.pasteIntoRowAtIndex(0, "\t").saveAsFuzzyAtRow(0);
        editorPage.waitForValidationErrorsVisible();

        assertThat(editorPage.getValidationMessageCurrentTarget())
                .isEqualTo("Warning: none, Errors: 1")
                .as("The notification area shows there's an error");

        editorPage = editorPage.openValidationBox();

        assertThat(editorPage.getValidationMessageCurrentTarget())
                .contains("Target has more tabs (\\t) than source "
                        + "(source: 0, target: 1)")
                .as("The correct error is shown for the validation");
    }
View Full Code Here

Examples of org.zanata.page.webtrans.EditorPage

                .gotoSettingsTranslationTab()
                .setValidationLevel("Tab characters (\\t)", "Error");

        assumeTrue("RHBZ1017458", versionTranslationTab.hasNoCriticalErrors());

        EditorPage editorPage = new ProjectWorkFlow()
                .goToProjectByName("about fedora")
                .gotoVersion("master")
                .translate("fr", "About_Fedora")
                .openValidationOptions();

        assertThat(editorPage.isValidationOptionSelected(
                        EditorPage.Validations.TABS))
                .isTrue()
                .as("The option is selected");

        assertThat(editorPage.isValidationOptionAvailable(
                        EditorPage.Validations.TABS))
                .isFalse()
                .as("The option is unavailable");
    }
View Full Code Here

Examples of org.zanata.page.webtrans.EditorPage

                .gotoSettingsTranslationTab()
                .setValidationLevel("Tab characters (\\t)", "Off");

        assumeTrue("RHBZ1017458", versionTranslationTab.hasNoCriticalErrors());

        EditorPage editorPage = new ProjectWorkFlow()
                .goToProjectByName("about fedora")
                .gotoVersion("master")
                .translate("fr", "About_Fedora")
                .pasteIntoRowAtIndex(0, "\t")
                .saveAsFuzzyAtRow(0);

        assertThat(editorPage.isValidationMessageCurrentTargetVisible())
                .isFalse()
                .as("The validation errors are not shown");

        editorPage = editorPage
                .openValidationOptions()
                .clickValidationCheckbox(EditorPage.Validations.TABS);
        editorPage.waitForValidationErrorsVisible();

        assertThat(editorPage.isValidationMessageCurrentTargetVisible())
                .isTrue()
                .as("The validation errors are shown");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.