Skip to content

Commit e9bb1c2

Browse files
committed
Disable soap test that uses remote API
1 parent dcecf3c commit e9bb1c2

File tree

5 files changed

+230
-53
lines changed

5 files changed

+230
-53
lines changed

packages/loaders/soap/test/__snapshots__/examples.test.ts.snap

+73
Original file line numberDiff line numberDiff line change
@@ -472,3 +472,76 @@ input AdminServiceType_DeleteEntityClass_Input {
472472
entityclassIntID: BigInt
473473
}"
474474
`;
475+
476+
exports[`Examples should generate schema for greeting: greeting 1`] = `
477+
"directive @soap(elementName: String, bindingNamespace: String, endpoint: String, subgraph: String) on FIELD_DEFINITION
478+
479+
type Query {
480+
placeholder: Void
481+
}
482+
483+
"""Represents NULL values"""
484+
scalar Void
485+
486+
type Mutation {
487+
NumberConversion_NumberConversion_NumberConversionSoap_NumberToWords(NumberToWords: NumberConversion_NumberToWords_Input): NumberConversion_NumberToWordsResponse
488+
NumberConversion_NumberConversion_NumberConversionSoap_NumberToDollars(NumberToDollars: NumberConversion_NumberToDollars_Input): NumberConversion_NumberToDollarsResponse
489+
}
490+
491+
type NumberConversion_NumberToWordsResponse {
492+
NumberToWordsResult: String
493+
}
494+
495+
input NumberConversion_NumberToWords_Input {
496+
ubiNum: BigInt
497+
}
498+
499+
"""
500+
The \`BigInt\` scalar type represents non-fractional signed whole numeric values.
501+
"""
502+
scalar BigInt
503+
504+
type NumberConversion_NumberToDollarsResponse {
505+
NumberToDollarsResult: String
506+
}
507+
508+
input NumberConversion_NumberToDollars_Input {
509+
dNum: Float
510+
}"
511+
`;
512+
513+
exports[`Examples should generate schema for tempconvert: tempconvert 1`] = `
514+
"directive @soap(elementName: String, bindingNamespace: String, endpoint: String, subgraph: String) on FIELD_DEFINITION
515+
516+
type Query {
517+
placeholder: Void
518+
}
519+
520+
"""Represents NULL values"""
521+
scalar Void
522+
523+
type Mutation {
524+
tns_TempConvert_TempConvertSoap_FahrenheitToCelsius(FahrenheitToCelsius: tns_FahrenheitToCelsius_Input): tns_FahrenheitToCelsiusResponse
525+
tns_TempConvert_TempConvertSoap_CelsiusToFahrenheit(CelsiusToFahrenheit: tns_CelsiusToFahrenheit_Input): tns_CelsiusToFahrenheitResponse
526+
tns_TempConvert_TempConvertSoap12_FahrenheitToCelsius(FahrenheitToCelsius: tns_FahrenheitToCelsius_Input): tns_FahrenheitToCelsiusResponse
527+
tns_TempConvert_TempConvertSoap12_CelsiusToFahrenheit(CelsiusToFahrenheit: tns_CelsiusToFahrenheit_Input): tns_CelsiusToFahrenheitResponse
528+
tns_TempConvert_TempConvertHttpPost_FahrenheitToCelsius(Fahrenheit: String = ""): String
529+
tns_TempConvert_TempConvertHttpPost_CelsiusToFahrenheit(Celsius: String = ""): String
530+
}
531+
532+
type tns_FahrenheitToCelsiusResponse {
533+
FahrenheitToCelsiusResult: String
534+
}
535+
536+
input tns_FahrenheitToCelsius_Input {
537+
Fahrenheit: String
538+
}
539+
540+
type tns_CelsiusToFahrenheitResponse {
541+
CelsiusToFahrenheitResult: String
542+
}
543+
544+
input tns_CelsiusToFahrenheit_Input {
545+
Celsius: String
546+
}"
547+
`;

packages/loaders/soap/test/__snapshots__/soap.test.ts.snap

-41
Original file line numberDiff line numberDiff line change
@@ -41,44 +41,3 @@ input NumberConversion_NumberToDollars_Input {
4141
dNum: Float
4242
}"
4343
`;
44-
45-
exports[`SOAP Loader should generate the schema correctly 1`] = `
46-
"schema @transport(kind: "soap", subgraph: "Test") {
47-
query: Query
48-
mutation: Mutation
49-
}
50-
51-
directive @soap(elementName: String, bindingNamespace: String, endpoint: String, subgraph: String) on FIELD_DEFINITION
52-
53-
type Query {
54-
placeholder: Void
55-
}
56-
57-
"""Represents NULL values"""
58-
scalar Void
59-
60-
type Mutation {
61-
tns_TempConvert_TempConvertSoap_FahrenheitToCelsius(FahrenheitToCelsius: tns_FahrenheitToCelsius_Input): tns_FahrenheitToCelsiusResponse @soap(elementName: "FahrenheitToCelsiusResponse", bindingNamespace: "https://www.w3schools.com/xml/", endpoint: "http://www.w3schools.com/xml/tempconvert.asmx", subgraph: "Test")
62-
tns_TempConvert_TempConvertSoap_CelsiusToFahrenheit(CelsiusToFahrenheit: tns_CelsiusToFahrenheit_Input): tns_CelsiusToFahrenheitResponse @soap(elementName: "CelsiusToFahrenheitResponse", bindingNamespace: "https://www.w3schools.com/xml/", endpoint: "http://www.w3schools.com/xml/tempconvert.asmx", subgraph: "Test")
63-
tns_TempConvert_TempConvertSoap12_FahrenheitToCelsius(FahrenheitToCelsius: tns_FahrenheitToCelsius_Input): tns_FahrenheitToCelsiusResponse @soap(elementName: "FahrenheitToCelsiusResponse", bindingNamespace: "https://www.w3schools.com/xml/", endpoint: "http://www.w3schools.com/xml/tempconvert.asmx", subgraph: "Test")
64-
tns_TempConvert_TempConvertSoap12_CelsiusToFahrenheit(CelsiusToFahrenheit: tns_CelsiusToFahrenheit_Input): tns_CelsiusToFahrenheitResponse @soap(elementName: "CelsiusToFahrenheitResponse", bindingNamespace: "https://www.w3schools.com/xml/", endpoint: "http://www.w3schools.com/xml/tempconvert.asmx", subgraph: "Test")
65-
tns_TempConvert_TempConvertHttpPost_FahrenheitToCelsius(Fahrenheit: String = ""): String @soap(elementName: "string", bindingNamespace: "https://www.w3schools.com/xml/", endpoint: "http://www.w3schools.com/xml/tempconvert.asmx", subgraph: "Test")
66-
tns_TempConvert_TempConvertHttpPost_CelsiusToFahrenheit(Celsius: String = ""): String @soap(elementName: "string", bindingNamespace: "https://www.w3schools.com/xml/", endpoint: "http://www.w3schools.com/xml/tempconvert.asmx", subgraph: "Test")
67-
}
68-
69-
type tns_FahrenheitToCelsiusResponse {
70-
FahrenheitToCelsiusResult: String
71-
}
72-
73-
input tns_FahrenheitToCelsius_Input {
74-
Fahrenheit: String
75-
}
76-
77-
type tns_CelsiusToFahrenheitResponse {
78-
CelsiusToFahrenheitResult: String
79-
}
80-
81-
input tns_CelsiusToFahrenheit_Input {
82-
Celsius: String
83-
}"
84-
`;

packages/loaders/soap/test/examples.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { SOAPLoader } from '../src/index.js';
88

99
const { readFile } = promises;
1010

11-
const examples = ['example1', 'example2', 'axis'];
11+
const examples = ['example1', 'example2', 'axis', 'greeting', 'tempconvert'];
1212

1313
describe('Examples', () => {
1414
const mockLogger: Logger = {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
<wsdl:definitions xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="https://www.w3schools.com/xml/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="https://www.w3schools.com/xml/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
2+
<wsdl:types>
3+
<s:schema elementFormDefault="qualified" targetNamespace="https://www.w3schools.com/xml/">
4+
<s:element name="FahrenheitToCelsius">
5+
<s:complexType>
6+
<s:sequence>
7+
<s:element minOccurs="0" maxOccurs="1" name="Fahrenheit" type="s:string" />
8+
</s:sequence>
9+
</s:complexType>
10+
</s:element>
11+
<s:element name="FahrenheitToCelsiusResponse">
12+
<s:complexType>
13+
<s:sequence>
14+
<s:element minOccurs="0" maxOccurs="1" name="FahrenheitToCelsiusResult" type="s:string" />
15+
</s:sequence>
16+
</s:complexType>
17+
</s:element>
18+
<s:element name="CelsiusToFahrenheit">
19+
<s:complexType>
20+
<s:sequence>
21+
<s:element minOccurs="0" maxOccurs="1" name="Celsius" type="s:string" />
22+
</s:sequence>
23+
</s:complexType>
24+
</s:element>
25+
<s:element name="CelsiusToFahrenheitResponse">
26+
<s:complexType>
27+
<s:sequence>
28+
<s:element minOccurs="0" maxOccurs="1" name="CelsiusToFahrenheitResult" type="s:string" />
29+
</s:sequence>
30+
</s:complexType>
31+
</s:element>
32+
<s:element name="string" nillable="true" type="s:string" />
33+
</s:schema>
34+
</wsdl:types>
35+
<wsdl:message name="FahrenheitToCelsiusSoapIn">
36+
<wsdl:part name="parameters" element="tns:FahrenheitToCelsius" />
37+
</wsdl:message>
38+
<wsdl:message name="FahrenheitToCelsiusSoapOut">
39+
<wsdl:part name="parameters" element="tns:FahrenheitToCelsiusResponse" />
40+
</wsdl:message>
41+
<wsdl:message name="CelsiusToFahrenheitSoapIn">
42+
<wsdl:part name="parameters" element="tns:CelsiusToFahrenheit" />
43+
</wsdl:message>
44+
<wsdl:message name="CelsiusToFahrenheitSoapOut">
45+
<wsdl:part name="parameters" element="tns:CelsiusToFahrenheitResponse" />
46+
</wsdl:message>
47+
<wsdl:message name="FahrenheitToCelsiusHttpPostIn">
48+
<wsdl:part name="Fahrenheit" type="s:string" />
49+
</wsdl:message>
50+
<wsdl:message name="FahrenheitToCelsiusHttpPostOut">
51+
<wsdl:part name="Body" element="tns:string" />
52+
</wsdl:message>
53+
<wsdl:message name="CelsiusToFahrenheitHttpPostIn">
54+
<wsdl:part name="Celsius" type="s:string" />
55+
</wsdl:message>
56+
<wsdl:message name="CelsiusToFahrenheitHttpPostOut">
57+
<wsdl:part name="Body" element="tns:string" />
58+
</wsdl:message>
59+
<wsdl:portType name="TempConvertSoap">
60+
<wsdl:operation name="FahrenheitToCelsius">
61+
<wsdl:input message="tns:FahrenheitToCelsiusSoapIn" />
62+
<wsdl:output message="tns:FahrenheitToCelsiusSoapOut" />
63+
</wsdl:operation>
64+
<wsdl:operation name="CelsiusToFahrenheit">
65+
<wsdl:input message="tns:CelsiusToFahrenheitSoapIn" />
66+
<wsdl:output message="tns:CelsiusToFahrenheitSoapOut" />
67+
</wsdl:operation>
68+
</wsdl:portType>
69+
<wsdl:portType name="TempConvertHttpPost">
70+
<wsdl:operation name="FahrenheitToCelsius">
71+
<wsdl:input message="tns:FahrenheitToCelsiusHttpPostIn" />
72+
<wsdl:output message="tns:FahrenheitToCelsiusHttpPostOut" />
73+
</wsdl:operation>
74+
<wsdl:operation name="CelsiusToFahrenheit">
75+
<wsdl:input message="tns:CelsiusToFahrenheitHttpPostIn" />
76+
<wsdl:output message="tns:CelsiusToFahrenheitHttpPostOut" />
77+
</wsdl:operation>
78+
</wsdl:portType>
79+
<wsdl:binding name="TempConvertSoap" type="tns:TempConvertSoap">
80+
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
81+
<wsdl:operation name="FahrenheitToCelsius">
82+
<soap:operation soapAction="https://www.w3schools.com/xml/FahrenheitToCelsius" style="document" />
83+
<wsdl:input>
84+
<soap:body use="literal" />
85+
</wsdl:input>
86+
<wsdl:output>
87+
<soap:body use="literal" />
88+
</wsdl:output>
89+
</wsdl:operation>
90+
<wsdl:operation name="CelsiusToFahrenheit">
91+
<soap:operation soapAction="https://www.w3schools.com/xml/CelsiusToFahrenheit" style="document" />
92+
<wsdl:input>
93+
<soap:body use="literal" />
94+
</wsdl:input>
95+
<wsdl:output>
96+
<soap:body use="literal" />
97+
</wsdl:output>
98+
</wsdl:operation>
99+
</wsdl:binding>
100+
<wsdl:binding name="TempConvertSoap12" type="tns:TempConvertSoap">
101+
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
102+
<wsdl:operation name="FahrenheitToCelsius">
103+
<soap12:operation soapAction="https://www.w3schools.com/xml/FahrenheitToCelsius" style="document" />
104+
<wsdl:input>
105+
<soap12:body use="literal" />
106+
</wsdl:input>
107+
<wsdl:output>
108+
<soap12:body use="literal" />
109+
</wsdl:output>
110+
</wsdl:operation>
111+
<wsdl:operation name="CelsiusToFahrenheit">
112+
<soap12:operation soapAction="https://www.w3schools.com/xml/CelsiusToFahrenheit" style="document" />
113+
<wsdl:input>
114+
<soap12:body use="literal" />
115+
</wsdl:input>
116+
<wsdl:output>
117+
<soap12:body use="literal" />
118+
</wsdl:output>
119+
</wsdl:operation>
120+
</wsdl:binding>
121+
<wsdl:binding name="TempConvertHttpPost" type="tns:TempConvertHttpPost">
122+
<http:binding verb="POST" />
123+
<wsdl:operation name="FahrenheitToCelsius">
124+
<http:operation location="/FahrenheitToCelsius" />
125+
<wsdl:input>
126+
<mime:content type="application/x-www-form-urlencoded" />
127+
</wsdl:input>
128+
<wsdl:output>
129+
<mime:mimeXml part="Body" />
130+
</wsdl:output>
131+
</wsdl:operation>
132+
<wsdl:operation name="CelsiusToFahrenheit">
133+
<http:operation location="/CelsiusToFahrenheit" />
134+
<wsdl:input>
135+
<mime:content type="application/x-www-form-urlencoded" />
136+
</wsdl:input>
137+
<wsdl:output>
138+
<mime:mimeXml part="Body" />
139+
</wsdl:output>
140+
</wsdl:operation>
141+
</wsdl:binding>
142+
<wsdl:service name="TempConvert">
143+
<wsdl:port name="TempConvertSoap" binding="tns:TempConvertSoap">
144+
<soap:address location="http://www.w3schools.com/xml/tempconvert.asmx" />
145+
</wsdl:port>
146+
<wsdl:port name="TempConvertSoap12" binding="tns:TempConvertSoap12">
147+
<soap12:address location="http://www.w3schools.com/xml/tempconvert.asmx" />
148+
</wsdl:port>
149+
<wsdl:port name="TempConvertHttpPost" binding="tns:TempConvertHttpPost">
150+
<http:address location="http://www.w3schools.com/xml/tempconvert.asmx" />
151+
</wsdl:port>
152+
</wsdl:service>
153+
</wsdl:definitions>

packages/loaders/soap/test/soap.test.ts

+3-11
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,9 @@ describe('SOAP Loader', () => {
2222
afterEach(() => {
2323
globalAgent.destroy();
2424
});
25-
it('should generate the schema correctly', async () => {
26-
const soapLoader = new SOAPLoader({
27-
subgraphName: 'Test',
28-
fetch,
29-
logger: mockLogger,
30-
});
31-
await soapLoader.fetchWSDL('https://www.w3schools.com/xml/tempconvert.asmx?WSDL');
32-
const schema = soapLoader.buildSchema();
33-
expect(printSchemaWithDirectives(schema)).toMatchSnapshot();
34-
});
35-
it('should execute SOAP calls correctly', async () => {
25+
// TODO: Implement this locally later
26+
// Now E2E tests have it covered
27+
it.skip('should execute SOAP calls correctly', async () => {
3628
const soapLoader = new SOAPLoader({
3729
subgraphName: 'Test',
3830
fetch,

0 commit comments

Comments
 (0)