@zohodesk/testinglibrary 0.1.8-bdd-28 → 0.1.8-bdd-29
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.
|
@@ -4,15 +4,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.createBdd = createBdd;
|
|
7
|
-
const
|
|
7
|
+
const Step = (description, callback) => {
|
|
8
8
|
globalStepMap.set(description, callback);
|
|
9
9
|
};
|
|
10
|
+
const Given = Step;
|
|
11
|
+
const Then = Step;
|
|
12
|
+
const When = Step;
|
|
13
|
+
const And = Step;
|
|
10
14
|
function createBdd() {
|
|
11
15
|
return {
|
|
12
16
|
Given,
|
|
13
17
|
When,
|
|
14
18
|
Then,
|
|
15
19
|
And,
|
|
16
|
-
Step
|
|
20
|
+
Step,
|
|
21
|
+
But
|
|
17
22
|
};
|
|
18
23
|
}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.createNativeBDD = createNativeBDD;
|
|
7
7
|
var _logger = require("../../utils/logger");
|
|
8
|
-
const $
|
|
8
|
+
const $And = description => {
|
|
9
9
|
const stepFunction = globalStepMap.get(description);
|
|
10
10
|
if (stepFunction === undefined) {
|
|
11
11
|
_logger.Logger.log(_logger.Logger.FAILURE_TYPE, `Missing Steps Implementation - ${description}`);
|
|
@@ -81,6 +81,10 @@ function getScenarioTable(stepArguments, argument) {
|
|
|
81
81
|
* get method input but not get it assign and extract
|
|
82
82
|
*/
|
|
83
83
|
|
|
84
|
+
const $Given = $And;
|
|
85
|
+
const $Step = $And;
|
|
86
|
+
const $Then = $And;
|
|
87
|
+
const $When = $And;
|
|
84
88
|
function createNativeBDD() {
|
|
85
89
|
return {
|
|
86
90
|
$Given,
|
package/build/index.js
CHANGED
|
@@ -35,11 +35,13 @@ const {
|
|
|
35
35
|
Given,
|
|
36
36
|
Then,
|
|
37
37
|
When,
|
|
38
|
-
And
|
|
38
|
+
And,
|
|
39
|
+
Step,
|
|
40
|
+
But
|
|
39
41
|
} = (0, _bddPoc.createBdd)();
|
|
42
|
+
exports.But = But;
|
|
43
|
+
exports.Step = Step;
|
|
40
44
|
exports.And = And;
|
|
41
45
|
exports.When = When;
|
|
42
46
|
exports.Then = Then;
|
|
43
|
-
exports.Given = Given;
|
|
44
|
-
const Step = exports.Step = Then;
|
|
45
|
-
const But = exports.But = Then;
|
|
47
|
+
exports.Given = Given;
|