diff --git a/source/java/org/alfresco/repo/forms/FormServiceImplTest.java b/source/java/org/alfresco/repo/forms/FormServiceImplTest.java index 64e951a1a8..c780ffded7 100644 --- a/source/java/org/alfresco/repo/forms/FormServiceImplTest.java +++ b/source/java/org/alfresco/repo/forms/FormServiceImplTest.java @@ -90,6 +90,7 @@ public class FormServiceImplTest extends BaseAlfrescoSpringTest /** * Called during the transaction setup */ + @Override protected void onSetUpInTransaction() throws Exception { super.onSetUpInTransaction(); @@ -295,21 +296,22 @@ public class FormServiceImplTest extends BaseAlfrescoSpringTest FormData data = form.getFormData(); assertNotNull("Expecting form data", data); Map fieldData = data.getData(); - assertEquals(VALUE_TITLE, fieldData.get("cm:title").getValue()); - assertEquals(VALUE_DESCRIPTION, fieldData.get("cm:description").getValue()); - assertEquals(VALUE_ORIGINATOR, fieldData.get("cm:originator").getValue()); - assertEquals(VALUE_ADDRESSEE, fieldData.get("cm:addressee").getValue()); - assertEquals(VALUE_ADDRESSEES1, fieldData.get("cm:addressees_0").getValue()); - assertEquals(VALUE_ADDRESSEES2, fieldData.get("cm:addressees_1").getValue()); - assertEquals(VALUE_SUBJECT, fieldData.get("cm:subjectline").getValue()); + assertNotNull("Expecting field data", fieldData); + assertEquals(VALUE_TITLE, fieldData.get("prop:cm:title").getValue()); + assertEquals(VALUE_DESCRIPTION, fieldData.get("prop:cm:description").getValue()); + assertEquals(VALUE_ORIGINATOR, fieldData.get("prop:cm:originator").getValue()); + assertEquals(VALUE_ADDRESSEE, fieldData.get("prop:cm:addressee").getValue()); + assertEquals(VALUE_ADDRESSEES1, fieldData.get("prop:cm:addressees_0").getValue()); + assertEquals(VALUE_ADDRESSEES2, fieldData.get("prop:cm:addressees_1").getValue()); + assertEquals(VALUE_SUBJECT, fieldData.get("prop:cm:subjectline").getValue()); Calendar calTestValue = Calendar.getInstance(); calTestValue.setTime(VALUE_SENT_DATE); Calendar calServiceValue = Calendar.getInstance(); - calServiceValue.setTime((Date)fieldData.get("cm:sentdate").getValue()); + calServiceValue.setTime((Date)fieldData.get("prop:cm:sentdate").getValue()); assertEquals(calTestValue.getTimeInMillis(), calServiceValue.getTimeInMillis()); - List targets = (List)fieldData.get("cm:references").getValue(); + List targets = (List)fieldData.get("assoc:cm:references").getValue(); assertEquals("Expecting 1 target", 1, targets.size()); assertEquals(this.associatedDoc.toString(), targets.get(0)); } diff --git a/source/java/org/alfresco/repo/forms/script/test_formService.js b/source/java/org/alfresco/repo/forms/script/test_formService.js index 9589457301..aebc69a839 100644 --- a/source/java/org/alfresco/repo/forms/script/test_formService.js +++ b/source/java/org/alfresco/repo/forms/script/test_formService.js @@ -102,20 +102,20 @@ function testGetFormForContentNode() test.assertNotNull(fieldData, "fieldData should not be null."); test.assertNotNull(fieldData.length, "fieldData.length should not be null."); - test.assertEquals("This is the title for the test document", fieldData["cm:title"].value); - test.assertEquals("This is the description for the test document", fieldData["cm:description"].value); - test.assertEquals("fred@customer.com", fieldData["cm:originator"].value); - test.assertEquals("bill@example.com", fieldData["cm:addressee"].value); - test.assertEquals("harry@example.com", fieldData["cm:addressees_0"].value); - test.assertEquals("jane@example.com", fieldData["cm:addressees_1"].value); - test.assertEquals("The subject is...", fieldData["cm:subjectline"].value); + test.assertEquals("This is the title for the test document", fieldData["prop:cm:title"].value); + test.assertEquals("This is the description for the test document", fieldData["prop:cm:description"].value); + test.assertEquals("fred@customer.com", fieldData["prop:cm:originator"].value); + test.assertEquals("bill@example.com", fieldData["prop:cm:addressee"].value); + test.assertEquals("harry@example.com", fieldData["prop:cm:addressees_0"].value); + test.assertEquals("jane@example.com", fieldData["prop:cm:addressees_1"].value); + test.assertEquals("The subject is...", fieldData["prop:cm:subjectline"].value); //TODO Might add the equivalent of the VALUE_SENT_DATE testing here. // In the meantime I'll use JavaScript's own Date object to assert that it is a valid date. - var sentDate = fieldData["cm:sentdate"].value; + var sentDate = fieldData["prop:cm:sentdate"].value; test.assertFalse(isNaN(Date.parse(sentDate))); - var targets = fieldData["cm:references"].value; + var targets = fieldData["assoc:cm:references"].value; test.assertEquals(1, targets.length); test.assertEquals(testAssociatedDoc, targets[0]); }