*/
@Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
public void obsoleteTextTest() {
restCaller
.createProjectAndVersion("obsolete-test", "master", "gettext");
Resource resource1 =
buildSourceResource("message1",
buildTextFlow("res1", "message one"),
buildTextFlow("res2", "message two"),
buildTextFlow("res3", "message three"),
buildTextFlow("res4", "message four"));
Resource resource2 =
buildSourceResource("message2",
buildTextFlow("res1", "message one"),
buildTextFlow("res2", "message two"),
buildTextFlow("res3", "message three"),
buildTextFlow("res4", "message four"));
restCaller.postSourceDocResource("obsolete-test", "master", resource1,
false);
restCaller.postSourceDocResource("obsolete-test", "master", resource2,
false);
// edit first entry and save
new LoginWorkFlow().signIn("admin", "admin");
final EditorPage editorPage = openEditor();
editorPage.translateTargetAtRowIndex(0, "message one translated")
.approveTranslationAtRow(0);
// delete resource 2
resource2.getTextFlows().clear();
restCaller.deleteSourceDoc("obsolete-test", "master", "message2");
// remove last entry from resource 1
resource1.getTextFlows().remove(3);
restCaller.putSourceDocResource("obsolete-test", "master", "message1",
resource1, true);