@cuppet/core 2.0.4 → 2.0.6

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.
@@ -12,7 +12,7 @@ const commonFields = {
12
12
  Finish: '#edit-return',
13
13
  Name: '#edit-name',
14
14
  Pass: '#edit-pass',
15
- TextBox: '.show #item-0',
15
+ TextBox: '.show #item-0 > a',
16
16
  };
17
17
 
18
18
  module.exports = commonFields;
@@ -22,6 +22,9 @@ Given('the response code should be {string}', async function (code) {
22
22
  Then('the response should be an {string}', async function (type) {
23
23
  await apiSteps.validateResponseType(type);
24
24
  });
25
+ Then('the response should be an empty array', async function () {
26
+ await apiSteps.validateResponseIsEmptyArray();
27
+ });
25
28
  Then('the property {string} should be an {string}', async function (property, type) {
26
29
  await apiSteps.propertyIs(property, type);
27
30
  });
package/package.json CHANGED
@@ -1,91 +1,84 @@
1
1
  {
2
- "name": "@cuppet/core",
3
- "version": "2.0.4",
4
- "description": "Core testing framework components for Cuppet - BDD framework based on Cucumber and Puppeteer",
5
- "main": "index.js",
6
- "files": [
7
- "src/",
8
- "features/",
9
- "index.js",
10
- "stepDefinitions.js",
11
- "postinstall.js",
12
- "backStopData/"
13
- ],
14
- "keywords": [
15
- "testing",
16
- "bdd",
17
- "cucumber",
18
- "puppeteer",
19
- "appium",
20
- "mqtt",
21
- "iot",
22
- "automation",
23
- "e2e"
24
- ],
25
- "author": "Miroslav Rusev",
26
- "license": "ISC",
27
- "peerDependencies": {
28
- "@cucumber/cucumber": "^12.2.0",
29
- "config": "^4.1.0"
30
- },
31
- "dependencies": {
32
- "@supercharge/strings": "^2.0.0",
33
- "@wdio/globals": "9.17.0",
34
- "appium": "3.1.2",
35
- "appium-uiautomator2-driver": "6.7.3",
36
- "axios": "^1.11.0",
37
- "backstopjs": "^6.3.25",
38
- "chai": "6.0.1",
39
- "kafkajs": "^2.2.4",
40
- "lighthouse": "^12.8.0",
41
- "mime": "^3.0.0",
42
- "mime-types": "^3.0.1",
43
- "moment": "^2.30.1",
44
- "mqtt": "^5.11.3",
45
- "pa11y": "^9.0.0",
46
- "pa11y-reporter-html": "^2.0.0",
47
- "puppeteer": "^24.0.1",
48
- "uuid": "^13.0.0",
49
- "webdriverio": "9.21.0",
50
- "xml2js": "^0.6.2"
51
- },
52
- "devDependencies": {
53
- "@cucumber/cucumber": "^12.2.0",
54
- "@html-eslint/eslint-plugin": "^0.43.1",
55
- "@html-eslint/parser": "^0.43.0",
56
- "@semantic-release/changelog": "^6.0.3",
57
- "@semantic-release/git": "^10.0.1",
58
- "@semantic-release/github": "^12.0.2",
59
- "@semantic-release/npm": "^13.1.3",
60
- "config": "^4.1.0",
61
- "eslint": "^9.29.0",
62
- "eslint-config-prettier": "^10.1.5",
63
- "eslint-plugin-prettier": "^5.5.1",
64
- "prettier": "^3.6.1",
65
- "semantic-release": "^25.0.2"
66
- },
67
- "scripts": {
68
- "test": "cucumber-js features/tests/example.feature",
69
- "run:kafka": "cucumber-js features/tests/example-kafka.feature",
70
- "run:visual": "cucumber-js features/tests/example-visual-test.feature",
71
- "run:pa11y": "cucumber-js features/tests/example-pa11y.feature",
72
- "run:lighthouse": "cucumber-js features/tests/example-lighthouse.feature",
73
- "run:mqtt": "cucumber-js features/tests/example-mqtt.feature",
74
- "run:mobile": "cucumber-js features/tests/example-mobile.feature",
75
- "run:accessibility": "cucumber-js features/tests/example-accessibility.feature",
76
- "run:performance": "cucumber-js features/tests/example-performance.feature",
77
- "postinstall": "node postinstall.js",
78
- "lint:check": "eslint .",
79
- "format:check": "prettier --check .",
80
- "format": "eslint . --fix && prettier --write .",
81
- "verify": "yarn lint:check && yarn format:check"
82
- },
83
- "repository": {
84
- "type": "git",
85
- "url": "git+https://github.com/MiroslavRusev/cuppet-core.git"
86
- },
87
- "bugs": {
88
- "url": "https://github.com/MiroslavRusev/cuppet-core/issues"
89
- },
90
- "homepage": "https://github.com/MiroslavRusev/cuppet-core#readme"
2
+ "name": "@cuppet/core",
3
+ "version": "2.0.6",
4
+ "description": "Core testing framework components for Cuppet - BDD framework based on Cucumber and Puppeteer",
5
+ "main": "index.js",
6
+ "files": [
7
+ "src/",
8
+ "features/",
9
+ "index.js",
10
+ "stepDefinitions.js",
11
+ "postinstall.js",
12
+ "backStopData/"
13
+ ],
14
+ "keywords": [
15
+ "testing",
16
+ "bdd",
17
+ "cucumber",
18
+ "puppeteer",
19
+ "appium",
20
+ "mqtt",
21
+ "iot",
22
+ "automation",
23
+ "e2e"
24
+ ],
25
+ "author": "Miroslav Rusev",
26
+ "license": "ISC",
27
+ "peerDependencies": {
28
+ "@cucumber/cucumber": "^12.2.0",
29
+ "config": "^4.1.0"
30
+ },
31
+ "dependencies": {
32
+ "@supercharge/strings": "^2.0.0",
33
+ "@wdio/globals": "9.23.0",
34
+ "appium": "3.2.2",
35
+ "appium-uiautomator2-driver": "7.0.0",
36
+ "axios": "^1.13.6",
37
+ "backstopjs": "^6.3.25",
38
+ "chai": "6.2.2",
39
+ "kafkajs": "^2.2.4",
40
+ "lighthouse": "^13.0.3",
41
+ "mime": "^4.1.0",
42
+ "mime-types": "^3.0.2",
43
+ "moment": "^2.30.1",
44
+ "mqtt": "^5.11.3",
45
+ "pa11y": "^9.1.0",
46
+ "pa11y-reporter-html": "^2.0.0",
47
+ "puppeteer": "^24.39.1",
48
+ "uuid": "^13.0.0",
49
+ "webdriverio": "9.24.0",
50
+ "xml2js": "^0.6.2"
51
+ },
52
+ "devDependencies": {
53
+ "@cucumber/cucumber": "^12.6.0",
54
+ "@html-eslint/eslint-plugin": "^0.54.2",
55
+ "@html-eslint/parser": "^0.54.0",
56
+ "config": "^4.2.0",
57
+ "eslint": "^10.0.0",
58
+ "eslint-config-prettier": "^10.1.8",
59
+ "eslint-plugin-prettier": "^5.5.5",
60
+ "prettier": "^3.8.1"
61
+ },
62
+ "scripts": {
63
+ "test": "cucumber-js features/tests/example.feature",
64
+ "run:kafka": "cucumber-js features/tests/example-kafka.feature",
65
+ "run:visual": "cucumber-js features/tests/example-visual-test.feature",
66
+ "run:pa11y": "cucumber-js features/tests/example-pa11y.feature",
67
+ "run:lighthouse": "cucumber-js features/tests/example-lighthouse.feature",
68
+ "run:mqtt": "cucumber-js features/tests/example-mqtt.feature",
69
+ "run:mobile": "cucumber-js features/tests/example-mobile.feature",
70
+ "postinstall": "node postinstall.js",
71
+ "lint:check": "eslint .",
72
+ "format:check": "prettier --check .",
73
+ "format": "eslint . --fix && prettier --write .",
74
+ "verify": "yarn lint:check && yarn format:check"
75
+ },
76
+ "repository": {
77
+ "type": "git",
78
+ "url": "git+https://github.com/MiroslavRusev/cuppet-core.git"
79
+ },
80
+ "bugs": {
81
+ "url": "https://github.com/MiroslavRusev/cuppet-core/issues"
82
+ },
83
+ "homepage": "https://github.com/MiroslavRusev/cuppet-core#readme"
91
84
  }
@@ -196,7 +196,16 @@ module.exports = {
196
196
  * @returns {Promise<void>}
197
197
  */
198
198
  validateResponseType: async function (type) {
199
- await assert.typeOf(this.response.data, type, `Response is not an ${type}`);
199
+ assert.typeOf(this.response.data, type, `Response is not an ${type}`);
200
+ },
201
+
202
+ /**
203
+ * Validate that the response body is an empty array
204
+ * @returns {Promise<void>}
205
+ */
206
+ validateResponseIsEmptyArray: async function () {
207
+ assert.isArray(this.response.data, 'Response is not an array');
208
+ assert.isEmpty(this.response.data, `Expected an empty array but got ${JSON.stringify(this.response.data)}`);
200
209
  },
201
210
 
202
211
  /**