@serenity-js/core 3.23.2 → 3.24.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 +32 -0
- package/lib/errors/ErrorFactory.js +4 -4
- package/lib/errors/ErrorFactory.js.map +1 -1
- package/lib/errors/RaiseErrors.d.ts +2 -2
- package/lib/errors/RaiseErrors.js +2 -2
- package/lib/io/index.d.ts +0 -1
- package/lib/io/index.d.ts.map +1 -1
- package/lib/io/index.js +0 -1
- package/lib/io/index.js.map +1 -1
- package/lib/io/inspectedObject.js +1 -1
- package/lib/io/inspectedObject.js.map +1 -1
- package/lib/io/reflection/ValueInspector.d.ts +56 -0
- package/lib/io/reflection/ValueInspector.d.ts.map +1 -0
- package/lib/io/reflection/ValueInspector.js +149 -0
- package/lib/io/reflection/ValueInspector.js.map +1 -0
- package/lib/io/reflection/index.d.ts +1 -2
- package/lib/io/reflection/index.d.ts.map +1 -1
- package/lib/io/reflection/index.js +1 -2
- package/lib/io/reflection/index.js.map +1 -1
- package/lib/io/stringified.js +7 -90
- package/lib/io/stringified.js.map +1 -1
- package/lib/screenplay/Activity.d.ts +5 -12
- package/lib/screenplay/Activity.d.ts.map +1 -1
- package/lib/screenplay/Activity.js +3 -14
- package/lib/screenplay/Activity.js.map +1 -1
- package/lib/screenplay/Actor.js +1 -1
- package/lib/screenplay/Actor.js.map +1 -1
- package/lib/screenplay/Interaction.d.ts +4 -3
- package/lib/screenplay/Interaction.d.ts.map +1 -1
- package/lib/screenplay/Interaction.js +2 -2
- package/lib/screenplay/Interaction.js.map +1 -1
- package/lib/screenplay/Question.d.ts +73 -21
- package/lib/screenplay/Question.d.ts.map +1 -1
- package/lib/screenplay/Question.js +237 -30
- package/lib/screenplay/Question.js.map +1 -1
- package/lib/screenplay/Task.d.ts +16 -15
- package/lib/screenplay/Task.d.ts.map +1 -1
- package/lib/screenplay/Task.js +14 -14
- package/lib/screenplay/Task.js.map +1 -1
- package/lib/screenplay/abilities/Ability.d.ts +8 -6
- package/lib/screenplay/abilities/Ability.d.ts.map +1 -1
- package/lib/screenplay/abilities/Ability.js +8 -6
- package/lib/screenplay/abilities/Ability.js.map +1 -1
- package/lib/screenplay/abilities/AbilityType.d.ts +3 -3
- package/lib/screenplay/abilities/AnswerQuestions.d.ts +0 -1
- package/lib/screenplay/abilities/AnswerQuestions.d.ts.map +1 -1
- package/lib/screenplay/abilities/AnswerQuestions.js +2 -4
- package/lib/screenplay/abilities/AnswerQuestions.js.map +1 -1
- package/lib/screenplay/abilities/PerformActivities.d.ts +5 -3
- package/lib/screenplay/abilities/PerformActivities.d.ts.map +1 -1
- package/lib/screenplay/abilities/PerformActivities.js +12 -10
- package/lib/screenplay/abilities/PerformActivities.js.map +1 -1
- package/lib/screenplay/artifacts/CollectsArtifacts.d.ts +2 -2
- package/lib/screenplay/notes/NotepadAdapter.d.ts.map +1 -1
- package/lib/screenplay/notes/NotepadAdapter.js +44 -4
- package/lib/screenplay/notes/NotepadAdapter.js.map +1 -1
- package/lib/screenplay/questions/Describable.d.ts +27 -0
- package/lib/screenplay/questions/Describable.d.ts.map +1 -0
- package/lib/screenplay/questions/Describable.js +40 -0
- package/lib/screenplay/questions/Describable.js.map +1 -0
- package/lib/screenplay/questions/DescriptionFormattingOptions.d.ts +14 -0
- package/lib/screenplay/questions/DescriptionFormattingOptions.d.ts.map +1 -0
- package/lib/screenplay/questions/DescriptionFormattingOptions.js +3 -0
- package/lib/screenplay/questions/DescriptionFormattingOptions.js.map +1 -0
- package/lib/screenplay/questions/Expectation.d.ts +6 -10
- package/lib/screenplay/questions/Expectation.d.ts.map +1 -1
- package/lib/screenplay/questions/Expectation.js +12 -15
- package/lib/screenplay/questions/Expectation.js.map +1 -1
- package/lib/screenplay/questions/List.d.ts +1 -3
- package/lib/screenplay/questions/List.d.ts.map +1 -1
- package/lib/screenplay/questions/List.js +6 -31
- package/lib/screenplay/questions/List.js.map +1 -1
- package/lib/screenplay/questions/Unanswered.d.ts +1 -0
- package/lib/screenplay/questions/Unanswered.d.ts.map +1 -1
- package/lib/screenplay/questions/Unanswered.js +3 -0
- package/lib/screenplay/questions/Unanswered.js.map +1 -1
- package/lib/screenplay/questions/expectations/ExpectationDetails.js +1 -1
- package/lib/screenplay/questions/expectations/ExpectationDetails.js.map +1 -1
- package/lib/screenplay/questions/index.d.ts +3 -1
- package/lib/screenplay/questions/index.d.ts.map +1 -1
- package/lib/screenplay/questions/index.js +3 -1
- package/lib/screenplay/questions/index.js.map +1 -1
- package/lib/screenplay/questions/tag-functions.d.ts +228 -0
- package/lib/screenplay/questions/tag-functions.d.ts.map +1 -0
- package/lib/screenplay/questions/tag-functions.js +115 -0
- package/lib/screenplay/questions/tag-functions.js.map +1 -0
- package/lib/screenplay/time/activities/Wait.d.ts.map +1 -1
- package/lib/screenplay/time/activities/Wait.js +4 -3
- package/lib/screenplay/time/activities/Wait.js.map +1 -1
- package/package.json +6 -6
- package/src/errors/ErrorFactory.ts +5 -5
- package/src/errors/RaiseErrors.ts +2 -2
- package/src/io/index.ts +0 -1
- package/src/io/inspectedObject.ts +2 -2
- package/src/io/reflection/ValueInspector.ts +165 -0
- package/src/io/reflection/index.ts +1 -2
- package/src/io/stringified.ts +7 -103
- package/src/screenplay/Activity.ts +6 -17
- package/src/screenplay/Actor.ts +2 -2
- package/src/screenplay/Interaction.ts +5 -4
- package/src/screenplay/Question.ts +299 -49
- package/src/screenplay/Task.ts +18 -17
- package/src/screenplay/abilities/Ability.ts +8 -6
- package/src/screenplay/abilities/AbilityType.ts +3 -3
- package/src/screenplay/abilities/AnswerQuestions.ts +2 -5
- package/src/screenplay/abilities/PerformActivities.ts +35 -18
- package/src/screenplay/artifacts/CollectsArtifacts.ts +2 -2
- package/src/screenplay/notes/NotepadAdapter.ts +57 -6
- package/src/screenplay/questions/Describable.ts +48 -0
- package/src/screenplay/questions/DescriptionFormattingOptions.ts +13 -0
- package/src/screenplay/questions/Expectation.ts +19 -19
- package/src/screenplay/questions/List.ts +7 -41
- package/src/screenplay/questions/Unanswered.ts +4 -0
- package/src/screenplay/questions/expectations/ExpectationDetails.ts +2 -2
- package/src/screenplay/questions/index.ts +3 -1
- package/src/screenplay/questions/tag-functions.ts +313 -0
- package/src/screenplay/time/activities/Wait.ts +4 -3
- package/lib/io/isPlainObject.d.ts +0 -7
- package/lib/io/isPlainObject.d.ts.map +0 -1
- package/lib/io/isPlainObject.js +0 -25
- package/lib/io/isPlainObject.js.map +0 -1
- package/lib/io/reflection/isPrimitive.d.ts +0 -8
- package/lib/io/reflection/isPrimitive.d.ts.map +0 -1
- package/lib/io/reflection/isPrimitive.js +0 -24
- package/lib/io/reflection/isPrimitive.js.map +0 -1
- package/lib/io/reflection/typeOf.d.ts +0 -7
- package/lib/io/reflection/typeOf.d.ts.map +0 -1
- package/lib/io/reflection/typeOf.js +0 -35
- package/lib/io/reflection/typeOf.js.map +0 -1
- package/lib/screenplay/questions/q.d.ts +0 -66
- package/lib/screenplay/questions/q.d.ts.map +0 -1
- package/lib/screenplay/questions/q.js +0 -77
- package/lib/screenplay/questions/q.js.map +0 -1
- package/src/io/isPlainObject.ts +0 -24
- package/src/io/reflection/isPrimitive.ts +0 -20
- package/src/io/reflection/typeOf.ts +0 -31
- package/src/screenplay/questions/q.ts +0 -82
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { FileSystemLocation } from '../io';
|
|
2
2
|
import type { UsesAbilities } from './abilities';
|
|
3
3
|
import type { PerformsActivities } from './activities';
|
|
4
|
-
import type {
|
|
4
|
+
import type { Answerable } from './Answerable';
|
|
5
|
+
import type { AnswersQuestions } from './questions/AnswersQuestions';
|
|
6
|
+
import { Describable } from './questions/Describable';
|
|
5
7
|
/**
|
|
6
8
|
* **Activities** represents {@apilink Task|tasks} and {@apilink Interaction|interactions} to be performed by an {@apilink Actor|actor}.
|
|
7
9
|
*
|
|
@@ -13,10 +15,10 @@ import type { AnswersQuestions } from './questions';
|
|
|
13
15
|
*
|
|
14
16
|
* @group Screenplay Pattern
|
|
15
17
|
*/
|
|
16
|
-
export declare abstract class Activity {
|
|
18
|
+
export declare abstract class Activity extends Describable {
|
|
17
19
|
#private;
|
|
18
20
|
private static errorStackParser;
|
|
19
|
-
constructor(description: string
|
|
21
|
+
constructor(description: Answerable<string>, location?: FileSystemLocation);
|
|
20
22
|
/**
|
|
21
23
|
* Returns the location where this {@apilink Activity} was instantiated.
|
|
22
24
|
*/
|
|
@@ -33,15 +35,6 @@ export declare abstract class Activity {
|
|
|
33
35
|
* - {@apilink AnswersQuestions}
|
|
34
36
|
*/
|
|
35
37
|
abstract performAs(actor: PerformsActivities | UsesAbilities | AnswersQuestions): Promise<any>;
|
|
36
|
-
/**
|
|
37
|
-
* Generates a human-friendly description to be used when reporting this Activity.
|
|
38
|
-
*
|
|
39
|
-
* **Note**: When this activity is reported, token `#actor` in the description
|
|
40
|
-
* will be replaced with the name of the actor performing this Activity.
|
|
41
|
-
*
|
|
42
|
-
* For example, `#actor clicks on a button` becomes `Wendy clicks on a button`.
|
|
43
|
-
*/
|
|
44
|
-
toString(): string;
|
|
45
38
|
protected static callerLocation(frameOffset: number): FileSystemLocation;
|
|
46
39
|
}
|
|
47
40
|
//# sourceMappingURL=Activity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Activity.d.ts","sourceRoot":"","sources":["../../src/screenplay/Activity.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAQ,MAAM,OAAO,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Activity.d.ts","sourceRoot":"","sources":["../../src/screenplay/Activity.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAQ,MAAM,OAAO,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD;;;;;;;;;;GAUG;AACH,8BAAsB,QAAS,SAAQ,WAAW;;IAE9C,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAA0B;gBAIrD,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC,EAC/B,QAAQ,GAAE,kBAA+C;IAM7D;;OAEG;IACH,qBAAqB,IAAI,kBAAkB;IAI3C;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,SAAS,CAAC,KAAK,EAAE,kBAAkB,GAAG,aAAa,GAAG,gBAAgB,GAAG,OAAO,CAAC,GAAG,CAAC;IAE9F,SAAS,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,kBAAkB;CA0B3E"}
|
|
@@ -7,6 +7,7 @@ exports.Activity = void 0;
|
|
|
7
7
|
const path_1 = __importDefault(require("path"));
|
|
8
8
|
const errors_1 = require("../errors");
|
|
9
9
|
const io_1 = require("../io");
|
|
10
|
+
const Describable_1 = require("./questions/Describable");
|
|
10
11
|
/**
|
|
11
12
|
* **Activities** represents {@apilink Task|tasks} and {@apilink Interaction|interactions} to be performed by an {@apilink Actor|actor}.
|
|
12
13
|
*
|
|
@@ -18,12 +19,11 @@ const io_1 = require("../io");
|
|
|
18
19
|
*
|
|
19
20
|
* @group Screenplay Pattern
|
|
20
21
|
*/
|
|
21
|
-
class Activity {
|
|
22
|
+
class Activity extends Describable_1.Describable {
|
|
22
23
|
static errorStackParser = new errors_1.ErrorStackParser();
|
|
23
|
-
#description;
|
|
24
24
|
#location;
|
|
25
25
|
constructor(description, location = Activity.callerLocation(5)) {
|
|
26
|
-
|
|
26
|
+
super(description);
|
|
27
27
|
this.#location = location;
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
@@ -32,17 +32,6 @@ class Activity {
|
|
|
32
32
|
instantiationLocation() {
|
|
33
33
|
return this.#location;
|
|
34
34
|
}
|
|
35
|
-
/**
|
|
36
|
-
* Generates a human-friendly description to be used when reporting this Activity.
|
|
37
|
-
*
|
|
38
|
-
* **Note**: When this activity is reported, token `#actor` in the description
|
|
39
|
-
* will be replaced with the name of the actor performing this Activity.
|
|
40
|
-
*
|
|
41
|
-
* For example, `#actor clicks on a button` becomes `Wendy clicks on a button`.
|
|
42
|
-
*/
|
|
43
|
-
toString() {
|
|
44
|
-
return this.#description;
|
|
45
|
-
}
|
|
46
35
|
static callerLocation(frameOffset) {
|
|
47
36
|
const originalStackTraceLimit = Error.stackTraceLimit;
|
|
48
37
|
Error.stackTraceLimit = 30;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Activity.js","sourceRoot":"","sources":["../../src/screenplay/Activity.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAExB,sCAA6C;AAC7C,8BAAiD;AAKjD;;;;;;;;;;GAUG;AACH,MAAsB,
|
|
1
|
+
{"version":3,"file":"Activity.js","sourceRoot":"","sources":["../../src/screenplay/Activity.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAExB,sCAA6C;AAC7C,8BAAiD;AAKjD,yDAAsD;AAEtD;;;;;;;;;;GAUG;AACH,MAAsB,QAAS,SAAQ,yBAAW;IAEtC,MAAM,CAAC,gBAAgB,GAAG,IAAI,yBAAgB,EAAE,CAAC;IAChD,SAAS,CAAqB;IAEvC,YACI,WAA+B,EAC/B,WAA+B,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC;QAEzD,KAAK,CAAC,WAAW,CAAC,CAAC;QACnB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC9B,CAAC;IAED;;OAEG;IACH,qBAAqB;QACjB,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eAAe,CAAC,UAAU,EAC1B,eAAe,CAAC,YAAY,CAC/B,CAAC;IACN,CAAC;;AA1DL,4BA2DC"}
|
package/lib/screenplay/Actor.js
CHANGED
|
@@ -189,7 +189,7 @@ class Actor {
|
|
|
189
189
|
}
|
|
190
190
|
acquireAbility(ability) {
|
|
191
191
|
if (!(ability instanceof abilities_1.Ability)) {
|
|
192
|
-
throw new errors_1.ConfigurationError(`Custom abilities must extend Ability from '@serenity-js/core'. Received ${
|
|
192
|
+
throw new errors_1.ConfigurationError(`Custom abilities must extend Ability from '@serenity-js/core'. Received ${io_1.ValueInspector.typeOf(ability)}`);
|
|
193
193
|
}
|
|
194
194
|
const abilityType = this.mostGenericTypeOf(ability.constructor);
|
|
195
195
|
this.abilities.set(abilityType, ability);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actor.js","sourceRoot":"","sources":["../../src/screenplay/Actor.ts"],"names":[],"mappings":";;;AAAA,sCAAqE;AACrE,sCAA6D;AAC7D,
|
|
1
|
+
{"version":3,"file":"Actor.js","sourceRoot":"","sources":["../../src/screenplay/Actor.ts"],"names":[],"mappings":";;;AAAA,sCAAqE;AACrE,sCAA6D;AAC7D,8BAAuC;AAEvC,oCAAiC;AASjC,2CAIqB;AAQrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,MAAa,KAAK;IAUM;IACC;IAJJ,SAAS,GAAuC,IAAI,GAAG,EAAiC,CAAC;IAE1G,YACoB,IAAY,EACX,KAAY,EAC7B,YAAuB,EAAE;QAFT,SAAI,GAAJ,IAAI,CAAQ;QACX,UAAK,GAAL,KAAK,CAAO;QAG7B;YACI,IAAI,6BAAiB,CAAC,IAAI,EAAE,KAAK,CAAC;YAClC,IAAI,2BAAe,CAAC,IAAI,CAAC;YACzB,GAAG,SAAS;SACf,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,O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AAW,EAAE,OAAO,CAAC,CAAC;IAC7C,CAAC;IAEO,iBAAiB,CACrB,WAA0C;QAE1C,MAAM,UAAU,GAAG,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;QACtD,OAAO,CAAC,UAAU,IAAI,UAAU,KAAK,mBAAO;YACxC,CAAC,CAAC,WAAW;YACb,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAA;IAC5C,CAAC;IAED;;;;;OAKG;IACK,QAAQ,CAAC,SAAwB;QACrC,OAAO,OAAO,SAAS,KAAK,QAAQ;YAChC,CAAC,CAAC,IAAI,YAAI,CAAC,SAAS,CAAC;YACrB,CAAC,CAAC,SAAS,CAAC;IACpB,CAAC;CACJ;AApMD,sBAoMC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { UsesAbilities } from './abilities';
|
|
2
2
|
import { Activity } from './Activity';
|
|
3
|
+
import type { Answerable } from './Answerable';
|
|
3
4
|
import type { CollectsArtifacts } from './artifacts';
|
|
4
5
|
import type { AnswersQuestions } from './questions';
|
|
5
6
|
/**
|
|
@@ -33,11 +34,11 @@ import type { AnswersQuestions } from './questions';
|
|
|
33
34
|
* you can easily create your own implementations using the {@apilink Interaction.where} factory method.
|
|
34
35
|
*
|
|
35
36
|
* ```ts
|
|
36
|
-
* import { Actor, Interaction } from '@serenity-js/core'
|
|
37
|
+
* import { Actor, Interaction, the } from '@serenity-js/core'
|
|
37
38
|
* import { BrowseTheWeb, Page } from '@serenity-js/web'
|
|
38
39
|
*
|
|
39
40
|
* export const ClearLocalStorage = () =>
|
|
40
|
-
* Interaction.where(`#actor clears local storage`, async (actor: Actor) => {
|
|
41
|
+
* Interaction.where(the`#actor clears local storage`, async (actor: Actor) => {
|
|
41
42
|
* // Interaction to ClearLocalStorage directly uses Actor's ability to BrowseTheWeb
|
|
42
43
|
* const page: Page = await BrowseTheWeb.as(actor).currentPage()
|
|
43
44
|
* await page.executeScript(() => window.localStorage.clear())
|
|
@@ -73,7 +74,7 @@ export declare abstract class Interaction extends Activity {
|
|
|
73
74
|
*
|
|
74
75
|
* @param interaction
|
|
75
76
|
*/
|
|
76
|
-
static where(description: string
|
|
77
|
+
static where(description: Answerable<string>, interaction: (actor: UsesAbilities & AnswersQuestions & CollectsArtifacts) => Promise<void> | void): Interaction;
|
|
77
78
|
/**
|
|
78
79
|
* Instructs the provided {@apilink Actor} to perform this {@apilink Interaction}.
|
|
79
80
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Interaction.d.ts","sourceRoot":"","sources":["../../src/screenplay/Interaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AACH,8BAAsB,WAAY,SAAQ,QAAQ;IAE9C;;;;;;OAMG;IACH,MAAM,CAAC,KAAK,CACR,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Interaction.d.ts","sourceRoot":"","sources":["../../src/screenplay/Interaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AACH,8BAAsB,WAAY,SAAQ,QAAQ;IAE9C;;;;;;OAMG;IACH,MAAM,CAAC,KAAK,CACR,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC,EAC/B,WAAW,EAAE,CAAC,KAAK,EAAE,aAAa,GAAG,gBAAgB,GAAG,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,GACnG,WAAW;IAId;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,SAAS,CAAC,KAAK,EAAE,aAAa,GAAG,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;CAC7E"}
|
|
@@ -33,11 +33,11 @@ const Activity_1 = require("./Activity");
|
|
|
33
33
|
* you can easily create your own implementations using the {@apilink Interaction.where} factory method.
|
|
34
34
|
*
|
|
35
35
|
* ```ts
|
|
36
|
-
* import { Actor, Interaction } from '@serenity-js/core'
|
|
36
|
+
* import { Actor, Interaction, the } from '@serenity-js/core'
|
|
37
37
|
* import { BrowseTheWeb, Page } from '@serenity-js/web'
|
|
38
38
|
*
|
|
39
39
|
* export const ClearLocalStorage = () =>
|
|
40
|
-
* Interaction.where(`#actor clears local storage`, async (actor: Actor) => {
|
|
40
|
+
* Interaction.where(the`#actor clears local storage`, async (actor: Actor) => {
|
|
41
41
|
* // Interaction to ClearLocalStorage directly uses Actor's ability to BrowseTheWeb
|
|
42
42
|
* const page: Page = await BrowseTheWeb.as(actor).currentPage()
|
|
43
43
|
* await page.executeScript(() => window.localStorage.clear())
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Interaction.js","sourceRoot":"","sources":["../../src/screenplay/Interaction.ts"],"names":[],"mappings":";;;AACA,yCAAsC;
|
|
1
|
+
{"version":3,"file":"Interaction.js","sourceRoot":"","sources":["../../src/screenplay/Interaction.ts"],"names":[],"mappings":";;;AACA,yCAAsC;AAKtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AACH,MAAsB,WAAY,SAAQ,mBAAQ;IAE9C;;;;;;OAMG;IACH,MAAM,CAAC,KAAK,CACR,WAA+B,EAC/B,WAAkG;QAElG,OAAO,IAAI,+BAA+B,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IACzE,CAAC;CAcJ;AA5BD,kCA4BC;AAED;;GAEG;AACH,MAAM,+BAAgC,SAAQ,WAAW;IAGhC;IAFrB,YACI,WAA+B,EACd,WAAkG;QAEnH,KAAK,CAAC,WAAW,EAAE,WAAW,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;QAFjC,gBAAW,GAAX,WAAW,CAAuF;IAGvH,CAAC;IAED,SAAS,CAAC,KAA2D;QACjE,IAAI;YACA,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;SACnD;QAAC,OAAO,KAAK,EAAE;YACZ,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;SAChC;IACL,CAAC;CACJ"}
|
|
@@ -6,6 +6,8 @@ import type { Answerable } from './Answerable';
|
|
|
6
6
|
import { Interaction } from './Interaction';
|
|
7
7
|
import type { Optional } from './Optional';
|
|
8
8
|
import type { AnswersQuestions } from './questions/AnswersQuestions';
|
|
9
|
+
import { Describable } from './questions/Describable';
|
|
10
|
+
import type { DescriptionFormattingOptions } from './questions/DescriptionFormattingOptions';
|
|
9
11
|
import type { MetaQuestion } from './questions/MetaQuestion';
|
|
10
12
|
import type { RecursivelyAnswered } from './RecursivelyAnswered';
|
|
11
13
|
import type { WithAnswerableProperties } from './WithAnswerableProperties';
|
|
@@ -74,16 +76,18 @@ import type { WithAnswerableProperties } from './WithAnswerableProperties';
|
|
|
74
76
|
* import { Ensure, equals } from '@serenity-js/assertions'
|
|
75
77
|
*
|
|
76
78
|
* const RequestWasSuccessful = () =>
|
|
77
|
-
* Question.about<number>(`the text of the last response status`, actor => {
|
|
78
|
-
*
|
|
79
|
-
*
|
|
79
|
+
* Question.about<number>(`the text of the last response status`, async actor => {
|
|
80
|
+
* const status = await actor.answer(LastResponse.status());
|
|
81
|
+
*
|
|
82
|
+
* return status === 200;
|
|
83
|
+
* })
|
|
80
84
|
*
|
|
81
85
|
* await actorCalled('Quentin')
|
|
82
86
|
* .whoCan(CallAnApi.at('https://api.example.org/'));
|
|
83
87
|
* .attemptsTo(
|
|
84
88
|
* Send.a(GetRequest.to('/books/0-688-00230-7')),
|
|
85
89
|
* Ensure.that(RequestWasSuccessful(), isTrue()),
|
|
86
|
-
* )
|
|
90
|
+
* )
|
|
87
91
|
* ```
|
|
88
92
|
*
|
|
89
93
|
* Note that the above example is for demonstration purposes only, Serenity/JS provides an easier way to
|
|
@@ -99,12 +103,12 @@ import type { WithAnswerableProperties } from './WithAnswerableProperties';
|
|
|
99
103
|
* .attemptsTo(
|
|
100
104
|
* Send.a(GetRequest.to('/books/0-688-00230-7')),
|
|
101
105
|
* Ensure.that(LastResponse.status(), equals(200)),
|
|
102
|
-
* )
|
|
106
|
+
* )
|
|
103
107
|
* ```
|
|
104
108
|
*
|
|
105
109
|
* @group Screenplay Pattern
|
|
106
110
|
*/
|
|
107
|
-
export declare abstract class Question<T> {
|
|
111
|
+
export declare abstract class Question<T> extends Describable {
|
|
108
112
|
/**
|
|
109
113
|
* Factory method that simplifies the process of defining custom questions.
|
|
110
114
|
*
|
|
@@ -121,8 +125,8 @@ export declare abstract class Question<T> {
|
|
|
121
125
|
* @param body
|
|
122
126
|
* @param [metaQuestionBody]
|
|
123
127
|
*/
|
|
124
|
-
static about<Answer_Type, Supported_Context_Type>(description: string
|
|
125
|
-
static about<Answer_Type>(description: string
|
|
128
|
+
static about<Answer_Type, Supported_Context_Type>(description: Answerable<string>, body: (actor: AnswersQuestions & UsesAbilities) => Promise<Answer_Type> | Answer_Type, metaQuestionBody: (answerable: Answerable<Supported_Context_Type>) => Question<Promise<Answer_Type>> | Question<Answer_Type>): MetaQuestionAdapter<Supported_Context_Type, Awaited<Answer_Type>>;
|
|
129
|
+
static about<Answer_Type>(description: Answerable<string>, body: (actor: AnswersQuestions & UsesAbilities) => Promise<Answer_Type> | Answer_Type): QuestionAdapter<Awaited<Answer_Type>>;
|
|
126
130
|
/**
|
|
127
131
|
* Generates a {@apilink QuestionAdapter} that recursively resolves
|
|
128
132
|
* any {@apilink Answerable} fields of the provided object,
|
|
@@ -191,7 +195,7 @@ export declare abstract class Question<T> {
|
|
|
191
195
|
* Generates a {@apilink QuestionAdapter} that resolves
|
|
192
196
|
* any {@apilink Answerable} elements of the provided array.
|
|
193
197
|
*/
|
|
194
|
-
static fromArray<Source_Type>(source: Array<Answerable<Source_Type
|
|
198
|
+
static fromArray<Source_Type>(source: Array<Answerable<Source_Type>>, options?: DescriptionFormattingOptions): QuestionAdapter<Source_Type[]>;
|
|
195
199
|
/**
|
|
196
200
|
* Checks if the value is a {@apilink Question}.
|
|
197
201
|
*
|
|
@@ -206,24 +210,74 @@ export declare abstract class Question<T> {
|
|
|
206
210
|
* The value to check
|
|
207
211
|
*/
|
|
208
212
|
static isAMetaQuestion<CT, RQT extends Question<unknown>>(maybeMetaQuestion: unknown): maybeMetaQuestion is MetaQuestion<CT, RQT>;
|
|
209
|
-
protected static createAdapter<AT>(statement: Question<AT>): QuestionAdapter<Awaited<AT>>;
|
|
210
|
-
private static fieldDescription;
|
|
211
|
-
private static methodDescription;
|
|
212
213
|
/**
|
|
213
|
-
*
|
|
214
|
+
* Creates a {@apilink MetaQuestion} that can be composed with any {@apilink Answerable}
|
|
215
|
+
* to produce a single-line description of its value.
|
|
216
|
+
*
|
|
217
|
+
* ```ts
|
|
218
|
+
* import { actorCalled, Question } from '@serenity-js/core'
|
|
219
|
+
* import { Ensure, equals } from '@serenity-js/assertions'
|
|
220
|
+
*
|
|
221
|
+
* const accountDetails = () =>
|
|
222
|
+
* Question.about('account details', actor => ({ name: 'Alice', age: 28 }))
|
|
223
|
+
*
|
|
224
|
+
* await actorCalled('Alice').attemptsTo(
|
|
225
|
+
* Ensure.that(
|
|
226
|
+
* Question.formattedValue().of(accountDetails()),
|
|
227
|
+
* equals('{ name: "Alice", age: 28 }'),
|
|
228
|
+
* ),
|
|
229
|
+
* )
|
|
230
|
+
* ```
|
|
231
|
+
*
|
|
232
|
+
* @param options
|
|
214
233
|
*/
|
|
215
|
-
|
|
234
|
+
static formattedValue(options?: DescriptionFormattingOptions): MetaQuestion<any, Question<Promise<string>>>;
|
|
216
235
|
/**
|
|
217
|
-
*
|
|
236
|
+
* Creates a {@apilink MetaQuestion} that can be composed with any {@apilink Answerable}
|
|
237
|
+
* to return its value when the answerable is a {@apilink Question},
|
|
238
|
+
* or the answerable itself otherwise.
|
|
239
|
+
*
|
|
240
|
+
* The description of the resulting question is produced by calling {@apilink Question.description} on the
|
|
241
|
+
* provided answerable.
|
|
218
242
|
*
|
|
219
|
-
*
|
|
243
|
+
* ```ts
|
|
244
|
+
* import { actorCalled, Question } from '@serenity-js/core'
|
|
245
|
+
* import { Ensure, equals } from '@serenity-js/assertions'
|
|
246
|
+
*
|
|
247
|
+
* const accountDetails = () =>
|
|
248
|
+
* Question.about('account details', actor => ({ name: 'Alice', age: 28 }))
|
|
249
|
+
*
|
|
250
|
+
* await actorCalled('Alice').attemptsTo(
|
|
251
|
+
* Ensure.that(
|
|
252
|
+
* Question.description().of(accountDetails()),
|
|
253
|
+
* equals('account details'),
|
|
254
|
+
* ),
|
|
255
|
+
* Ensure.that(
|
|
256
|
+
* Question.value().of(accountDetails()),
|
|
257
|
+
* equals({ name: 'Alice', age: 28 }),
|
|
258
|
+
* ),
|
|
259
|
+
* )
|
|
260
|
+
* ```
|
|
220
261
|
*/
|
|
221
|
-
|
|
262
|
+
static value<Answer_Type>(): MetaQuestion<Answer_Type, Question<Promise<Answer_Type>>>;
|
|
263
|
+
protected static createAdapter<AT>(statement: Question<AT>): QuestionAdapter<Awaited<AT>>;
|
|
264
|
+
private static staticFieldDescription;
|
|
265
|
+
private static methodDescription;
|
|
222
266
|
/**
|
|
223
267
|
* Instructs the provided {@apilink Actor} to use their {@apilink Ability|abilities}
|
|
224
268
|
* to answer this question.
|
|
225
269
|
*/
|
|
226
270
|
abstract answeredBy(actor: AnswersQuestions & UsesAbilities): T;
|
|
271
|
+
/**
|
|
272
|
+
* Changes the description of this object, as returned by {@apilink Describable.describedBy}
|
|
273
|
+
* and {@apilink Describable.toString}.
|
|
274
|
+
*
|
|
275
|
+
* @param description
|
|
276
|
+
* Replaces the current description according to the following rules:
|
|
277
|
+
* - If `description` is an {@apilink Answerable}, it replaces the current description
|
|
278
|
+
* - If `description` is a {@apilink MetaQuestion}, the current description is passed as `context` to `description.of(context)`, and the result replaces the current description
|
|
279
|
+
*/
|
|
280
|
+
describedAs(description: Answerable<string> | MetaQuestion<Awaited<T>, Question<Promise<string>>>): this;
|
|
227
281
|
/**
|
|
228
282
|
* Maps this question to one of a different type.
|
|
229
283
|
*
|
|
@@ -275,10 +329,9 @@ export type MetaQuestionAdapter<Context_Type, Answer_Type> = QuestionAdapter<Ans
|
|
|
275
329
|
* @package
|
|
276
330
|
*/
|
|
277
331
|
declare class QuestionStatement<Answer_Type> extends Interaction implements Question<Promise<Answer_Type>>, Optional {
|
|
278
|
-
private subject;
|
|
279
332
|
private readonly body;
|
|
280
333
|
private answer;
|
|
281
|
-
constructor(subject: string
|
|
334
|
+
constructor(subject: Answerable<string>, body: (actor: AnswersQuestions & UsesAbilities, ...Parameters: any[]) => Promise<Answer_Type> | Answer_Type, location?: FileSystemLocation);
|
|
282
335
|
/**
|
|
283
336
|
* Returns a Question that resolves to `true` if resolving the {@apilink QuestionStatement}
|
|
284
337
|
* returns a value other than `null` or `undefined`, and doesn't throw errors.
|
|
@@ -287,8 +340,7 @@ declare class QuestionStatement<Answer_Type> extends Interaction implements Ques
|
|
|
287
340
|
answeredBy(actor: AnswersQuestions & UsesAbilities): Promise<Answer_Type>;
|
|
288
341
|
performAs(actor: UsesAbilities & AnswersQuestions): Promise<void>;
|
|
289
342
|
[util.inspect.custom](depth: number, options: util.InspectOptionsStylized, inspect: typeof util.inspect): string;
|
|
290
|
-
describedAs(
|
|
291
|
-
toString(): string;
|
|
343
|
+
describedAs(description: Answerable<string> | MetaQuestion<Answer_Type, Question<Promise<string>>>): this;
|
|
292
344
|
as<O>(mapping: (answer: Awaited<Answer_Type>) => (Promise<O> | O)): QuestionAdapter<O>;
|
|
293
345
|
}
|
|
294
346
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Question.d.ts","sourceRoot":"","sources":["../../src/screenplay/Question.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAG7B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAEhD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"Question.d.ts","sourceRoot":"","sources":["../../src/screenplay/Question.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAG7B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAEhD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MA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