@Feature(summary = "The system will run CopyTrans when a push occurs",
tcmsTestPlanIds = 5316, tcmsTestCaseIds = 91869)
@Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
public void pushTransAndCopyTransTest() {
// translator creates the project and become maintainer
ZanataRestCaller restCaller =
new ZanataRestCaller("translator",
PropertiesHolder.getProperty(
Constants.zanataTranslatorKey.value()));
restCaller.createProjectAndVersion("plurals", "master", "podir");
List<String> output =
client.callWithTimeout(projectRootPath,
"mvn -B zanata:push -Dzanata.copyTrans=false -Dzanata.userConfig="
+ translatorConfig);
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(