Package org.zanata.page.webtrans

Examples of org.zanata.page.webtrans.EditorPage


        assertThat(versionDocumentsPage
                .sourceDocumentsContains(htmlfile.getName()))
                .as("Document shows in table");

        EditorPage editorPage = versionDocumentsPage
                .gotoLanguageTab()
                .translate("pl", testFileName);

        assertThat(editorPage.getMessageSourceAtRowIndex(0))
                .isEqualTo("Test content")
                .as("The first translation source is correct");
        assertThat(editorPage.getMessageSourceAtRowIndex(1))
                .isEqualTo("This is <g2>Bold</g2> text")
                .as("The second translation source is correct");
    }
View Full Code Here


                "file");
    }

    @Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
    public void similarSrtEntriesAreIndividual() throws Exception {
        EditorPage editorPage = uploadAndGoToDocument(testFileGenerator
                .generateTestFileWithContent("duplicationinsrtfile", ".srt",
                        "1" + sep +
                        "00:00:01,000 --> 00:00:02,000" + sep +
                        "Exactly the same text" + sep + sep +
                        "2" + sep +
                        "00:00:02,000 --> 00:00:03,000" + sep +
                        "Exactly the same text"));

        assertThat(editorPage.getMessageSourceAtRowIndex(0))
                .isEqualTo("Exactly the same text")
                .as("The first translation source is correct");

        assertThat(editorPage.getMessageSourceAtRowIndex(1))
                .isEqualTo("Exactly the same text")
                .as("The second translation source is correct");
    }
View Full Code Here

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

    @Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
    public void webVttLabelsAreNotParsed() throws Exception {
        EditorPage editorPage = uploadAndGoToDocument(testFileGenerator
                .generateTestFileWithContent("labelledVttfile", ".vtt",
                        "Introduction" + sep +
                        "00:00:01.000 --> 00:00:02.000" + sep +
                        "Test subtitle 1"));

        assertThat(editorPage.getMessageSourceAtRowIndex(0))
                .isEqualTo("Test subtitle 1")
                .as("The translation source is correct");
    }
View Full Code Here

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

    @Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
    public void multilineSRTAreParsedCorrectly() throws Exception {
        EditorPage editorPage = uploadAndGoToDocument(testFileGenerator
                .generateTestFileWithContent("multilinesrtfile", ".srt",
                        "1" + sep +
                        "00:00:01,000 --> 00:00:02,000" + sep +
                        "Test subtitle 1" + sep +
                        "Test subtitle 1 line 2" + sep + sep +
                        "2" + sep +
                        "00:00:03,000 --> 00:00:04,000" + sep +
                        "Test subtitle 2"));

        assertThat(editorPage.getMessageSourceAtRowIndex(0))
                .isEqualTo("Test subtitle 1" + sep + "Test subtitle 1 line 2")
                .as("The first translation source is correct");

        assertThat(editorPage.getMessageSourceAtRowIndex(1))
                .isEqualTo("Test subtitle 2")
                .as("The second translation source is correct");
    }
View Full Code Here

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

    @Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
    public void multilineVTTAreParsedCorrectly() throws Exception {
        EditorPage editorPage = uploadAndGoToDocument(testFileGenerator
                .generateTestFileWithContent("multilinevttfile", ".vtt",
                        "00:00:01.000 --> 00:00:02.000" + sep +
                        "Test subtitle 1" + sep +
                        "Test subtitle 1 line 2" + sep + sep +
                        "00:00:03.000 --> 00:00:04.000" + sep +
                        "Test subtitle 2"));

        assertThat(editorPage.getMessageSourceAtRowIndex(0))
                .isEqualTo("Test subtitle 1" + sep + "Test subtitle 1 line 2")
                .as("The first translation source is correct");
        assertThat(editorPage.getMessageSourceAtRowIndex(1))
                .isEqualTo("Test subtitle 2")
                .as("The second translation source is correct");
    }
View Full Code Here

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

    @Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
    public void multilineSBTAreParsedCorrectly() throws Exception {
        EditorPage editorPage = uploadAndGoToDocument(testFileGenerator
                .generateTestFileWithContent("multilinesbtfile", ".sbt",
                        "00:04:35.03,00:04:38.82" + sep +
                        "Test subtitle 1" + sep +
                        "Test subtitle 1 line 2" + sep + sep +
                        "2" + sep +
                        "00:04:39.03,00:04:44.82" + sep +
                        "Test subtitle 2"));

        assertThat(editorPage.getMessageSourceAtRowIndex(0))
                .isEqualTo("Test subtitle 1" + sep + "Test subtitle 1 line 2")
                .as("The first translation source is correct");
        assertThat(editorPage.getMessageSourceAtRowIndex(1))
                .isEqualTo("Test subtitle 2")
                .as("The second translation source is correct");
    }
View Full Code Here

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

    @Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
    public void multilineSubAreParsedCorrectly() throws Exception {
        EditorPage editorPage = uploadAndGoToDocument(testFileGenerator
                .generateTestFileWithContent("multilinesubfile", ".sub",
                        "00:04:35.03,00:04:38.82" + sep +
                        "Test subtitle 1" + sep +
                        "Test subtitle 1 line 2" + sep + sep +
                        "00:04:39.03,00:04:44.82" + sep +
                        "Test subtitle 2"));

        assertThat(editorPage.getMessageSourceAtRowIndex(0))
                .isEqualTo("Test subtitle 1" + sep + "Test subtitle 1 line 2")
                .as("The first translation source is correct");
        assertThat(editorPage.getMessageSourceAtRowIndex(1))
                .isEqualTo("Test subtitle 2")
                .as("The second translation source is correct");
    }
View Full Code Here

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

    @Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
    public void formattingInSrtEntries() throws Exception {
        EditorPage editorPage = uploadAndGoToDocument(
                testFileGenerator.generateTestFileWithContent(
                    "formattedsrtfile",
                    ".srt",
                    "1" + sep + "00:00:01,000 --> 00:00:02,000" + 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

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

    @Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
    public void formattingInVttEntries() throws Exception {
        EditorPage editorPage = uploadAndGoToDocument(
                testFileGenerator.generateTestFileWithContent(
                        "formattedvttfile",
                        ".vtt",
                        "00:00:01.000 --> 00:00:02.000" + 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

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

    @Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
    public void formattingInSbtEntries() throws Exception {
        EditorPage editorPage = uploadAndGoToDocument(
                testFileGenerator.generateTestFileWithContent(
                        "formattedsbtfile",
                        ".sbt",
                        "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

TOP

Related Classes of org.zanata.page.webtrans.EditorPage

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.