artes 1.0.58 → 1.0.59

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/README.md CHANGED
@@ -49,7 +49,7 @@ npx artes [options]
49
49
  | 🏗️ `-c, --create` | Create an example project with Artes | `artes -c` or `artes --create` |
50
50
  | ✅ `-y, --yes` | Skip the confirmation prompt when creating an example project | `artes -c -y` or `artes --create --yes` |
51
51
  | 📊 `-r, --report` | Run tests and generate Allure report | `artes -r` or `artes --report` |
52
- | 📁 `--features` | Specify one or more feature files to run (comma-separated) | `artes --features 'Alma, Banan'` |
52
+ | 📁 `--features` | Specify one or more feature files' relative paths to run (comma-separated) (comma-separated) | `artes --features "tests/features/Alma, tests/features/Banan.feature"` |
53
53
  | 🔖 `--tags` | Run tests with specified Cucumber tags | `artes --tags "@smoke or @wip"` |
54
54
  | 🌐 `--env` | Set the environment for the test run | `artes --env "dev"` |
55
55
  | 🕶️ `--headless` | Run browser in headless mode | `artes --headless` |
@@ -18,9 +18,11 @@ module.exports = {
18
18
  default: {
19
19
  // File paths and patterns
20
20
  timeout: artesConfig.timeout || 30, // Default timeout in milliseconds
21
- paths: artesConfig.features
22
- ? path.join(moduleConfig.projectPath, artesConfig.features)
23
- : [moduleConfig.featuresPath], // Paths to feature files
21
+ paths: process.env.FEATURES
22
+ ? [path.join(moduleConfig.projectPath, process.env.FEATURES)]
23
+ : artesConfig.features
24
+ ? path.join(moduleConfig.projectPath, artesConfig.features)
25
+ : [moduleConfig.featuresPath], // Paths to feature files
24
26
  require: [
25
27
  artesConfig.steps
26
28
  ? path.join(moduleConfig.projectPath, artesConfig.steps)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "artes",
3
- "version": "1.0.58",
3
+ "version": "1.0.59",
4
4
  "description": "The simplest way to automate UI and API tests using Cucumber-style steps.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -25,8 +25,8 @@ function showHelp() {
25
25
  📊 -r, --report Run tests and generate Allure report
26
26
  Usage: artes -r or artes --report
27
27
 
28
- 📁 --features Specify one or more feature files to run (comma-separated)
29
- Usage: artes --features "Alma, Banan"
28
+ 📁 --features Specify one or more feature files' relative paths to run (comma-separated)
29
+ Usage: artes --features "tests/features/Alma, tests/features/Banan.feature"
30
30
 
31
31
  🔖 --tags Run tests with specified Cucumber tags
32
32
  Usage: artes --tags "@smoke and not @wip"
@@ -6,15 +6,11 @@ function runTests(args, flags) {
6
6
  const env = args[args.indexOf("--env") + 1];
7
7
 
8
8
  const featureFiles = args[args.indexOf("--features") + 1];
9
- const features =
10
- flags.features &&
11
- featureFiles
12
- .split(",")
13
- .map((f) => path.join(moduleConfig.featuresPath, `${f.trim()}.feature`));
14
-
9
+ const features = flags.features && featureFiles;
10
+
15
11
  const tags = args[args.indexOf("--tags") + 1];
16
12
 
17
-
13
+
18
14
  flags.env && console.log("Running env:", env);
19
15
  flags.env ? (process.env.ENV = JSON.stringify(env)) : "";
20
16
 
@@ -29,7 +25,7 @@ function runTests(args, flags) {
29
25
  flags.tags ? (process.env.RUN_TAGS = JSON.stringify(tags)) : "";
30
26
 
31
27
  flags.features && console.log("Running features:", features);
32
- flags.features ? (process.env.FEATURES = JSON.stringify(features)) : "";
28
+ flags.features ? (process.env.FEATURES = features) : "";
33
29
 
34
30
  flags.headless &&
35
31
  console.log("Running mode:", flags.headless ? "headless" : "headed");