artes 1.2.1 → 1.2.2

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.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "The simplest way to automate UI and API tests using Cucumber-style steps.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -64,13 +64,13 @@ if (fs.existsSync(projectHooksPath)) {
64
64
  /* ------------------- Hooks ------------------- */
65
65
 
66
66
  BeforeAll(() => {
67
- pomCollector();
68
-
69
67
  typeof projectHooks.BeforeAll == "function" && projectHooks.BeforeAll()
70
68
 
69
+ pomCollector();
71
70
  });
72
71
 
73
72
  Before(async function () {
73
+
74
74
  context.vars = {};
75
75
 
76
76
  const envFilePath = path.join(
@@ -123,14 +123,16 @@ BeforeStep(({ pickleStep }) => {
123
123
  });
124
124
 
125
125
  AfterStep(async function ({ pickleStep }) {
126
+ typeof projectHooks.AfterStep == "function" && projectHooks.AfterStep()
127
+
126
128
  if (HTTP_METHODS.some((method) => pickleStep.text.includes(method))) {
127
129
  await attachResponse(this.attach);
128
130
  }
129
-
130
- typeof projectHooks.AfterStep == "function" && projectHooks.AfterStep()
131
131
  });
132
132
 
133
133
  After(async function ({ pickle, result }) {
134
+ typeof projectHooks.After == "function" && projectHooks.After()
135
+
134
136
  const shouldReport =
135
137
  (cucumberConfig.default.successReport ||
136
138
  result?.status !== Status.PASSED) &&
@@ -212,10 +214,11 @@ After(async function ({ pickle, result }) {
212
214
  }
213
215
  }
214
216
 
215
- typeof projectHooks.After == "function" && projectHooks.After()
216
217
  });
217
218
 
218
219
  AfterAll(() => {
220
+ typeof projectHooks.AfterAll == "function" && projectHooks.AfterAll()
221
+
219
222
  if (!fs.existsSync(statusDir)) return;
220
223
 
221
224
  const files = fs.readdirSync(statusDir);
@@ -239,6 +242,4 @@ AfterAll(() => {
239
242
  fs.writeFileSync(path.join(process.cwd(), "EXIT_CODE.txt"), "1");
240
243
  }
241
244
  }
242
-
243
- typeof projectHooks.AfterAll == "function" && projectHooks.AfterAll()
244
245
  });