@@ -31,8 +31,9 @@ var fs = require('fs');
3131var path = require ( 'path' ) ;
3232var assert = require ( 'assert' ) ;
3333const localPath = "../TestData/" ;
34- describe ( 'cellsHypelinksPutWorksheetHyperlink' , function ( ) {
35- it ( 'should call cellsHypelinksPutWorksheetHyperlink successfully' , function ( ) {
34+
35+ describe ( 'Cells sdk for NodeJS test ok.' , function ( ) {
36+ it ( 'should call cellsWorkbookPostWorkbookGetSmartMarkerResult successfully' , function ( ) {
3637 const cellsApi = BaseTest . initializeCellsApi ( ) ;
3738 const filename = "Book1.xlsx" ;
3839 var data = fs . createReadStream ( localPath + filename ) ;
@@ -43,21 +44,55 @@ describe('cellsHypelinksPutWorksheetHyperlink', function() {
4344 return cellsApi . uploadFile ( req )
4445 . then ( ( result ) => {
4546 expect ( result . body . uploaded . length ) . greaterThan ( 0 ) ;
46- var req = new model . CellsHypelinks_PutWorksheetHyperlinkRequest ( ) ;
47+ var req = new model . CellsWorkbook_PostWorkbookGetSmartMarkerResultRequest ( ) ;
4748 req . name = filename ;
48- req . sheetName = "Sheet1" ;
49- req . firstRow = 1 ;
50- req . firstColumn = 1 ;
51- req . totalRows = 2 ;
52- req . totalColumns = 3 ;
53- req . address = "http://wwww.aspose.com" ;
49+ req . xmlFile = "ReportData.xml" ;
50+ // req.outPath = null;
5451 req . folder = "Temp" ;
5552
56- return cellsApi . cellsHypelinksPutWorksheetHyperlink ( req )
53+ return cellsApi . cellsWorkbookPostWorkbookGetSmartMarkerResult ( req )
5754 . then ( ( result ) => {
58- expect ( result . body . code ) . to . equal ( 200 ) ;
59- expect ( result . response . statusCode ) . to . equal ( 200 ) ;
55+ // expect(result.response.statusCode ).to.equal(200);
56+ expect ( result . body . toString ( ) . length ) . to . greaterThan ( 0 ) ;
6057 } ) ;
6158 } ) ;
6259 } ) ;
60+ // it('should call cellsWorkbookPutConvertWorkbook successfully', function() {
61+ // const cellsApi = BaseTest.initializeCellsApi();
62+ // const filename = "Book1.xlsx";
63+
64+ // var req = new model.CellsWorkbook_PutConvertWorkbookRequest({
65+ // file : fs.createReadStream(localPath + filename),
66+ // format : "pdf",
67+ // });
68+
69+ // return cellsApi.cellsWorkbookPutConvertWorkbook(req)
70+ // .then((result) => {
71+ // // console.log(result);
72+ // fs.writeFile('test.pdf',result['body'],'binary', err => {
73+ // if (err) {
74+ // console.error(err);
75+ // }
76+ // });
77+ // });
78+ // });
79+ // it('should call down file successfully', function() {
80+ // const cellsApi = BaseTest.initializeCellsApi();
81+ // const filename = "Book1.xlsx";
82+
83+ // var req = new model.DownloadFileRequest({
84+ // path:'CellsTests/Book1.xlsx',
85+ // storageName:'Cells',
86+ // });
87+
88+ // return cellsApi.downloadFile(req)
89+ // .then((result) => {
90+ // // console.log(result);
91+ // fs.writeFile('Book1.xlsx',result['body'],'binary', err => {
92+ // if (err) {
93+ // console.error(err);
94+ // }
95+ // }) ;
96+ // });
97+ // });
6398} ) ;
0 commit comments