@bucky24/jsbehave 0.12.0 → 0.12.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/README.md CHANGED
@@ -53,7 +53,7 @@ Running `jsbehave` directly will locate all files that end in `.behave` and will
53
53
 
54
54
  `set active browser to <name>`
55
55
 
56
- `expect element <selector> to have contents <text>`
56
+ `expect element <selector> to have content <text>`
57
57
 
58
58
  `set variable <variable name> to <text>`
59
59
 
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@bucky24/jsbehave",
3
- "version": "0.12.0",
3
+ "version": "0.12.2",
4
4
  "description": "A module that allows BDD testing for browser based testing in Selenium.",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
7
- "test": "node src/index.js examples/basic_example",
8
- "browserTest": "node src/index.js examples/browser_example",
9
- "screenshotTest": "node src/index.js examples/screenshot_example",
10
- "actionTest": "node src/index.js examples/action_example",
7
+ "test": "node src/index.js examples/basic_example.behave",
8
+ "browserTest": "node src/index.js examples/browser_example.behave",
9
+ "screenshotTest": "node src/index.js examples/screenshot_example.behave",
10
+ "actionTest": "node src/index.js examples/action_example.behave",
11
11
  "publish": "npm publish --access=public"
12
12
  },
13
13
  "repository": {
@@ -31,8 +31,7 @@
31
31
  },
32
32
  "homepage": "https://github.com/Bucky24/jsbehave#readme",
33
33
  "dependencies": {
34
- "clipboardy": "^2.3.0",
35
- "selenium-webdriver": "4.3.1",
36
- "uuid": "^8.3.2"
34
+ "clipboardy": "^5.3.1",
35
+ "selenium-webdriver": "4.41.0"
37
36
  }
38
37
  }
package/src/index.js CHANGED
@@ -4,8 +4,9 @@ const {Builder, By, Key, until} = require('selenium-webdriver');
4
4
  const fs = require("fs");
5
5
  const { EOL } = require('os');
6
6
  const path = require("path");
7
- const clipboardy = require('clipboardy');
8
- const { v4: uuidv4 } = require('uuid');
7
+ const { randomUUID } = require('crypto');
8
+ let clipboardy;
9
+ import('clipboardy').then((c) => clipboardy = c);
9
10
 
10
11
  let fileNames = [];
11
12
  if (process.argv.length > 2) {
@@ -18,7 +19,9 @@ if (process.argv.length > 2) {
18
19
  });
19
20
 
20
21
  fileNames = entries
21
- .filter(e => e.isFile() && e.name.endsWith("behave"))
22
+ .filter(e => {
23
+ return e.isFile() && e.name.endsWith(".behave");
24
+ })
22
25
  .map(e => path.join(e.path, e.name));
23
26
  }
24
27
 
@@ -141,7 +144,7 @@ function getText(string, allowRegex) {
141
144
  regexStr = regexStr.substr(0, regexStr.length-1)
142
145
  string = new RegExp(regexStr);
143
146
  } else if (string === "uuid") {
144
- string = uuidv4();
147
+ string = randomUUID();
145
148
  }
146
149
 
147
150
  return string;