artes 1.4.2 → 1.4.4

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.
@@ -51,6 +51,15 @@ function resolveEnv(artesConfig) {
51
51
  }
52
52
  const env = resolveEnv(artesConfig);
53
53
 
54
+ const resolveFeaturePaths = (basePath, value) => {
55
+ return value
56
+ .split(',')
57
+ .map(p => p.trim())
58
+ .filter(Boolean)
59
+ .map(p => path.join(basePath, p));
60
+ };
61
+
62
+
54
63
  module.exports = {
55
64
  default: {
56
65
  // File paths and patterns
@@ -60,13 +69,13 @@ module.exports = {
60
69
  timeout: process.env.TIMEOUT
61
70
  ? Number(process.env.TIMEOUT) * 1000
62
71
  : artesConfig.timeout * 1000 || 30 * 1000, // Default timeout in seconds
63
- paths: process.env.RERUN
64
- ? [`${path.join("../../", process.env.RERUN)}`]
72
+ paths: process.env.RERUN
73
+ ? [path.join("../../", process.env.RERUN)]
65
74
  : process.env.FEATURES
66
- ? [path.join(moduleConfig.projectPath, process.env.FEATURES)]
75
+ ? resolveFeaturePaths(moduleConfig.projectPath, process.env.FEATURES)
67
76
  : artesConfig.features
68
- ? [path.join(moduleConfig.projectPath, artesConfig.features)]
69
- : [moduleConfig.featuresPath], // Paths to feature files
77
+ ? resolveFeaturePaths(moduleConfig.projectPath, artesConfig.features)
78
+ : [moduleConfig.featuresPath], // Paths to feature files
70
79
  require: [
71
80
  process.env.STEP_DEFINITIONS
72
81
  ? [path.join(moduleConfig.projectPath, process.env.STEP_DEFINITIONS)]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "artes",
3
- "version": "1.4.2",
3
+ "version": "1.4.4",
4
4
  "description": "The simplest way to automate UI and API tests using Cucumber-style steps.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -38,7 +38,10 @@ function selectorSeparator(element) {
38
38
  }
39
39
  }
40
40
 
41
- function getSelector(element) {
41
+ function getSelector(element) {
42
+
43
+ element = resolveVariable(element)
44
+
42
45
  const selector =
43
46
  elements?.[element]?.selector || elements?.[element] || element;
44
47
  return resolveVariable(selectorSeparator(selector));
@@ -58,7 +58,7 @@ function generateReport() {
58
58
 
59
59
  require("deasync").loopWhile(() => !done);
60
60
 
61
- console.log(`🗜️ Zipped in ${moduleConfig.projectPath}/report.zip!`);
61
+ console.log(`🗜️ Zipped in ${path.join( path.dirname(moduleConfig.reportPath), "report.zip" )}!`);
62
62
  if (error) throw error;
63
63
  }
64
64
  } catch (err) {