Skip to content

Commit f9f83d2

Browse files
fix tests
1 parent 5e47e9e commit f9f83d2

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

test/testDocument.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import { Direction } from "../src/models/direction";
3232
import { PageMode } from "../src/models/pageMode";
3333
import { PageLayout } from "../src/models/pageLayout";
3434
import { OrganizeDocumentRequest } from "../src/models/organizeDocumentRequest";
35+
import { Rotation } from "../src/models/rotation"
3536

3637
var assert = require('assert');
3738

@@ -226,4 +227,12 @@ describe("Document Tests", () => {
226227
});
227228
});
228229

230+
describe("PostDocumentPagesRotate Test", () => {
231+
it("should return response with code 200", async () => {
232+
const name = "4pages.pdf";
233+
await BaseTest.uploadFile(name);
234+
const result = await BaseTest.getPdfApi().postDocumentPagesRotate(name, Rotation.on90, "2-3", null, BaseTest.remoteTempFolder)
235+
assert.equal(result.response.statusCode, 200);
236+
});
237+
});
229238
});

test/testImages.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,12 @@ describe("Images Tests", () => {
9393
await BaseTest.uploadFile(name);
9494
const imageName = "butterfly.jpg";
9595
await BaseTest.uploadFile(imageName);
96-
const imageIds = ["GE5TENJVGQZTWMJYGQWDINRUFQ2DCMRMGY4TC", "GE5TIMJSGY3TWMJXG4WDIMBZFQ2DCOJMGQ3DK"];
96+
97+
const result1 = await BaseTest.getPdfApi().getImages(name, 1, null, BaseTest.remoteTempFolder);
98+
const imageId1 = result1.body.images.list[0].id;
99+
const result2 = await BaseTest.getPdfApi().getImages(name, 16, null, BaseTest.remoteTempFolder);
100+
const imageId2 = result2.body.images.list[0].id;
101+
const imageIds = [imageId1, imageId2];
97102
const imageFile = BaseTest.remoteTempFolder + "/" + imageName;
98103
return BaseTest.getPdfApi().putReplaceMultipleImage(name, imageIds, imageFile, null, BaseTest.remoteTempFolder)
99104
.then((result) => {

0 commit comments

Comments
 (0)