Created
July 5, 2020 14:39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-tasks-cloud/aspose-tasks-cloud-node | |
const fileName = "Home_move_plan.mpp"; | |
const localPath = "./Data/" + fileName; | |
const remotePath = "Temp/Data"; | |
const remoteFullPath = remotePath + "/" + fileName; | |
await tasksApi.uploadFileToStorage(remoteFullPath, localPath); | |
const request = new GetTaskDocumentWithFormatRequest(); | |
request.name = fileName; | |
request.folder = remotePath; | |
request.format = ProjectFileFormat.Csv; | |
const result = await tasksApi.getTaskDocumentWithFormat(request); | |
expect(result.response.statusCode).to.equal(200); | |
expect(result.body.buffer).is.not.undefined.and.not.null; | |
const strings = BaseTest.convertArrayBufferToStrings(result.body.buffer); | |
expect(strings[0]).to.equal("ID;Task_Name;Outline_Level;Duration;Start_Date;Finish_Date;Percent_Comp;Cost;Work"); | |
expect(strings[1]).to.equal("1;Five to Eight Weeks Before Moving;1;16 days;Thu 01.01.04 08:00;Thu 22.01.04 17:00;0%;$0;0 hrs"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment