@serenity-js/core 3.7.0 → 3.7.1
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/CHANGELOG.md +8 -0
- package/lib/instance.d.ts +47 -24
- package/lib/instance.d.ts.map +1 -1
- package/lib/instance.js +47 -24
- package/lib/instance.js.map +1 -1
- package/package.json +2 -2
- package/src/instance.ts +47 -24
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.7.1](https://github.com/serenity-js/serenity-js/compare/v3.7.0...v3.7.1) (2023-07-22)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @serenity-js/core
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [3.7.0](https://github.com/serenity-js/serenity-js/compare/v3.6.1...v3.7.0) (2023-07-20)
|
|
7
15
|
|
|
8
16
|
|
package/lib/instance.d.ts
CHANGED
|
@@ -141,46 +141,69 @@ export declare function engage(actors: Cast): void;
|
|
|
141
141
|
*
|
|
142
142
|
* This method is an alias for {@apilink Serenity.theActorCalled}.
|
|
143
143
|
*
|
|
144
|
-
* ## Usage with
|
|
144
|
+
* ## Usage with Cucumber
|
|
145
145
|
*
|
|
146
146
|
* ```typescript
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
* describe('Feature', () => {
|
|
147
|
+
* import { actorCalled } from '@serenity-js/core';
|
|
148
|
+
* import { Given } from '@cucumber/cucumber';
|
|
151
149
|
*
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
150
|
+
* Given(/(.*?) is a registered user/, async (name: string) => {
|
|
151
|
+
* await actorCalled(name).attemptsTo(
|
|
152
|
+
* // ... activities
|
|
153
|
+
* )
|
|
154
|
+
* })
|
|
157
155
|
* ```
|
|
158
156
|
*
|
|
159
157
|
* ## Usage with Jasmine
|
|
160
158
|
*
|
|
161
159
|
* ```typescript
|
|
162
|
-
*
|
|
163
|
-
*
|
|
160
|
+
* import 'jasmine';
|
|
161
|
+
* import { actorCalled } from '@serenity-js/core';
|
|
164
162
|
*
|
|
165
|
-
*
|
|
163
|
+
* describe('Feature', () => {
|
|
166
164
|
*
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
*
|
|
171
|
-
*
|
|
165
|
+
* it('should have some behaviour', async () {
|
|
166
|
+
* await actorCalled('James').attemptsTo(
|
|
167
|
+
* // ... activities
|
|
168
|
+
* )
|
|
169
|
+
* })
|
|
170
|
+
* })
|
|
172
171
|
* ```
|
|
173
172
|
*
|
|
174
|
-
* ## Usage with
|
|
173
|
+
* ## Usage with Mocha
|
|
175
174
|
*
|
|
176
175
|
* ```typescript
|
|
176
|
+
* import { describe, it } from 'mocha';
|
|
177
177
|
* import { actorCalled } from '@serenity-js/core';
|
|
178
|
-
* import { Given } from '@cucumber/cucumber';
|
|
179
178
|
*
|
|
180
|
-
*
|
|
181
|
-
*
|
|
182
|
-
*
|
|
183
|
-
*
|
|
179
|
+
* describe('Feature', () => {
|
|
180
|
+
*
|
|
181
|
+
* it('should have some behaviour', async () => {
|
|
182
|
+
* await actorCalled('James').attemptsTo(
|
|
183
|
+
* // ... activities
|
|
184
|
+
* )
|
|
185
|
+
* })
|
|
186
|
+
* })
|
|
187
|
+
* ```
|
|
188
|
+
*
|
|
189
|
+
* ## Usage with Playwright Test
|
|
190
|
+
*
|
|
191
|
+
* When using [Serenity/JS with Playwright Test](/api/playwright-test/), you should use either
|
|
192
|
+
* the default [`actor`](/api/playwright-test/interface/SerenityFixtures/#actorCalled) fixture
|
|
193
|
+
* or the injected [`actorCalled`](/api/playwright-test/interface/SerenityFixtures/#actorCalled) function
|
|
194
|
+
* instead of importing it from `@serenity-js/core`.
|
|
195
|
+
*
|
|
196
|
+
* ```typescript
|
|
197
|
+
* import { describe, it } from '@serenity-js/playwright-test';
|
|
198
|
+
*
|
|
199
|
+
* describe('Feature', () => {
|
|
200
|
+
*
|
|
201
|
+
* it('should have some behaviour', async ({ actorCalled }) => {
|
|
202
|
+
* await actorCalled('James').attemptsTo(
|
|
203
|
+
* // ... activities
|
|
204
|
+
* )
|
|
205
|
+
* })
|
|
206
|
+
* })
|
|
184
207
|
* ```
|
|
185
208
|
*
|
|
186
209
|
* ## Learn more
|
package/lib/instance.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instance.d.ts","sourceRoot":"","sources":["../src/instance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,KAAK,EAAE,KAAK,EAAC,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAIpC;;;;GAIG;AACH,eAAO,MAAM,QAAQ,UAAsB,CAAC;AAE5C;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CAEtD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4GG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE,IAAI,GAAG,IAAI,CAEzC;AAED
|
|
1
|
+
{"version":3,"file":"instance.d.ts","sourceRoot":"","sources":["../src/instance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,KAAK,EAAE,KAAK,EAAC,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAIpC;;;;GAIG;AACH,eAAO,MAAM,QAAQ,UAAsB,CAAC;AAE5C;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CAEtD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4GG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE,IAAI,GAAG,IAAI,CAEzC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkFG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,CAE/C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,mBAAmB,IAAI,KAAK,CAE3C"}
|
package/lib/instance.js
CHANGED
|
@@ -149,46 +149,69 @@ exports.engage = engage;
|
|
|
149
149
|
*
|
|
150
150
|
* This method is an alias for {@apilink Serenity.theActorCalled}.
|
|
151
151
|
*
|
|
152
|
-
* ## Usage with
|
|
152
|
+
* ## Usage with Cucumber
|
|
153
153
|
*
|
|
154
154
|
* ```typescript
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
*
|
|
158
|
-
* describe('Feature', () => {
|
|
155
|
+
* import { actorCalled } from '@serenity-js/core';
|
|
156
|
+
* import { Given } from '@cucumber/cucumber';
|
|
159
157
|
*
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
*
|
|
164
|
-
*
|
|
158
|
+
* Given(/(.*?) is a registered user/, async (name: string) => {
|
|
159
|
+
* await actorCalled(name).attemptsTo(
|
|
160
|
+
* // ... activities
|
|
161
|
+
* )
|
|
162
|
+
* })
|
|
165
163
|
* ```
|
|
166
164
|
*
|
|
167
165
|
* ## Usage with Jasmine
|
|
168
166
|
*
|
|
169
167
|
* ```typescript
|
|
170
|
-
*
|
|
171
|
-
*
|
|
168
|
+
* import 'jasmine';
|
|
169
|
+
* import { actorCalled } from '@serenity-js/core';
|
|
172
170
|
*
|
|
173
|
-
*
|
|
171
|
+
* describe('Feature', () => {
|
|
174
172
|
*
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
*
|
|
173
|
+
* it('should have some behaviour', async () {
|
|
174
|
+
* await actorCalled('James').attemptsTo(
|
|
175
|
+
* // ... activities
|
|
176
|
+
* )
|
|
177
|
+
* })
|
|
178
|
+
* })
|
|
180
179
|
* ```
|
|
181
180
|
*
|
|
182
|
-
* ## Usage with
|
|
181
|
+
* ## Usage with Mocha
|
|
183
182
|
*
|
|
184
183
|
* ```typescript
|
|
184
|
+
* import { describe, it } from 'mocha';
|
|
185
185
|
* import { actorCalled } from '@serenity-js/core';
|
|
186
|
-
* import { Given } from '@cucumber/cucumber';
|
|
187
186
|
*
|
|
188
|
-
*
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
*
|
|
187
|
+
* describe('Feature', () => {
|
|
188
|
+
*
|
|
189
|
+
* it('should have some behaviour', async () => {
|
|
190
|
+
* await actorCalled('James').attemptsTo(
|
|
191
|
+
* // ... activities
|
|
192
|
+
* )
|
|
193
|
+
* })
|
|
194
|
+
* })
|
|
195
|
+
* ```
|
|
196
|
+
*
|
|
197
|
+
* ## Usage with Playwright Test
|
|
198
|
+
*
|
|
199
|
+
* When using [Serenity/JS with Playwright Test](/api/playwright-test/), you should use either
|
|
200
|
+
* the default [`actor`](/api/playwright-test/interface/SerenityFixtures/#actorCalled) fixture
|
|
201
|
+
* or the injected [`actorCalled`](/api/playwright-test/interface/SerenityFixtures/#actorCalled) function
|
|
202
|
+
* instead of importing it from `@serenity-js/core`.
|
|
203
|
+
*
|
|
204
|
+
* ```typescript
|
|
205
|
+
* import { describe, it } from '@serenity-js/playwright-test';
|
|
206
|
+
*
|
|
207
|
+
* describe('Feature', () => {
|
|
208
|
+
*
|
|
209
|
+
* it('should have some behaviour', async ({ actorCalled }) => {
|
|
210
|
+
* await actorCalled('James').attemptsTo(
|
|
211
|
+
* // ... activities
|
|
212
|
+
* )
|
|
213
|
+
* })
|
|
214
|
+
* })
|
|
192
215
|
* ```
|
|
193
216
|
*
|
|
194
217
|
* ## Learn more
|
package/lib/instance.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instance.js","sourceRoot":"","sources":["../src/instance.ts"],"names":[],"mappings":";;;AAEA,6CAAqC;AACrC,yCAAsC;AAGtC,MAAM,KAAK,GAAG,IAAI,kBAAK,EAAE,CAAC;AAE1B;;;;GAIG;AACU,QAAA,QAAQ,GAAG,IAAI,mBAAQ,CAAC,KAAK,CAAC,CAAC;AAE5C;;;;;;;;;;;;;;;GAeG;AACH,SAAgB,SAAS,CAAC,MAAsB;IAC5C,gBAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;AAC/B,CAAC;AAFD,8BAEC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4GG;AACH,SAAgB,MAAM,CAAC,MAAY;IAC/B,gBAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAC5B,CAAC;AAFD,wBAEC;AAED
|
|
1
|
+
{"version":3,"file":"instance.js","sourceRoot":"","sources":["../src/instance.ts"],"names":[],"mappings":";;;AAEA,6CAAqC;AACrC,yCAAsC;AAGtC,MAAM,KAAK,GAAG,IAAI,kBAAK,EAAE,CAAC;AAE1B;;;;GAIG;AACU,QAAA,QAAQ,GAAG,IAAI,mBAAQ,CAAC,KAAK,CAAC,CAAC;AAE5C;;;;;;;;;;;;;;;GAeG;AACH,SAAgB,SAAS,CAAC,MAAsB;IAC5C,gBAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;AAC/B,CAAC;AAFD,8BAEC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4GG;AACH,SAAgB,MAAM,CAAC,MAAY;IAC/B,gBAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAC5B,CAAC;AAFD,wBAEC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkFG;AACH,SAAgB,WAAW,CAAC,IAAY;IACpC,OAAO,gBAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;AACzC,CAAC;AAFD,kCAEC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,SAAgB,mBAAmB;IAC/B,OAAO,gBAAQ,CAAC,sBAAsB,EAAE,CAAC;AAC7C,CAAC;AAFD,kDAEC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serenity-js/core",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.1",
|
|
4
4
|
"description": "Serenity/JS Screenplay, reporting engine and core interfaces.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Jan Molak",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"engines": {
|
|
72
72
|
"node": "^16.13 || ^18.12 || ^20"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "6a67f2edc2872be27b849402a1109f0944e019bb"
|
|
75
75
|
}
|
package/src/instance.ts
CHANGED
|
@@ -152,46 +152,69 @@ export function engage(actors: Cast): void {
|
|
|
152
152
|
*
|
|
153
153
|
* This method is an alias for {@apilink Serenity.theActorCalled}.
|
|
154
154
|
*
|
|
155
|
-
* ## Usage with
|
|
155
|
+
* ## Usage with Cucumber
|
|
156
156
|
*
|
|
157
157
|
* ```typescript
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
* describe('Feature', () => {
|
|
158
|
+
* import { actorCalled } from '@serenity-js/core';
|
|
159
|
+
* import { Given } from '@cucumber/cucumber';
|
|
162
160
|
*
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
161
|
+
* Given(/(.*?) is a registered user/, async (name: string) => {
|
|
162
|
+
* await actorCalled(name).attemptsTo(
|
|
163
|
+
* // ... activities
|
|
164
|
+
* )
|
|
165
|
+
* })
|
|
168
166
|
* ```
|
|
169
167
|
*
|
|
170
168
|
* ## Usage with Jasmine
|
|
171
169
|
*
|
|
172
170
|
* ```typescript
|
|
173
|
-
*
|
|
174
|
-
*
|
|
171
|
+
* import 'jasmine';
|
|
172
|
+
* import { actorCalled } from '@serenity-js/core';
|
|
175
173
|
*
|
|
176
|
-
*
|
|
174
|
+
* describe('Feature', () => {
|
|
177
175
|
*
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
*
|
|
181
|
-
*
|
|
182
|
-
*
|
|
176
|
+
* it('should have some behaviour', async () {
|
|
177
|
+
* await actorCalled('James').attemptsTo(
|
|
178
|
+
* // ... activities
|
|
179
|
+
* )
|
|
180
|
+
* })
|
|
181
|
+
* })
|
|
183
182
|
* ```
|
|
184
183
|
*
|
|
185
|
-
* ## Usage with
|
|
184
|
+
* ## Usage with Mocha
|
|
186
185
|
*
|
|
187
186
|
* ```typescript
|
|
187
|
+
* import { describe, it } from 'mocha';
|
|
188
188
|
* import { actorCalled } from '@serenity-js/core';
|
|
189
|
-
* import { Given } from '@cucumber/cucumber';
|
|
190
189
|
*
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
*
|
|
190
|
+
* describe('Feature', () => {
|
|
191
|
+
*
|
|
192
|
+
* it('should have some behaviour', async () => {
|
|
193
|
+
* await actorCalled('James').attemptsTo(
|
|
194
|
+
* // ... activities
|
|
195
|
+
* )
|
|
196
|
+
* })
|
|
197
|
+
* })
|
|
198
|
+
* ```
|
|
199
|
+
*
|
|
200
|
+
* ## Usage with Playwright Test
|
|
201
|
+
*
|
|
202
|
+
* When using [Serenity/JS with Playwright Test](/api/playwright-test/), you should use either
|
|
203
|
+
* the default [`actor`](/api/playwright-test/interface/SerenityFixtures/#actorCalled) fixture
|
|
204
|
+
* or the injected [`actorCalled`](/api/playwright-test/interface/SerenityFixtures/#actorCalled) function
|
|
205
|
+
* instead of importing it from `@serenity-js/core`.
|
|
206
|
+
*
|
|
207
|
+
* ```typescript
|
|
208
|
+
* import { describe, it } from '@serenity-js/playwright-test';
|
|
209
|
+
*
|
|
210
|
+
* describe('Feature', () => {
|
|
211
|
+
*
|
|
212
|
+
* it('should have some behaviour', async ({ actorCalled }) => {
|
|
213
|
+
* await actorCalled('James').attemptsTo(
|
|
214
|
+
* // ... activities
|
|
215
|
+
* )
|
|
216
|
+
* })
|
|
217
|
+
* })
|
|
195
218
|
* ```
|
|
196
219
|
*
|
|
197
220
|
* ## Learn more
|