testit-adapter-codecept 1.1.3 → 1.1.4
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 +180 -203
- package/build/bootstrap.d.ts +1 -1
- package/build/bootstrap.js +37 -34
- package/build/common/__tests/box.class.spec.d.ts +1 -1
- package/build/common/__tests/box.class.spec.js +15 -15
- package/build/common/__tests/test.utils.d.ts +4 -4
- package/build/common/__tests/test.utils.js +71 -71
- package/build/common/classes/box.class.d.ts +5 -5
- package/build/common/classes/box.class.js +18 -18
- package/build/common/classes/config.class.d.ts +6 -6
- package/build/common/classes/config.class.js +67 -67
- package/build/common/classes/logger.class.d.ts +9 -9
- package/build/common/classes/logger.class.js +28 -28
- package/build/common/classes/outcome.factory.d.ts +7 -7
- package/build/common/classes/outcome.factory.js +19 -19
- package/build/common/functions/compose.function.d.ts +1 -1
- package/build/common/functions/compose.function.js +5 -5
- package/build/common/functions/hash.function.d.ts +1 -1
- package/build/common/functions/hash.function.js +15 -15
- package/build/common/functions/humanize.function.d.ts +1 -1
- package/build/common/functions/humanize.function.js +7 -7
- package/build/common/functions/is-passed.function.d.ts +2 -2
- package/build/common/functions/is-passed.function.js +7 -7
- package/build/common/functions/to-iso-string.function.d.ts +1 -1
- package/build/common/functions/to-iso-string.function.js +10 -10
- package/build/common/functions/use-hash.function.d.ts +9 -9
- package/build/common/functions/use-hash.function.js +13 -13
- package/build/common/types/nullable.type.d.ts +1 -1
- package/build/common/types/nullable.type.js +2 -2
- package/build/helper.d.ts +9 -9
- package/build/helper.js +37 -37
- package/build/http/default-http-client.class.d.ts +22 -22
- package/build/http/default-http-client.class.js +123 -123
- package/build/http/http-client.errors.d.ts +7 -7
- package/build/http/http-client.errors.js +18 -18
- package/build/index.d.ts +2 -2
- package/build/index.js +18 -18
- package/build/jest.config.d.ts +7 -7
- package/build/jest.config.js +12 -12
- package/build/services/__tests/attachments.class.spec.d.ts +1 -1
- package/build/services/__tests/attachments.class.spec.js +23 -23
- package/build/services/__tests/runs.builder.spec.d.ts +1 -1
- package/build/services/__tests/runs.builder.spec.js +79 -79
- package/build/services/__tests/tests.builder.spec.d.ts +1 -1
- package/build/services/__tests/tests.builder.spec.js +32 -32
- package/build/services/attachments.service.d.ts +11 -11
- package/build/services/attachments.service.js +28 -28
- package/build/services/runs.builder.d.ts +10 -10
- package/build/services/runs.builder.js +65 -65
- package/build/services/tests.builder.d.ts +10 -10
- package/build/services/tests.builder.js +57 -57
- package/build/strategies/base-strategy.class.d.ts +24 -24
- package/build/strategies/base-strategy.class.js +66 -66
- package/build/strategies/default-strategy.class.d.ts +16 -16
- package/build/strategies/default-strategy.class.js +44 -44
- package/build/strategies/partial-startegy.class.d.ts +20 -20
- package/build/strategies/partial-startegy.class.js +72 -72
- package/build/strategies/scratch-strategy.class.d.ts +18 -18
- package/build/strategies/scratch-strategy.class.js +49 -49
- package/build/strategies/strategy.factory.d.ts +8 -8
- package/build/strategies/strategy.factory.js +21 -21
- package/build/types/codecept.type.d.ts +28 -27
- package/build/types/codecept.type.js +2 -2
- package/build/types/origin.type.d.ts +46 -46
- package/build/types/origin.type.js +2 -2
- package/build/types/strategy.type.d.ts +14 -10
- package/build/types/strategy.type.js +2 -2
- package/package.json +46 -46
package/README.md
CHANGED
|
@@ -1,203 +1,180 @@
|
|
|
1
|
-
# Test IT TMS adapters for Codecept
|
|
2
|
-

|
|
3
|
-
|
|
4
|
-
## Getting Started
|
|
5
|
-
|
|
6
|
-
### Installation
|
|
7
|
-
```
|
|
8
|
-
npm install testit-adapter-codecept
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Usage
|
|
12
|
-
|
|
13
|
-
### API client
|
|
14
|
-
|
|
15
|
-
To use adapter you need to install `testit-api-client`:
|
|
16
|
-
```
|
|
17
|
-
npm install testit-api-client
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
### Configuration
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
{
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
data.add(['https://www.wikipedia.org', '//input']);
|
|
182
|
-
data.add(['https://google.com', '//a[contains(., "Google")]']);
|
|
183
|
-
|
|
184
|
-
Data(data).Scenario('Should render main page for all users', ({ I, current }) => {
|
|
185
|
-
I.amOnPage(current.target);
|
|
186
|
-
I.seeElement(current.element);
|
|
187
|
-
})
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
# Contributing
|
|
192
|
-
|
|
193
|
-
You can help to develop the project. Any contributions are **greatly appreciated**.
|
|
194
|
-
|
|
195
|
-
* If you have suggestions for adding or removing projects, feel free to [open an issue](https://github.com/testit-tms/adapters-js/issues/new) to discuss it, or directly create a pull request after you edit the *README.md* file with necessary changes.
|
|
196
|
-
* Please make sure you check your spelling and grammar.
|
|
197
|
-
* Create individual PR for each suggestion.
|
|
198
|
-
* Please also read through the [Code Of Conduct](https://github.com/testit-tms/adapters-js/blob/master/CODE_OF_CONDUCT.md) before posting your first idea as well.
|
|
199
|
-
|
|
200
|
-
# License
|
|
201
|
-
|
|
202
|
-
Distributed under the Apache-2.0 License. See [LICENSE](https://github.com/testit-tms/adapters-js/blob/master/LICENSE.md) for more information.
|
|
203
|
-
|
|
1
|
+
# Test IT TMS adapters for Codecept
|
|
2
|
+

|
|
3
|
+
|
|
4
|
+
## Getting Started
|
|
5
|
+
|
|
6
|
+
### Installation
|
|
7
|
+
```
|
|
8
|
+
npm install testit-adapter-codecept
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
### API client
|
|
14
|
+
|
|
15
|
+
To use adapter you need to install `testit-api-client`:
|
|
16
|
+
```
|
|
17
|
+
npm install testit-api-client
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Configuration
|
|
21
|
+
|
|
22
|
+
| Description | Property | Environment variable | CLI argument |
|
|
23
|
+
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------|-----------------------------------|-------------------------------|
|
|
24
|
+
| Location of the TMS instance | url | TMS_URL | tmsUrl |
|
|
25
|
+
| API secret key [How to getting API secret key?](https://github.com/testit-tms/.github/tree/main/configuration#privatetoken) | privateToken | TMS_PRIVATE_TOKEN | tmsPrivateToken |
|
|
26
|
+
| ID of project in TMS instance [How to getting project ID?](https://github.com/testit-tms/.github/tree/main/configuration#projectid) | projectId | TMS_PROJECT_ID | tmsProjectId |
|
|
27
|
+
| ID of configuration in TMS instance [How to getting configuration ID?](https://github.com/testit-tms/.github/tree/main/configuration#configurationid) | configurationId | TMS_CONFIGURATION_ID | tmsConfigurationId |
|
|
28
|
+
| ID of the created test run in TMS instance.<br/>It's necessary for **adapterMode** 0 or 1 | testRunId | TMS_TEST_RUN_ID | tmsTestRunId |
|
|
29
|
+
| Parameter for specifying the name of test run in TMS instance (**It's optional**). If it is not provided, it is created automatically | testRunName | TMS_TEST_RUN_NAME | tmsTestRunName |
|
|
30
|
+
| Adapter mode. Default value - 0. The adapter supports following modes:<br/>0 - in this mode, the adapter filters tests by test run ID and configuration ID, and sends the results to the test run<br/>1 - in this mode, the adapter sends all results to the test run without filtering<br/>2 - in this mode, the adapter creates a new test run and sends results to the new test run | adapterMode | TMS_ADAPTER_MODE | tmsAdapterMode |
|
|
31
|
+
| It enables/disables certificate validation (**It's optional**). Default value - true | certValidation | TMS_CERT_VALIDATION | tmsCertValidation |
|
|
32
|
+
| Mode of automatic creation test cases (**It's optional**). Default value - false. The adapter supports following modes:<br/>true - in this mode, the adapter will create a test case linked to the created autotest (not to the updated autotest)<br/>false - in this mode, the adapter will not create a test case | automaticCreationTestCases | TMS_AUTOMATIC_CREATION_TEST_CASES | tmsAutomaticCreationTestCases |
|
|
33
|
+
|
|
34
|
+
Add TestITHelper and TestITPlugin to Codecept file configuration
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
export const config: CodeceptJS.MainConfig = {
|
|
38
|
+
tests: './**/*_test.ts',
|
|
39
|
+
output: './output',
|
|
40
|
+
helpers: {
|
|
41
|
+
Playwright: {
|
|
42
|
+
url: 'http://localhost',
|
|
43
|
+
show: false,
|
|
44
|
+
browser: 'chromium'
|
|
45
|
+
},
|
|
46
|
+
TestITHelper: {
|
|
47
|
+
require: 'testit-adapter-codecept/build/helper.js'
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
plugins: {
|
|
51
|
+
TestITPlugin: {
|
|
52
|
+
require: 'testit-adapter-codecept/build/bootstrap.js',
|
|
53
|
+
enabled: true
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
include: {},
|
|
57
|
+
name: 'codecept-test-it-testing'
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Create step.d.ts file and import TestMetadataHelper
|
|
62
|
+
|
|
63
|
+
```ts
|
|
64
|
+
type TestITHelper = import('testit-adapter-codecept/build/helper').TestMetadataHelper;
|
|
65
|
+
|
|
66
|
+
declare namespace CodeceptJS {
|
|
67
|
+
interface SupportObject { I: I, current: any }
|
|
68
|
+
interface Methods extends Playwright, TestITHelper {}
|
|
69
|
+
interface I extends WithTranslation<Methods>{}
|
|
70
|
+
namespace Translation {
|
|
71
|
+
interface Actions {}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
#### File
|
|
77
|
+
|
|
78
|
+
Create .env config or file config with default name testit-adapter.config.json in the root directory of the project
|
|
79
|
+
|
|
80
|
+
```json
|
|
81
|
+
{
|
|
82
|
+
"url": "URL",
|
|
83
|
+
"privateToken": "USER_PRIVATE_TOKEN",
|
|
84
|
+
"projectId": "PROJECT_ID",
|
|
85
|
+
"configurationId": "CONFIGURATION_ID",
|
|
86
|
+
"testRunId": "TEST_RUN_ID",
|
|
87
|
+
"testRunName": "TEST_RUN_NAME",
|
|
88
|
+
"adapterMode": ADAPTER_MODE,
|
|
89
|
+
"automaticCreationTestCases": AUTOMATIC_CREATION_TEST_CASES
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Methods
|
|
94
|
+
|
|
95
|
+
Methods can be used to specify information about autotest.
|
|
96
|
+
|
|
97
|
+
Description of metadata methods:
|
|
98
|
+
- `workItemIds` - linking an autotest to a test case
|
|
99
|
+
- `displayName` - name of the autotest in the Test IT system (can be replaced with documentation strings)
|
|
100
|
+
- `externalId` - ID of the autotest within the project in the Test IT System
|
|
101
|
+
- `title` - title in the autotest card
|
|
102
|
+
- `description` - description in the autotest card
|
|
103
|
+
- `labels` - tags in the work item
|
|
104
|
+
- `link` - links in the autotest card
|
|
105
|
+
- `nameSpace` - directory in the TMS system
|
|
106
|
+
- `className` - subdirectory in the TMS system
|
|
107
|
+
|
|
108
|
+
Description of methods:
|
|
109
|
+
- `addLinks` - links in the autotest result
|
|
110
|
+
- `addAttachments` - uploading files in the autotest result
|
|
111
|
+
- `addMessage` - information about autotest in the autotest result
|
|
112
|
+
|
|
113
|
+
### Examples
|
|
114
|
+
|
|
115
|
+
#### Simple test
|
|
116
|
+
```ts
|
|
117
|
+
Scenario(
|
|
118
|
+
'Scenario name',
|
|
119
|
+
{
|
|
120
|
+
externalId: '1',
|
|
121
|
+
displayName: 'Name',
|
|
122
|
+
title: 'Title',
|
|
123
|
+
description: 'Description',
|
|
124
|
+
labels: ['Custom label'],
|
|
125
|
+
links: [
|
|
126
|
+
{
|
|
127
|
+
title: 'Google about this error',
|
|
128
|
+
description: 'Google documents',
|
|
129
|
+
url: 'https://google.com',
|
|
130
|
+
type: 'Requirement',
|
|
131
|
+
hasInfo: true
|
|
132
|
+
}
|
|
133
|
+
],
|
|
134
|
+
workitemIds: ['1140']
|
|
135
|
+
},
|
|
136
|
+
({ I }) => {
|
|
137
|
+
I.amOnPage('https://github.com');
|
|
138
|
+
I.addLinks([
|
|
139
|
+
{
|
|
140
|
+
title: 'Github page',
|
|
141
|
+
description: 'Github SPA page',
|
|
142
|
+
url: 'https://github.com',
|
|
143
|
+
type: 'Repository',
|
|
144
|
+
hasInfo: true
|
|
145
|
+
}
|
|
146
|
+
])
|
|
147
|
+
I.addMessage('Hello');
|
|
148
|
+
I.see('GitHub');
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
#### Parameterized test
|
|
154
|
+
```ts
|
|
155
|
+
const data = new DataTable(['target', 'element']);
|
|
156
|
+
|
|
157
|
+
data.add(['https://mail.google.com', '//a[contains(., "Почта")]']);
|
|
158
|
+
data.add(['https://www.wikipedia.org', '//input']);
|
|
159
|
+
data.add(['https://google.com', '//a[contains(., "Google")]']);
|
|
160
|
+
|
|
161
|
+
Data(data).Scenario('Should render main page for all users', ({ I, current }) => {
|
|
162
|
+
I.amOnPage(current.target);
|
|
163
|
+
I.seeElement(current.element);
|
|
164
|
+
})
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
# Contributing
|
|
169
|
+
|
|
170
|
+
You can help to develop the project. Any contributions are **greatly appreciated**.
|
|
171
|
+
|
|
172
|
+
* If you have suggestions for adding or removing projects, feel free to [open an issue](https://github.com/testit-tms/adapters-js/issues/new) to discuss it, or directly create a pull request after you edit the *README.md* file with necessary changes.
|
|
173
|
+
* Please make sure you check your spelling and grammar.
|
|
174
|
+
* Create individual PR for each suggestion.
|
|
175
|
+
* Please also read through the [Code Of Conduct](https://github.com/testit-tms/adapters-js/blob/master/CODE_OF_CONDUCT.md) before posting your first idea as well.
|
|
176
|
+
|
|
177
|
+
# License
|
|
178
|
+
|
|
179
|
+
Distributed under the Apache-2.0 License. See [LICENSE](https://github.com/testit-tms/adapters-js/blob/master/LICENSE.md) for more information.
|
|
180
|
+
|
package/build/bootstrap.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
package/build/bootstrap.js
CHANGED
|
@@ -1,34 +1,37 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const codeceptjs_1 = require("codeceptjs");
|
|
4
|
-
const config_class_1 = require("./common/classes/config.class");
|
|
5
|
-
const logger_class_1 = require("./common/classes/logger.class");
|
|
6
|
-
const default_http_client_class_1 = require("./http/default-http-client.class");
|
|
7
|
-
const strategy_factory_1 = require("./strategies/strategy.factory");
|
|
8
|
-
module.exports = async function () {
|
|
9
|
-
const config = new config_class_1.ConfigComposer().compose();
|
|
10
|
-
const logger = new logger_class_1.Logger(config.__DEV);
|
|
11
|
-
const http = new default_http_client_class_1.DefaultHttpClient(config, logger);
|
|
12
|
-
const strategy = strategy_factory_1.StrategyFactory.create(http, logger, config);
|
|
13
|
-
const helper = codeceptjs_1.container.helpers('TestITHelper');
|
|
14
|
-
await strategy.bootstrap();
|
|
15
|
-
codeceptjs_1.event.dispatcher.on(codeceptjs_1.event.test.after, (test) => {
|
|
16
|
-
strategy.collect(test.id, helper.metadata);
|
|
17
|
-
helper.metadata = {};
|
|
18
|
-
});
|
|
19
|
-
codeceptjs_1.event.dispatcher.on(codeceptjs_1.event.test.before, async (test) => {
|
|
20
|
-
await strategy.beforeTest(test);
|
|
21
|
-
});
|
|
22
|
-
codeceptjs_1.event.dispatcher.on(codeceptjs_1.event.
|
|
23
|
-
codeceptjs_1.recorder.add('transferTestAndRuns', async () => {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
});
|
|
31
|
-
codeceptjs_1.event.dispatcher.on(codeceptjs_1.event.all.after, async () => {
|
|
32
|
-
await strategy.teardown();
|
|
33
|
-
});
|
|
34
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const codeceptjs_1 = require("codeceptjs");
|
|
4
|
+
const config_class_1 = require("./common/classes/config.class");
|
|
5
|
+
const logger_class_1 = require("./common/classes/logger.class");
|
|
6
|
+
const default_http_client_class_1 = require("./http/default-http-client.class");
|
|
7
|
+
const strategy_factory_1 = require("./strategies/strategy.factory");
|
|
8
|
+
module.exports = async function () {
|
|
9
|
+
const config = new config_class_1.ConfigComposer().compose();
|
|
10
|
+
const logger = new logger_class_1.Logger(config.__DEV);
|
|
11
|
+
const http = new default_http_client_class_1.DefaultHttpClient(config, logger);
|
|
12
|
+
const strategy = strategy_factory_1.StrategyFactory.create(http, logger, config);
|
|
13
|
+
const helper = codeceptjs_1.container.helpers('TestITHelper');
|
|
14
|
+
await strategy.bootstrap();
|
|
15
|
+
codeceptjs_1.event.dispatcher.on(codeceptjs_1.event.test.after, (test) => {
|
|
16
|
+
strategy.collect(test.id, helper.metadata);
|
|
17
|
+
helper.metadata = {};
|
|
18
|
+
});
|
|
19
|
+
codeceptjs_1.event.dispatcher.on(codeceptjs_1.event.test.before, async (test) => {
|
|
20
|
+
await strategy.beforeTest(test);
|
|
21
|
+
});
|
|
22
|
+
codeceptjs_1.event.dispatcher.on(codeceptjs_1.event.test.finished, async (test) => {
|
|
23
|
+
codeceptjs_1.recorder.add('transferTestAndRuns', async () => {
|
|
24
|
+
const suite = {
|
|
25
|
+
tests: [test]
|
|
26
|
+
};
|
|
27
|
+
await strategy.transferTestsToSystem(suite);
|
|
28
|
+
await strategy.transferRunsToSystem(suite);
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
codeceptjs_1.event.dispatcher.on(codeceptjs_1.event.all.after, async () => {
|
|
32
|
+
await strategy.teardown();
|
|
33
|
+
});
|
|
34
|
+
codeceptjs_1.event.dispatcher.on(codeceptjs_1.event.all.after, async () => {
|
|
35
|
+
await strategy.teardown();
|
|
36
|
+
});
|
|
37
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const box_class_1 = require("../classes/box.class");
|
|
4
|
-
describe('Box', () => {
|
|
5
|
-
const box = new box_class_1.Box();
|
|
6
|
-
it('Should append values to box and merge them', () => {
|
|
7
|
-
box.collectWithMerge('1', { a: 1 });
|
|
8
|
-
box.collectWithMerge('1', { b: 2 });
|
|
9
|
-
expect(box.get('1'))
|
|
10
|
-
.toEqual({
|
|
11
|
-
a: 1,
|
|
12
|
-
b: 2
|
|
13
|
-
});
|
|
14
|
-
});
|
|
15
|
-
});
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const box_class_1 = require("../classes/box.class");
|
|
4
|
+
describe('Box', () => {
|
|
5
|
+
const box = new box_class_1.Box();
|
|
6
|
+
it('Should append values to box and merge them', () => {
|
|
7
|
+
box.collectWithMerge('1', { a: 1 });
|
|
8
|
+
box.collectWithMerge('1', { b: 2 });
|
|
9
|
+
expect(box.get('1'))
|
|
10
|
+
.toEqual({
|
|
11
|
+
a: 1,
|
|
12
|
+
b: 2
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Codecept } from '../../types/codecept.type';
|
|
2
|
-
import { Origin } from '../../types/origin.type';
|
|
3
|
-
export declare function getDefaultTest(): Codecept.Test<Origin.TestConfig>;
|
|
4
|
-
export declare function getDefaultConfig(): Origin.Config;
|
|
1
|
+
import { Codecept } from '../../types/codecept.type';
|
|
2
|
+
import { Origin } from '../../types/origin.type';
|
|
3
|
+
export declare function getDefaultTest(): Codecept.Test<Origin.TestConfig>;
|
|
4
|
+
export declare function getDefaultConfig(): Origin.Config;
|