artes 1.0.57 → 1.0.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -128,7 +128,7 @@ await context.page.goto("https://www.saucedemo.com/");
|
|
|
128
128
|
"tests/steps/*.{ts,js}",
|
|
129
129
|
"node_modules/artes/src/stepDefinitions/*.{ts,js}",
|
|
130
130
|
],
|
|
131
|
-
"cucumber.features": ["tests/features
|
|
131
|
+
"cucumber.features": ["tests/features/**/*.feature"],
|
|
132
132
|
"cucumberautocomplete.syncfeatures": true,
|
|
133
133
|
"cucumberautocomplete.strictGherkinCompletion": true,
|
|
134
134
|
});
|
|
@@ -30,7 +30,7 @@ function processForm(key, value) {
|
|
|
30
30
|
typeof value.data === "object"
|
|
31
31
|
? JSON.stringify(value.data)
|
|
32
32
|
: String(value.data);
|
|
33
|
-
|
|
33
|
+
|
|
34
34
|
formData[key] = {
|
|
35
35
|
name: value.filename || key,
|
|
36
36
|
mimeType: value.contentType,
|
|
@@ -129,12 +129,14 @@ const api = {
|
|
|
129
129
|
|
|
130
130
|
switch (bodyType) {
|
|
131
131
|
case "multipart":
|
|
132
|
+
let combinedFormData = {};
|
|
132
133
|
for (const [key, value] of Object.entries(payloadJSON.body)) {
|
|
133
|
-
|
|
134
|
+
const formData = processForm(key, value);
|
|
135
|
+
Object.assign(combinedFormData, formData);
|
|
134
136
|
}
|
|
135
137
|
requestBody = {
|
|
136
138
|
headers: payloadJSON.headers,
|
|
137
|
-
multipart:
|
|
139
|
+
multipart: combinedFormData,
|
|
138
140
|
};
|
|
139
141
|
break;
|
|
140
142
|
default:
|
|
@@ -174,12 +176,14 @@ const api = {
|
|
|
174
176
|
|
|
175
177
|
switch (bodyType) {
|
|
176
178
|
case "multipart":
|
|
179
|
+
let combinedFormData = {};
|
|
177
180
|
for (const [key, value] of Object.entries(payloadJSON.body)) {
|
|
178
|
-
|
|
181
|
+
const formData = processForm(key, value);
|
|
182
|
+
Object.assign(combinedFormData, formData);
|
|
179
183
|
}
|
|
180
184
|
requestBody = {
|
|
181
185
|
headers: payloadJSON.headers,
|
|
182
|
-
multipart:
|
|
186
|
+
multipart: combinedFormData,
|
|
183
187
|
};
|
|
184
188
|
break;
|
|
185
189
|
default:
|
|
@@ -219,12 +223,14 @@ const api = {
|
|
|
219
223
|
|
|
220
224
|
switch (bodyType) {
|
|
221
225
|
case "multipart":
|
|
226
|
+
let combinedFormData = {};
|
|
222
227
|
for (const [key, value] of Object.entries(payloadJSON.body)) {
|
|
223
|
-
|
|
228
|
+
const formData = processForm(key, value);
|
|
229
|
+
Object.assign(combinedFormData, formData);
|
|
224
230
|
}
|
|
225
231
|
requestBody = {
|
|
226
232
|
headers: payloadJSON.headers,
|
|
227
|
-
multipart:
|
|
233
|
+
multipart: combinedFormData,
|
|
228
234
|
};
|
|
229
235
|
break;
|
|
230
236
|
default:
|