@serenity-js/core 2.32.2 → 3.0.0-rc.0
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 +64 -0
- package/lib/index.d.ts +2 -1
- package/lib/index.js +4 -1
- package/lib/index.js.map +1 -1
- package/lib/io/ErrorSerialiser.js +4 -1
- package/lib/io/ErrorSerialiser.js.map +1 -1
- package/lib/io/collections/index.d.ts +0 -1
- package/lib/io/collections/index.js +0 -1
- package/lib/io/collections/index.js.map +1 -1
- package/lib/io/format.d.ts +37 -0
- package/lib/io/format.js +49 -0
- package/lib/io/format.js.map +1 -0
- package/lib/io/formatted.d.ts +5 -1
- package/lib/io/formatted.js +6 -13
- package/lib/io/formatted.js.map +1 -1
- package/lib/io/index.d.ts +1 -0
- package/lib/io/index.js +1 -0
- package/lib/io/index.js.map +1 -1
- package/lib/io/inspected.d.ts +9 -1
- package/lib/io/inspected.js +50 -14
- package/lib/io/inspected.js.map +1 -1
- package/lib/model/Timestamp.d.ts +4 -2
- package/lib/model/Timestamp.js +8 -2
- package/lib/model/Timestamp.js.map +1 -1
- package/lib/screenplay/Question.d.ts +6 -83
- package/lib/screenplay/Question.js +14 -98
- package/lib/screenplay/Question.js.map +1 -1
- package/lib/screenplay/actor/Actor.js +2 -2
- package/lib/screenplay/actor/Actor.js.map +1 -1
- package/lib/screenplay/index.d.ts +1 -1
- package/lib/screenplay/index.js +1 -1
- package/lib/screenplay/index.js.map +1 -1
- package/lib/screenplay/model/Adapter.d.ts +8 -0
- package/lib/screenplay/{questions/proxies/PropertyPathKey.js → model/Adapter.js} +1 -1
- package/lib/screenplay/model/Adapter.js.map +1 -0
- package/lib/screenplay/model/createAdapter.d.ts +3 -0
- package/lib/screenplay/model/createAdapter.js +112 -0
- package/lib/screenplay/model/createAdapter.js.map +1 -0
- package/lib/screenplay/model/index.d.ts +2 -0
- package/lib/screenplay/{tasks → model}/index.js +2 -1
- package/lib/screenplay/model/index.js.map +1 -0
- package/lib/screenplay/questions/Expectation.d.ts +11 -0
- package/lib/screenplay/questions/Expectation.js +18 -1
- package/lib/screenplay/questions/Expectation.js.map +1 -1
- package/lib/screenplay/questions/List.d.ts +10 -0
- package/lib/screenplay/questions/List.js +16 -1
- package/lib/screenplay/questions/List.js.map +1 -1
- package/lib/screenplay/questions/Note.d.ts +10 -0
- package/lib/screenplay/questions/Note.js +17 -1
- package/lib/screenplay/questions/Note.js.map +1 -1
- package/lib/screenplay/questions/index.d.ts +0 -3
- package/lib/screenplay/questions/index.js +0 -5
- package/lib/screenplay/questions/index.js.map +1 -1
- package/lib/screenplay/questions/lists/ArrayListAdapter.js +20 -5
- package/lib/screenplay/questions/lists/ArrayListAdapter.js.map +1 -1
- package/package.json +10 -10
- package/src/index.ts +2 -1
- package/src/io/ErrorSerialiser.ts +5 -1
- package/src/io/collections/index.ts +0 -1
- package/src/io/format.ts +46 -0
- package/src/io/formatted.ts +7 -15
- package/src/io/index.ts +1 -0
- package/src/io/inspected.ts +66 -14
- package/src/model/Timestamp.ts +10 -2
- package/src/screenplay/Question.ts +21 -119
- package/src/screenplay/actor/Actor.ts +2 -2
- package/src/screenplay/index.ts +1 -1
- package/src/screenplay/model/Adapter.ts +14 -0
- package/src/screenplay/model/createAdapter.ts +142 -0
- package/src/screenplay/model/index.ts +2 -0
- package/src/screenplay/questions/Expectation.ts +20 -1
- package/src/screenplay/questions/List.ts +19 -1
- package/src/screenplay/questions/Note.ts +21 -1
- package/src/screenplay/questions/index.ts +0 -3
- package/src/screenplay/questions/lists/ArrayListAdapter.ts +21 -2
- package/lib/decorators/pending.d.ts +0 -0
- package/lib/decorators/pending.js +0 -2
- package/lib/decorators/pending.js.map +0 -1
- package/lib/decorators/step.d.ts +0 -0
- package/lib/decorators/step.js +0 -2
- package/lib/decorators/step.js.map +0 -1
- package/lib/io/collections/mappable.d.ts +0 -52
- package/lib/io/collections/mappable.js +0 -28
- package/lib/io/collections/mappable.js.map +0 -1
- package/lib/screenplay/questions/Property.d.ts +0 -91
- package/lib/screenplay/questions/Property.js +0 -99
- package/lib/screenplay/questions/Property.js.map +0 -1
- package/lib/screenplay/questions/Transform.d.ts +0 -31
- package/lib/screenplay/questions/Transform.js +0 -46
- package/lib/screenplay/questions/Transform.js.map +0 -1
- package/lib/screenplay/questions/mappings/AnswerMappingFunction.d.ts +0 -11
- package/lib/screenplay/questions/mappings/AnswerMappingFunction.js +0 -3
- package/lib/screenplay/questions/mappings/AnswerMappingFunction.js.map +0 -1
- package/lib/screenplay/questions/mappings/index.d.ts +0 -2
- package/lib/screenplay/questions/mappings/index.js +0 -15
- package/lib/screenplay/questions/mappings/index.js.map +0 -1
- package/lib/screenplay/questions/mappings/string/append.d.ts +0 -14
- package/lib/screenplay/questions/mappings/string/append.js +0 -25
- package/lib/screenplay/questions/mappings/string/append.js.map +0 -1
- package/lib/screenplay/questions/mappings/string/index.d.ts +0 -11
- package/lib/screenplay/questions/mappings/string/index.js +0 -24
- package/lib/screenplay/questions/mappings/string/index.js.map +0 -1
- package/lib/screenplay/questions/mappings/string/normalize.d.ts +0 -20
- package/lib/screenplay/questions/mappings/string/normalize.js +0 -30
- package/lib/screenplay/questions/mappings/string/normalize.js.map +0 -1
- package/lib/screenplay/questions/mappings/string/replace.d.ts +0 -17
- package/lib/screenplay/questions/mappings/string/replace.js +0 -30
- package/lib/screenplay/questions/mappings/string/replace.js.map +0 -1
- package/lib/screenplay/questions/mappings/string/slice.d.ts +0 -28
- package/lib/screenplay/questions/mappings/string/slice.js +0 -47
- package/lib/screenplay/questions/mappings/string/slice.js.map +0 -1
- package/lib/screenplay/questions/mappings/string/split.d.ts +0 -19
- package/lib/screenplay/questions/mappings/string/split.js +0 -36
- package/lib/screenplay/questions/mappings/string/split.js.map +0 -1
- package/lib/screenplay/questions/mappings/string/toLocaleLowerCase.d.ts +0 -17
- package/lib/screenplay/questions/mappings/string/toLocaleLowerCase.js +0 -28
- package/lib/screenplay/questions/mappings/string/toLocaleLowerCase.js.map +0 -1
- package/lib/screenplay/questions/mappings/string/toLocaleUpperCase.d.ts +0 -17
- package/lib/screenplay/questions/mappings/string/toLocaleUpperCase.js +0 -29
- package/lib/screenplay/questions/mappings/string/toLocaleUpperCase.js.map +0 -1
- package/lib/screenplay/questions/mappings/string/toLowerCase.d.ts +0 -10
- package/lib/screenplay/questions/mappings/string/toLowerCase.js +0 -19
- package/lib/screenplay/questions/mappings/string/toLowerCase.js.map +0 -1
- package/lib/screenplay/questions/mappings/string/toNumber.d.ts +0 -10
- package/lib/screenplay/questions/mappings/string/toNumber.js +0 -18
- package/lib/screenplay/questions/mappings/string/toNumber.js.map +0 -1
- package/lib/screenplay/questions/mappings/string/toUpperCase.d.ts +0 -10
- package/lib/screenplay/questions/mappings/string/toUpperCase.js +0 -19
- package/lib/screenplay/questions/mappings/string/toUpperCase.js.map +0 -1
- package/lib/screenplay/questions/mappings/string/trim.d.ts +0 -12
- package/lib/screenplay/questions/mappings/string/trim.js +0 -21
- package/lib/screenplay/questions/mappings/string/trim.js.map +0 -1
- package/lib/screenplay/questions/proxies/PropertyPathKey.d.ts +0 -4
- package/lib/screenplay/questions/proxies/PropertyPathKey.js.map +0 -1
- package/lib/screenplay/questions/proxies/createMetaQuestionProxy.d.ts +0 -14
- package/lib/screenplay/questions/proxies/createMetaQuestionProxy.js +0 -35
- package/lib/screenplay/questions/proxies/createMetaQuestionProxy.js.map +0 -1
- package/lib/screenplay/questions/proxies/createQuestionProxy.d.ts +0 -13
- package/lib/screenplay/questions/proxies/createQuestionProxy.js +0 -34
- package/lib/screenplay/questions/proxies/createQuestionProxy.js.map +0 -1
- package/lib/screenplay/questions/proxies/describePath.d.ts +0 -5
- package/lib/screenplay/questions/proxies/describePath.js +0 -19
- package/lib/screenplay/questions/proxies/describePath.js.map +0 -1
- package/lib/screenplay/questions/proxies/index.d.ts +0 -2
- package/lib/screenplay/questions/proxies/index.js +0 -15
- package/lib/screenplay/questions/proxies/index.js.map +0 -1
- package/lib/screenplay/questions/proxies/key.d.ts +0 -8
- package/lib/screenplay/questions/proxies/key.js +0 -16
- package/lib/screenplay/questions/proxies/key.js.map +0 -1
- package/lib/screenplay/tasks/Loop.d.ts +0 -198
- package/lib/screenplay/tasks/Loop.js +0 -222
- package/lib/screenplay/tasks/Loop.js.map +0 -1
- package/lib/screenplay/tasks/index.d.ts +0 -1
- package/lib/screenplay/tasks/index.js.map +0 -1
- package/src/decorators/pending.ts +0 -1
- package/src/decorators/step.ts +0 -1
- package/src/io/collections/mappable.ts +0 -60
- package/src/screenplay/questions/Property.ts +0 -98
- package/src/screenplay/questions/Transform.ts +0 -50
- package/src/screenplay/questions/mappings/AnswerMappingFunction.ts +0 -13
- package/src/screenplay/questions/mappings/index.ts +0 -2
- package/src/screenplay/questions/mappings/string/append.ts +0 -28
- package/src/screenplay/questions/mappings/string/index.ts +0 -11
- package/src/screenplay/questions/mappings/string/normalize.ts +0 -33
- package/src/screenplay/questions/mappings/string/replace.ts +0 -34
- package/src/screenplay/questions/mappings/string/slice.ts +0 -53
- package/src/screenplay/questions/mappings/string/split.ts +0 -38
- package/src/screenplay/questions/mappings/string/toLocaleLowerCase.ts +0 -31
- package/src/screenplay/questions/mappings/string/toLocaleUpperCase.ts +0 -30
- package/src/screenplay/questions/mappings/string/toLowerCase.ts +0 -20
- package/src/screenplay/questions/mappings/string/toNumber.ts +0 -19
- package/src/screenplay/questions/mappings/string/toUpperCase.ts +0 -20
- package/src/screenplay/questions/mappings/string/trim.ts +0 -22
- package/src/screenplay/questions/proxies/PropertyPathKey.ts +0 -4
- package/src/screenplay/questions/proxies/createMetaQuestionProxy.ts +0 -51
- package/src/screenplay/questions/proxies/createQuestionProxy.ts +0 -49
- package/src/screenplay/questions/proxies/describePath.ts +0 -23
- package/src/screenplay/questions/proxies/index.ts +0 -2
- package/src/screenplay/questions/proxies/key.ts +0 -14
- package/src/screenplay/tasks/Loop.ts +0 -240
- package/src/screenplay/tasks/index.ts +0 -1
|
@@ -1,240 +0,0 @@
|
|
|
1
|
-
import { formatted, Reducible } from '../../io';
|
|
2
|
-
import { Activity } from '../Activity';
|
|
3
|
-
import { AnswersQuestions, PerformsActivities, UsesAbilities } from '../actor';
|
|
4
|
-
import { Answerable } from '../Answerable';
|
|
5
|
-
import { Question } from '../Question';
|
|
6
|
-
import { Task } from '../Task';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @desc
|
|
10
|
-
* Enables the {@link Actor} to iterate over a list of items produced by any {@link Answerable}.
|
|
11
|
-
*
|
|
12
|
-
* You can think of `Loop` as a more sophisticated Screenplay-style equivalent of
|
|
13
|
-
* [`Array.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach).
|
|
14
|
-
* `Loop` is capable of working with both synchronous data structures,
|
|
15
|
-
* such as [`Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)
|
|
16
|
-
* and `Question<Array<T>>`,
|
|
17
|
-
* as well as asynchronous ones, so `Promise<Array<T>>` and `Question<Promise<Array<T>>>`.
|
|
18
|
-
*
|
|
19
|
-
* Use {@link Loop.item} to access the current item being processed by {@link Loop}, and {@link Loop.index}
|
|
20
|
-
* to access the index of {@link Loop.item} in the list.
|
|
21
|
-
*
|
|
22
|
-
* @example <caption>Basic scenario - Iterating over a static list of items</caption>
|
|
23
|
-
* import { actorCalled, Loop, Log } from '@serenity-js/core';
|
|
24
|
-
*
|
|
25
|
-
* actorCalled('Joe').attemptsTo(
|
|
26
|
-
* Loop.over([ 'apple', 'banana', 'candy' ]).to(
|
|
27
|
-
* Log.the('current element', Loop.item<string>()),
|
|
28
|
-
* Log.the('current index', Loop.index()),
|
|
29
|
-
* ),
|
|
30
|
-
* );
|
|
31
|
-
*
|
|
32
|
-
* @example <caption>API scenario - Iterating over items in an API response</caption>
|
|
33
|
-
*
|
|
34
|
-
* import { actorCalled, Loop } from '@serenity-js/core';
|
|
35
|
-
* import { Send, GetRequest, CallAnApi, LastResponse } from '@serenity-js/rest';
|
|
36
|
-
* import { Ensure, property, isGreaterThan } from '@serenity-js/assertions';
|
|
37
|
-
*
|
|
38
|
-
* interface TodoItem {
|
|
39
|
-
* userId: number;
|
|
40
|
-
* id: number;
|
|
41
|
-
* title: string;
|
|
42
|
-
* completed: boolean;
|
|
43
|
-
* }
|
|
44
|
-
*
|
|
45
|
-
* actorCalled('Joe').whoCan(
|
|
46
|
-
* CallAnApi.at('https://jsonplaceholder.typicode.com')
|
|
47
|
-
* ).attemptsTo(
|
|
48
|
-
* Send.a(GetRequest.to('/todos')),
|
|
49
|
-
* Loop.over(LastResponse.body<TodoItem[]>()).to(
|
|
50
|
-
* Ensure.that(
|
|
51
|
-
* Loop.item<TodoItem>(),
|
|
52
|
-
* property('userId', isGreaterThan(0)),
|
|
53
|
-
* ),
|
|
54
|
-
* )
|
|
55
|
-
* );
|
|
56
|
-
*
|
|
57
|
-
* @example <caption>UI scenario - Example widget</caption>
|
|
58
|
-
* <nav>
|
|
59
|
-
* <div data-test="cookies">
|
|
60
|
-
* <label for="functional-cookies">
|
|
61
|
-
* <input type="checkbox" id="functional-cookies" />Allow functional cookies
|
|
62
|
-
* </label>
|
|
63
|
-
* <label for="performance-cookies">
|
|
64
|
-
* <input type="checkbox" id="performance-cookies" />Allow performance cookies
|
|
65
|
-
* </label>
|
|
66
|
-
* <label for="advertising-cookies">
|
|
67
|
-
* <input type="checkbox" id="advertising-cookies" />Allow advertising cookies
|
|
68
|
-
* </label>
|
|
69
|
-
* </div>
|
|
70
|
-
* </nav>
|
|
71
|
-
*
|
|
72
|
-
* @example <caption>UI scenario - Lean Page Object</caption>
|
|
73
|
-
* import { Target } from '@serenity-js/protractor';
|
|
74
|
-
* import { browser, by } from 'protractor';
|
|
75
|
-
*
|
|
76
|
-
* class Cookies {
|
|
77
|
-
* static labels = Target.all('cookie options')
|
|
78
|
-
* .located(by.css('[data-test="cookies"]'));
|
|
79
|
-
*
|
|
80
|
-
* static checkbox = Target.the('checkbox')
|
|
81
|
-
* .located(by.tagName('input')),
|
|
82
|
-
* }
|
|
83
|
-
*
|
|
84
|
-
* @example <caption>UI scenario - Performing the same set of activities with each element</caption>
|
|
85
|
-
* import { actorCalled, Loop } from '@serenity-js/core';
|
|
86
|
-
* import { Click, Text, isSelected } from '@serenity-js/protractor';
|
|
87
|
-
* import { Ensure, startsWith } from '@serenity-js/assertions';
|
|
88
|
-
* import { protractor } from 'protractor';
|
|
89
|
-
*
|
|
90
|
-
* actorCalled('Joe')
|
|
91
|
-
* .whoCan(BrowseTheWeb.using(protractor.browser))
|
|
92
|
-
* .attemptsTo(
|
|
93
|
-
* Loop.over(Cookies.labels).to(
|
|
94
|
-
* Ensure.that(
|
|
95
|
-
* Text.of(Loop.item<ElementFinder>()),
|
|
96
|
-
* startsWith('Allow'),
|
|
97
|
-
* ),
|
|
98
|
-
*
|
|
99
|
-
* Click.on(Loop.item<ElementFinder>()),
|
|
100
|
-
* Ensure.that(
|
|
101
|
-
* Cookies.checkbox.of(Loop.item<ElementFinder>()),
|
|
102
|
-
* isSelected(),
|
|
103
|
-
* ),
|
|
104
|
-
* ),
|
|
105
|
-
* );
|
|
106
|
-
*
|
|
107
|
-
* @extends {Task}
|
|
108
|
-
*
|
|
109
|
-
* @see {@link Loop.item}
|
|
110
|
-
* @see {@link Loop.index}
|
|
111
|
-
* @see {@link Question}
|
|
112
|
-
*/
|
|
113
|
-
export class Loop<Item> extends Task {
|
|
114
|
-
private static currentItem: unknown = undefined;
|
|
115
|
-
private static currentIndex = 0;
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* @desc
|
|
119
|
-
* Instantiates a {@link Task} to {@link Loop}
|
|
120
|
-
* that enables the {@link Actor} to iterate over `items`
|
|
121
|
-
* to perform some `activities`.
|
|
122
|
-
*
|
|
123
|
-
* @param {items: Answerable<ReducibleCollection>} items
|
|
124
|
-
* @returns {LoopBuilder}
|
|
125
|
-
*/
|
|
126
|
-
static over<T>(items: Answerable<Reducible>): { to: (...activities: Activity[]) => Loop<T> } {
|
|
127
|
-
return {
|
|
128
|
-
to: (...activities: Activity[]) =>
|
|
129
|
-
new Loop<T>(items, activities)
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* @desc
|
|
135
|
-
* Returns the current item being processed by {@link Loop.over}.
|
|
136
|
-
*
|
|
137
|
-
* **Please note** that in order for the TypeScript transpiler to understand the exact `ExpectedType`
|
|
138
|
-
* of the {@link Question} produced by this method you can optionally configure it with
|
|
139
|
-
* a [_type variable_](https://www.typescriptlang.org/docs/handbook/generics.html).
|
|
140
|
-
*
|
|
141
|
-
* For example, configuring the method with type variable of `string`, so `Loop.item<string>()`,
|
|
142
|
-
* tells the transpiler that a `Question<string>` will be returned.
|
|
143
|
-
*
|
|
144
|
-
* If the type variable is not configured, the transpiler assumes that returned type is a
|
|
145
|
-
* `Question<any>`. This means that while your code could still work, you'd miss out
|
|
146
|
-
* on checking provided by TypeScript.
|
|
147
|
-
*
|
|
148
|
-
* @returns {Question<ExpectedType>}
|
|
149
|
-
*/
|
|
150
|
-
static item<ExpectedType = any>(): Question<ExpectedType> {
|
|
151
|
-
return Question.about<ExpectedType>(`current loop item`, actor =>
|
|
152
|
-
Loop.currentItem as ExpectedType,
|
|
153
|
-
);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* @desc
|
|
158
|
-
* Returns the index of current {@link Loop.item} in the `Answerable<Array>` given to {@link Loop.over}.
|
|
159
|
-
*
|
|
160
|
-
* The index starts at `0`.
|
|
161
|
-
*
|
|
162
|
-
* @returns {Question<number>}
|
|
163
|
-
*/
|
|
164
|
-
static index(): Question<number> {
|
|
165
|
-
return Question.about<number>(`current loop index`, actor =>
|
|
166
|
-
Loop.currentIndex,
|
|
167
|
-
);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* @param {Answerable<Reducible>} items
|
|
172
|
-
* @param {Activity[]} activities
|
|
173
|
-
*/
|
|
174
|
-
constructor(
|
|
175
|
-
private readonly items: Answerable<Reducible>,
|
|
176
|
-
private readonly activities: Activity[]
|
|
177
|
-
) {
|
|
178
|
-
super();
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* @desc
|
|
183
|
-
* Makes the provided {@link Actor}
|
|
184
|
-
* perform this {@link Task}.
|
|
185
|
-
*
|
|
186
|
-
* @param {PerformsActivities & UsesAbilities & AnswersQuestions} actor
|
|
187
|
-
* @returns {Promise<void>}
|
|
188
|
-
*
|
|
189
|
-
* @see {@link Actor}
|
|
190
|
-
* @see {@link PerformsActivities}
|
|
191
|
-
* @see {@link UsesAbilities}
|
|
192
|
-
* @see {@link AnswersQuestions}
|
|
193
|
-
*/
|
|
194
|
-
performAs(actor: PerformsActivities & UsesAbilities & AnswersQuestions): PromiseLike<void> | PromiseLike<any> {
|
|
195
|
-
return actor.answer(this.items)
|
|
196
|
-
.then(items =>
|
|
197
|
-
items.reduce((previous: Promise<void>, current: Item, index: number) => {
|
|
198
|
-
return previous.then(() => {
|
|
199
|
-
Loop.currentIndex = index;
|
|
200
|
-
Loop.currentItem = current;
|
|
201
|
-
|
|
202
|
-
return actor.attemptsTo(
|
|
203
|
-
...this.activities
|
|
204
|
-
);
|
|
205
|
-
});
|
|
206
|
-
}, Promise.resolve(void 0))
|
|
207
|
-
);
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* @desc
|
|
212
|
-
* Generates a description to be used when reporting this {@link Activity}.
|
|
213
|
-
*
|
|
214
|
-
* @returns {string}
|
|
215
|
-
*/
|
|
216
|
-
toString(): string {
|
|
217
|
-
const description = Array.isArray(this.items)
|
|
218
|
-
? `a list of ${ this.items.length } item${ this.items.length !== 1 ? 's' : '' }`
|
|
219
|
-
: formatted `${ this.items }`;
|
|
220
|
-
|
|
221
|
-
return `#actor loops over ${ description }`;
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* @typedef {Object} LoopBuilder
|
|
227
|
-
* @property {function(...activities: Activity[]): Loop} to
|
|
228
|
-
*
|
|
229
|
-
* @example <caption>Basic scenario - Iterating over a static list of items</caption>
|
|
230
|
-
* import { actorCalled, Loop, Log } from '@serenity-js/core';
|
|
231
|
-
*
|
|
232
|
-
* actorCalled('Joe').attemptsTo(
|
|
233
|
-
* Loop.over([ 'apple', 'banana', 'candy' ]).to(
|
|
234
|
-
* Log.the('current element', Loop.item<string>()),
|
|
235
|
-
* ),
|
|
236
|
-
* );
|
|
237
|
-
*
|
|
238
|
-
* @see {@link Loop}
|
|
239
|
-
* @see {@link Loop.over}
|
|
240
|
-
*/
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Loop';
|