test: polish soap wizard test run flow
This commit is contained in:
@@ -213,6 +213,84 @@ function buildRestWindowOperationPayload(name) {
|
||||
};
|
||||
}
|
||||
|
||||
const SOAP_TEST_WSDL = `<?xml version="1.0"?>
|
||||
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:tns="urn:crm"
|
||||
targetNamespace="urn:crm">
|
||||
<binding name="LeadBinding" type="tns:LeadPortType">
|
||||
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
|
||||
<operation name="CreateLead">
|
||||
<soap:operation soapAction="urn:createLead"/>
|
||||
</operation>
|
||||
</binding>
|
||||
<service name="LeadService">
|
||||
<port name="LeadPort" binding="tns:LeadBinding">
|
||||
<soap:address location="http://127.0.0.1:${STREAM_FIXTURE_PORT}/soap/leads"/>
|
||||
</port>
|
||||
</service>
|
||||
</definitions>`;
|
||||
|
||||
function buildSoapOperationPayload(name) {
|
||||
return {
|
||||
name,
|
||||
display_name: 'Playwright SOAP Lead',
|
||||
category: 'sales',
|
||||
protocol: 'soap',
|
||||
target: {
|
||||
kind: 'soap',
|
||||
wsdl_ref: 'sample_wsdl_pending',
|
||||
service_name: 'Service',
|
||||
port_name: 'Port',
|
||||
operation_name: 'Operation',
|
||||
endpoint_override: `http://127.0.0.1:${STREAM_FIXTURE_PORT}/soap/leads`,
|
||||
soap_version: 'soap_11',
|
||||
soap_action: 'urn:createLead',
|
||||
binding_style: 'document_literal',
|
||||
headers: [],
|
||||
metadata: {
|
||||
input_part_names: ['CreateLeadRequest'],
|
||||
output_part_names: ['CreateLeadResponse'],
|
||||
namespaces: ['urn:crm'],
|
||||
},
|
||||
},
|
||||
input_schema: schemaObject({
|
||||
email: schemaString(true),
|
||||
}),
|
||||
output_schema: schemaObject({
|
||||
id: schemaString(true),
|
||||
}),
|
||||
input_mapping: {
|
||||
rules: [
|
||||
{
|
||||
source: '$.mcp.email',
|
||||
target: '$.request.body.email',
|
||||
required: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
output_mapping: {
|
||||
rules: [
|
||||
{
|
||||
source: '$.response.body.id',
|
||||
target: '$.output.id',
|
||||
required: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
execution_config: {
|
||||
timeout_ms: 1000,
|
||||
headers: {},
|
||||
},
|
||||
tool_description: {
|
||||
title: 'Playwright SOAP Lead',
|
||||
description: 'Creates a lead through the local SOAP fixture.',
|
||||
tags: ['playwright', 'soap'],
|
||||
examples: [{ input: { email: 'user@example.com' } }],
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
function buildGrpcSessionOperationPayload(name) {
|
||||
return {
|
||||
name,
|
||||
@@ -474,10 +552,12 @@ async function mcpToolCall(session, toolName, argumentsValue) {
|
||||
module.exports = {
|
||||
ADMIN_EMAIL,
|
||||
ADMIN_PASSWORD,
|
||||
SOAP_TEST_WSDL,
|
||||
browserJson,
|
||||
buildGrpcSessionOperationPayload,
|
||||
buildRestAsyncJobOperationPayload,
|
||||
buildRestWindowOperationPayload,
|
||||
buildSoapOperationPayload,
|
||||
createAgent,
|
||||
createOperation,
|
||||
createPlatformApiKey,
|
||||
|
||||
Reference in New Issue
Block a user