Skip to content

Commit 3f56dc4

Browse files
committed
Release Aspose.Cells Cloud SDK 22.11
1 parent b0797ec commit 3f56dc4

File tree

1 file changed

+39
-25
lines changed

1 file changed

+39
-25
lines changed

test/CellsOneApi.ts

Lines changed: 39 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -33,32 +33,46 @@ var fs = require('fs');
3333
var path = require('path');
3434
var assert = require('assert');
3535

36-
describe('CellsSaveAsApi ', function() {
36+
describe('CellsCustomApi ', function () {
3737
this.timeout(200000);
38-
describe('cellsSaveAsPostDocumentSaveAsPDF 3', function() {
39-
it('should call cellsSaveAsPostDocumentSaveAsPDF successfully', function() {
40-
const cellsApi = BaseTest.initializeCellsApi();
41-
const filename = "Book1.xlsx";
42-
var data =fs.createReadStream(localPath + filename);
43-
var req = new model.UploadFileRequest();
44-
req.path = "Temp/" + filename;
45-
req.file = data;
46-
47-
return cellsApi.uploadFile(req)
48-
.then((result) => {
49-
expect(result.body.uploaded.length).greaterThan(0);
50-
var req = new model.CellsSaveAs_PostDocumentSaveAsRequest();
51-
req.name = filename;
52-
req.newfilename = "NewBook1.pdf"
53-
req.folder = "Temp";
54-
55-
return cellsApi.cellsSaveAsPostDocumentSaveAs(req)
56-
.then((result) => {
57-
expect(result.body.code).to.equal(200);
58-
expect(result.response.statusCode).to.equal(200);
59-
});
60-
});
61-
});
38+
describe('cellsPageSetupPostPageSetup', function () {
39+
it('should call cellsPageSetupPostPageSetup successfully', function () {
40+
const cellsApi = BaseTest.initializeCellsApi();
41+
const filename = "Book1.xlsx";
42+
var data = fs.createReadStream(localPath + filename);
43+
var req = new model.UploadFileRequest();
44+
req.path = "Temp/" + filename;
45+
req.file = data;
46+
47+
return cellsApi.uploadFile(req)
48+
.then((result) => {
49+
expect(result.body.uploaded.length).greaterThan(0);
50+
var req = new model.CellsPageSetup_PostPageSetupRequest();
51+
req.name = filename;
52+
req.sheetName = "Sheet1";
53+
req.pageSetup = new model.PageSetup();
54+
req.pageSetup.blackAndWhite = true;
55+
req.pageSetup.paperSize = "PaperA3";
56+
req.folder = "Temp";
57+
58+
return cellsApi.cellsPageSetupPostPageSetup(req)
59+
.then((result) => {
60+
expect(result.body.code).to.equal(200);
61+
expect(result.response.statusCode).to.equal(200);
62+
var req = new model.CellsPageSetup_GetPageSetupRequest();
63+
req.name = filename;
64+
req.sheetName = "Sheet1";
65+
req.folder = "Temp";
66+
67+
return cellsApi.cellsPageSetupGetPageSetup(req)
68+
.then((result) => {
69+
expect(result.body.code).to.equal(200);
70+
expect(result.response.statusCode).to.equal(200);
71+
expect(result.body.pageSetup.paperSize).to.equal("PaperA3");
72+
});
73+
});
74+
});
6275
});
76+
});
6377

6478
});

0 commit comments

Comments
 (0)