diff --git a/functional-test/src/main/java/org/zanata/page/webtrans/EditorPage.java b/functional-test/src/main/java/org/zanata/page/webtrans/EditorPage.java index 5d9ea006fc..1f4e5bf56f 100644 --- a/functional-test/src/main/java/org/zanata/page/webtrans/EditorPage.java +++ b/functional-test/src/main/java/org/zanata/page/webtrans/EditorPage.java @@ -208,6 +208,10 @@ public String getBasicTranslationTargetAtRowIndex(final int rowIndex) { return getContentAtRowIndex(rowIndex, TARGET_ID_FMT, Plurals.TargetSingular); } + public String getBasicTranslationTargetAtRowIndex(int rowIndex, Plurals plurals) { + return getContentAtRowIndex(rowIndex, TARGET_ID_FMT, plurals); + } + private String getContentAtRowIndex(final long rowIndex, final String idFormat, final Plurals plural) { diff --git a/functional-test/src/test/java/org/zanata/feature/clientserver/GettextPluralSupportTest.java b/functional-test/src/test/java/org/zanata/feature/clientserver/GettextPluralSupportTest.java index 9b02e90fad..e346e976d5 100644 --- a/functional-test/src/test/java/org/zanata/feature/clientserver/GettextPluralSupportTest.java +++ b/functional-test/src/test/java/org/zanata/feature/clientserver/GettextPluralSupportTest.java @@ -72,7 +72,6 @@ public void setUp() throws IOException { } @Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION) - @Ignore("rhbz1097026") public void canPushAndPullPlural() throws IOException { restCaller.createProjectAndVersion("plurals", "master", "podir"); List output = @@ -124,20 +123,19 @@ private static EditorPage verifyPluralPushedToEditor() { // verify first message new LoginWorkFlow().signIn("admin", "admin"); EditorPage editorPage = new BasicWorkFlow() - .goToEditor("plurals", "master", "pl", "test") - .setSyntaxHighlighting(true); + .goToEditor("plurals", "master", "pl", "test"); assertThat(editorPage.getMessageSourceAtRowIndex(0, Plurals.SourceSingular), Matchers.equalTo("One file removed")); assertThat(editorPage.getMessageSourceAtRowIndex(0, Plurals.SourcePlural), Matchers.equalTo("%d files removed")); // nplural for Polish is 3 - assertThat(editorPage.getMessageTargetAtRowIndex(0, Plurals.TargetSingular), + assertThat(editorPage.getBasicTranslationTargetAtRowIndex(0, Plurals.TargetSingular), Matchers.equalTo("1 aoeuaouaou")); - assertThat(editorPage.getMessageTargetAtRowIndex(0, Plurals.TargetPluralOne), + assertThat(editorPage.getBasicTranslationTargetAtRowIndex(0, Plurals.TargetPluralOne), Matchers.equalTo("%d aoeuaouao")); - assertThat(editorPage.getMessageTargetAtRowIndex(0, Plurals.TargetPluralTwo), - Matchers.equalTo(" ")); + assertThat(editorPage.getBasicTranslationTargetAtRowIndex(0, Plurals.TargetPluralTwo), + Matchers.equalTo("")); return editorPage; }