askui 0.11.4 → 0.11.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.
- package/dist/cjs/core/reporting/step-reporter.js +19 -3
- package/dist/esm/core/reporting/step-reporter.js +19 -3
- package/dist/example_projects_templates/typescript_jest/test/helper/jest.setup.ts +0 -1
- package/dist/example_projects_templates/typescript_jest/test/jest.config.ts +1 -1
- package/package.json +1 -1
|
@@ -11,6 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.StepReporter = void 0;
|
|
13
13
|
const default_step_1 = require("./default-step");
|
|
14
|
+
const logger_1 = require("../../lib/logger");
|
|
14
15
|
class StepReporter {
|
|
15
16
|
constructor(reporter) {
|
|
16
17
|
this.reporter = reporter;
|
|
@@ -31,7 +32,12 @@ class StepReporter {
|
|
|
31
32
|
throw new Error('Cannot begin step that is not pending.');
|
|
32
33
|
}
|
|
33
34
|
this.currentStep.onBegin(snapshot);
|
|
34
|
-
|
|
35
|
+
try {
|
|
36
|
+
yield ((_b = (_a = this.reporter).onStepBegin) === null || _b === void 0 ? void 0 : _b.call(_a, this.currentStep));
|
|
37
|
+
}
|
|
38
|
+
catch (reporterError) {
|
|
39
|
+
logger_1.logger.error(reporterError);
|
|
40
|
+
}
|
|
35
41
|
});
|
|
36
42
|
}
|
|
37
43
|
onStepRetry(snapshot, error) {
|
|
@@ -44,7 +50,12 @@ class StepReporter {
|
|
|
44
50
|
throw new Error('Cannot retry step that has not been running.');
|
|
45
51
|
}
|
|
46
52
|
this.currentStep.onRetry(snapshot, error);
|
|
47
|
-
|
|
53
|
+
try {
|
|
54
|
+
yield ((_b = (_a = this.reporter).onStepRetry) === null || _b === void 0 ? void 0 : _b.call(_a, this.currentStep));
|
|
55
|
+
}
|
|
56
|
+
catch (reporterError) {
|
|
57
|
+
logger_1.logger.error(reporterError);
|
|
58
|
+
}
|
|
48
59
|
});
|
|
49
60
|
}
|
|
50
61
|
onStepEnd(snapshot, error) {
|
|
@@ -57,7 +68,12 @@ class StepReporter {
|
|
|
57
68
|
throw new Error('Cannot end step that has not been running.');
|
|
58
69
|
}
|
|
59
70
|
this.currentStep.onEnd(snapshot, error);
|
|
60
|
-
|
|
71
|
+
try {
|
|
72
|
+
yield ((_b = (_a = this.reporter).onStepEnd) === null || _b === void 0 ? void 0 : _b.call(_a, this.currentStep));
|
|
73
|
+
}
|
|
74
|
+
catch (reporterError) {
|
|
75
|
+
logger_1.logger.error(reporterError);
|
|
76
|
+
}
|
|
61
77
|
});
|
|
62
78
|
}
|
|
63
79
|
}
|
|
@@ -8,6 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { DefaultStep } from './default-step';
|
|
11
|
+
import { logger } from '../../lib/logger';
|
|
11
12
|
export class StepReporter {
|
|
12
13
|
constructor(reporter) {
|
|
13
14
|
this.reporter = reporter;
|
|
@@ -28,7 +29,12 @@ export class StepReporter {
|
|
|
28
29
|
throw new Error('Cannot begin step that is not pending.');
|
|
29
30
|
}
|
|
30
31
|
this.currentStep.onBegin(snapshot);
|
|
31
|
-
|
|
32
|
+
try {
|
|
33
|
+
yield ((_b = (_a = this.reporter).onStepBegin) === null || _b === void 0 ? void 0 : _b.call(_a, this.currentStep));
|
|
34
|
+
}
|
|
35
|
+
catch (reporterError) {
|
|
36
|
+
logger.error(reporterError);
|
|
37
|
+
}
|
|
32
38
|
});
|
|
33
39
|
}
|
|
34
40
|
onStepRetry(snapshot, error) {
|
|
@@ -41,7 +47,12 @@ export class StepReporter {
|
|
|
41
47
|
throw new Error('Cannot retry step that has not been running.');
|
|
42
48
|
}
|
|
43
49
|
this.currentStep.onRetry(snapshot, error);
|
|
44
|
-
|
|
50
|
+
try {
|
|
51
|
+
yield ((_b = (_a = this.reporter).onStepRetry) === null || _b === void 0 ? void 0 : _b.call(_a, this.currentStep));
|
|
52
|
+
}
|
|
53
|
+
catch (reporterError) {
|
|
54
|
+
logger.error(reporterError);
|
|
55
|
+
}
|
|
45
56
|
});
|
|
46
57
|
}
|
|
47
58
|
onStepEnd(snapshot, error) {
|
|
@@ -54,7 +65,12 @@ export class StepReporter {
|
|
|
54
65
|
throw new Error('Cannot end step that has not been running.');
|
|
55
66
|
}
|
|
56
67
|
this.currentStep.onEnd(snapshot, error);
|
|
57
|
-
|
|
68
|
+
try {
|
|
69
|
+
yield ((_b = (_a = this.reporter).onStepEnd) === null || _b === void 0 ? void 0 : _b.call(_a, this.currentStep));
|
|
70
|
+
}
|
|
71
|
+
catch (reporterError) {
|
|
72
|
+
logger.error(reporterError);
|
|
73
|
+
}
|
|
58
74
|
});
|
|
59
75
|
}
|
|
60
76
|
}
|
|
@@ -2,7 +2,7 @@ import type { Config } from '@jest/types';
|
|
|
2
2
|
|
|
3
3
|
const config: Config.InitialOptions = {
|
|
4
4
|
preset: 'ts-jest',
|
|
5
|
-
testEnvironment: 'jest-allure-circus',
|
|
5
|
+
testEnvironment: '@askui/jest-allure-circus',
|
|
6
6
|
setupFilesAfterEnv: ['./helper/jest.setup.ts'],
|
|
7
7
|
sandboxInjectedGlobals: [
|
|
8
8
|
'Math',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "askui",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "askui GmbH <info@askui.com> (http://www.askui.com/)",
|
|
6
6
|
"description": "Reliable, automated end-to-end-testing that depends on what is shown on your screen instead of the technology you are running on",
|