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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "artes",
3
- "version": "1.0.57",
3
+ "version": "1.0.58",
4
4
  "description": "The simplest way to automate UI and API tests using Cucumber-style steps.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -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/*.features"],
131
+ "cucumber.features": ["tests/features/**/*.feature"],
132
132
  "cucumberautocomplete.syncfeatures": true,
133
133
  "cucumberautocomplete.strictGherkinCompletion": true,
134
134
  });
@@ -14,8 +14,7 @@ function runTests(args, flags) {
14
14
 
15
15
  const tags = args[args.indexOf("--tags") + 1];
16
16
 
17
- const headless = args.includes("--headless");
18
-
17
+
19
18
  flags.env && console.log("Running env:", env);
20
19
  flags.env ? (process.env.ENV = JSON.stringify(env)) : "";
21
20
 
@@ -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
- console.log("Content:", content);
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
- var formData = processForm(key, value);
134
+ const formData = processForm(key, value);
135
+ Object.assign(combinedFormData, formData);
134
136
  }
135
137
  requestBody = {
136
138
  headers: payloadJSON.headers,
137
- multipart: formData,
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
- var formData = processForm(key, value);
181
+ const formData = processForm(key, value);
182
+ Object.assign(combinedFormData, formData);
179
183
  }
180
184
  requestBody = {
181
185
  headers: payloadJSON.headers,
182
- multipart: formData,
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
- var formData = processForm(key, value);
228
+ const formData = processForm(key, value);
229
+ Object.assign(combinedFormData, formData);
224
230
  }
225
231
  requestBody = {
226
232
  headers: payloadJSON.headers,
227
- multipart: formData,
233
+ multipart: combinedFormData,
228
234
  };
229
235
  break;
230
236
  default: