Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
fix GetTextPluralSupportTest
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Huang committed May 15, 2014
1 parent 3060ef7 commit 954ffa2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Expand Up @@ -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) {
Expand Down
Expand Up @@ -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<String> output =
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 954ffa2

Please sign in to comment.