-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLearnMoreDescriptions.test.ts
More file actions
22 lines (20 loc) · 1003 Bytes
/
LearnMoreDescriptions.test.ts
File metadata and controls
22 lines (20 loc) · 1003 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import {BaseTest} from "./BaseTest";
import {CxWrapper} from "../main/wrapper/CxWrapper";
import {CxCommandOutput} from "../main/wrapper/CxCommandOutput";
describe("LearnMoreDescriptions cases",() => {
const cxScanConfig = new BaseTest();
it('LearnMoreDescriptions Successful case', async () => {
const auth = new CxWrapper(cxScanConfig);
const queryId = process.env.CX_TEST_QUERY_ID;
const data = await auth.learnMore(queryId !== undefined? queryId : "16772998409937314312")
const cxCommandOutput: CxCommandOutput = data;
expect(cxCommandOutput.payload.length).toBeGreaterThan(0);
})
it('LearnMoreDescriptions Failure case', async () => {
const auth = new CxWrapper(cxScanConfig);
const queryId = "";
const data = await auth.learnMore(queryId !== undefined? queryId : "")
const cxCommandOutput: CxCommandOutput = data;
expect(cxCommandOutput.status).toBe("Value of query-id is invalid\n");
})
})