Skip to content

Commit

Permalink
Removed live test.
Browse files Browse the repository at this point in the history
  • Loading branch information
v-pivamshi committed Jan 17, 2025
1 parent 11be23e commit c975975
Showing 1 changed file with 0 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,52 +191,4 @@ describe("Call Automation Main Client Live Tests", { skip: !isNodeLike }, () =>
const createCallFailedEvent = await waitForEvent("CreateCallFailed", callConnectionId, 8000);
assert.isDefined(createCallFailedEvent);
});

it("answer call with custom context and hangup", { timeout: 60000 }, async (ctx) => {
const fullTitle: string | undefined =
ctx.task.suite && ctx.task.suite.name && ctx.task.name
? `${ctx.task.suite.name} ${ctx.task.name}`
: undefined;

testName = fullTitle ? fullTitle.replace(/ /g, "_") : "create_call_and_hang_up";
await loadPersistedEvents(testName);

const callInvite: CallInvite = { targetParticipant: testUser2 };
const uniqueId = await serviceBusWithNewCall(testUser, testUser2);
const callBackUrl: string = dispatcherCallback + `?q=${uniqueId}`;
const createCallOption: CreateCallOptions = { operationContext: "operationContextCreateCall" };

const result = await callerCallAutomationClient.createCall(
callInvite,
callBackUrl,
createCallOption,
);
const incomingCallContext = await waitForIncomingCallContext(uniqueId, 8000);
const callConnectionId: string = result.callConnectionProperties.callConnectionId
? result.callConnectionProperties.callConnectionId
: "";
assert.isDefined(incomingCallContext);

if (incomingCallContext) {
const answerCallOptions: AnswerCallOptions = {
operationContext: "operationContextAnswerCall",
customCallingContext = CustomCallingContextInternal[]
};
await receiverCallAutomationClient.answerCall(
incomingCallContext,
callBackUrl,
answerCallOptions,
);
}

const callConnectedEvent = await waitForEvent("CallConnected", callConnectionId, 8000);

assert.isDefined(callConnectedEvent);
callConnection = result.callConnection;

await callConnection.hangUp(true);

const callDisconnectedEvent = await waitForEvent("CallDisconnected", callConnectionId, 8000);
assert.isDefined(callDisconnectedEvent);
});
});

0 comments on commit c975975

Please sign in to comment.