mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-6865 adding param to test
This commit is contained in:
@@ -64,6 +64,21 @@ public class ActionsExecutionAPI extends RMModelRequest
|
|||||||
ImmutableMap.of("path", destinationPath));
|
ImmutableMap.of("path", destinationPath));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Declares and files a document as record to a record folder using v1 actions api
|
||||||
|
*
|
||||||
|
* @param targetNode the node on which the action is executed
|
||||||
|
* @param destinationPath the path to the record folder
|
||||||
|
* @param encoded value to indicate if the path has been encoded
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public JSONObject declareAndFile(RepoTestModel targetNode, String destinationPath, boolean encoded) throws Exception
|
||||||
|
{
|
||||||
|
return getRmRestWrapper().withCoreAPI().usingActions()
|
||||||
|
.executeAction(ActionsOnRule.DECLARE_AS_RECORD.getActionValue(), targetNode,
|
||||||
|
ImmutableMap.of("path", destinationPath, "encoded", String.valueOf(encoded)));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Declares a document as record using v1 actions api
|
* Declares a document as record using v1 actions api
|
||||||
*
|
*
|
||||||
|
@@ -237,7 +237,7 @@ public class DeclareAndFileDocumentAsRecordTests extends BaseRMRestTest
|
|||||||
{
|
{
|
||||||
STEP("Declare document as record with an encoded location parameter value");
|
STEP("Declare document as record with an encoded location parameter value");
|
||||||
getRestAPIFactory().getActionsAPI(userFillingPermission).declareAndFile(testFile,
|
getRestAPIFactory().getActionsAPI(userFillingPermission).declareAndFile(testFile,
|
||||||
Utility.buildPath(recordCategory.getName(), RECORD_FOLDER_NAME_ENCODED));
|
Utility.buildPath(recordCategory.getName(), RECORD_FOLDER_NAME_ENCODED), true);
|
||||||
|
|
||||||
STEP("Verify the declared record is placed in the record folder");
|
STEP("Verify the declared record is placed in the record folder");
|
||||||
assertTrue(isMatchingRecordInRecordFolder(testFile, recordFolderWithSpacesInName), "Record should be filed to record folder");
|
assertTrue(isMatchingRecordInRecordFolder(testFile, recordFolderWithSpacesInName), "Record should be filed to record folder");
|
||||||
|
Reference in New Issue
Block a user