@autometa/runner 0.6.3 → 1.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/README.md +2 -121
- package/dist/bindings/create-bindings-ts.d.ts +46 -0
- package/dist/bindings/index.d.ts +1 -0
- package/dist/builder/create-runner-builder.d.ts +149 -0
- package/dist/core/parameter-registry.d.ts +16 -0
- package/dist/core/runner-context.d.ts +27 -0
- package/dist/cucumber-runner.d.ts +9 -0
- package/dist/current.d.ts +5 -0
- package/dist/decorators/create-runner-decorators.d.ts +55 -0
- package/dist/dsl/create-decorator-runner.d.ts +19 -0
- package/dist/dsl/create-global-runner.d.ts +9 -0
- package/dist/dsl/create-runner.d.ts +82 -0
- package/dist/dsl/decorator-shared.d.ts +12 -0
- package/dist/global.d.ts +14 -0
- package/dist/index.cjs +2212 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +22 -674
- package/dist/index.js +2064 -456
- package/dist/index.js.map +1 -1
- package/dist/runtime/coordinate-runner-feature.d.ts +20 -0
- package/dist/tokens.d.ts +1 -0
- package/package.json +30 -35
- package/.eslintignore +0 -3
- package/.eslintrc.cjs +0 -4
- package/.turbo/turbo-lint$colon$fix.log +0 -4
- package/.turbo/turbo-prettify.log +0 -0
- package/.turbo/turbo-test.log +0 -12
- package/CHANGELOG.md +0 -1266
- package/dist/esm/index.js +0 -515
- package/dist/esm/index.js.map +0 -1
- package/dist/index.d.cts +0 -674
- package/tsup.config.ts +0 -14
package/dist/index.d.cts
DELETED
|
@@ -1,674 +0,0 @@
|
|
|
1
|
-
import * as _autometa_types from '@autometa/types';
|
|
2
|
-
import * as _autometa_scopes from '@autometa/scopes';
|
|
3
|
-
import { FeatureScope, TestTimeout, FeatureAction, ScenarioAction, ScenarioScope, SizedTimeout, RuleAction, RuleScope } from '@autometa/scopes';
|
|
4
|
-
export { Pass, Types } from '@autometa/scopes';
|
|
5
|
-
import * as _autometa_gherkin from '@autometa/gherkin';
|
|
6
|
-
export { DataTable, HTable, MTable, TableDocument, VTable } from '@autometa/gherkin';
|
|
7
|
-
import * as _autometa_config from '@autometa/config';
|
|
8
|
-
import * as _autometa_cucumber_expressions from '@autometa/cucumber-expressions';
|
|
9
|
-
export * from '@autometa/phrases';
|
|
10
|
-
import * as _autometa_app from '@autometa/app';
|
|
11
|
-
export { App, AutometaApp, AutometaWorld, World, getApp } from '@autometa/app';
|
|
12
|
-
export { Dates, Time } from '@autometa/datetime';
|
|
13
|
-
export { AutomationError, raise } from '@autometa/errors';
|
|
14
|
-
export { Bind } from '@autometa/bind-decorator';
|
|
15
|
-
import { TestEventEmitter } from '@autometa/events';
|
|
16
|
-
export * from '@autometa/events';
|
|
17
|
-
export * from '@autometa/http';
|
|
18
|
-
export * from '@autometa/asserters';
|
|
19
|
-
export { GetAccessedCount, GetAssignedValues, TrackAccess } from '@autometa/fixture-proxies';
|
|
20
|
-
export { FileObject } from '@autometa/file-proxies';
|
|
21
|
-
export { Constructor, Container, DisposeMethod, DisposeTagFilter, Fixture, INJECTION_SCOPE, Inject, InjectionScope } from '@autometa/injection';
|
|
22
|
-
|
|
23
|
-
declare const defineConfig: (...args: {
|
|
24
|
-
runner: "jest" | "vitest";
|
|
25
|
-
roots: {
|
|
26
|
-
features: string[];
|
|
27
|
-
steps: string[];
|
|
28
|
-
app: string[];
|
|
29
|
-
parameterTypes?: string[] | undefined;
|
|
30
|
-
};
|
|
31
|
-
environment?: string | undefined;
|
|
32
|
-
test?: {
|
|
33
|
-
timeout?: number | [number, "ms" | "s" | "m" | "h"] | undefined;
|
|
34
|
-
tagFilter?: string | undefined;
|
|
35
|
-
groupLogging?: boolean | undefined;
|
|
36
|
-
} | undefined;
|
|
37
|
-
shim?: {
|
|
38
|
-
errorCause?: boolean | undefined;
|
|
39
|
-
} | undefined;
|
|
40
|
-
events?: string[] | undefined;
|
|
41
|
-
}[]) => {
|
|
42
|
-
env: {
|
|
43
|
-
byLiteral: (literal: string) => _autometa_config.EnvironmentReader;
|
|
44
|
-
byEnvironmentVariable: (name: string) => _autometa_config.EnvironmentReader;
|
|
45
|
-
byFactory: (action: () => string) => _autometa_config.EnvironmentReader;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Defines a parameter type for use in step definitions.
|
|
51
|
-
*
|
|
52
|
-
* ```ts
|
|
53
|
-
* import { Color } from '../support/color';
|
|
54
|
-
*
|
|
55
|
-
* defineParameterType({
|
|
56
|
-
* name: "color",
|
|
57
|
-
* regex: /red|blue|yellow/,
|
|
58
|
-
* transform: (value: string) => Color(value)
|
|
59
|
-
* })
|
|
60
|
-
*
|
|
61
|
-
* // using regex arrays
|
|
62
|
-
* defineParameterType({
|
|
63
|
-
* name: "color",
|
|
64
|
-
* regex: [/red/, /blue/, /yellow/],
|
|
65
|
-
* transform: (value: string) => Color(value)
|
|
66
|
-
* })
|
|
67
|
-
* ```
|
|
68
|
-
*/
|
|
69
|
-
declare const defineParameterType: (...args: _autometa_cucumber_expressions.ParamTypeDefinition[]) => void;
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Marks a class as being the `App` of the test framework. The `App` is the
|
|
73
|
-
* entry point for the test framework. The App will be made available as the final
|
|
74
|
-
* argument in the Step Definition Callbacks.
|
|
75
|
-
*
|
|
76
|
-
* ```ts
|
|
77
|
-
*
|
|
78
|
-
* @AppType(World)
|
|
79
|
-
* @Constructor(MyClient)
|
|
80
|
-
* class App {
|
|
81
|
-
* constructor(readonly myCLient: MyClient) {}
|
|
82
|
-
* }
|
|
83
|
-
* ```
|
|
84
|
-
* Or with tokens
|
|
85
|
-
*
|
|
86
|
-
* ```ts
|
|
87
|
-
* import from "@autometa/runner";
|
|
88
|
-
* import { World } from "./default.world";
|
|
89
|
-
* @AppType(World)
|
|
90
|
-
* @Constructor(HTTP, Token("MyClient"))
|
|
91
|
-
* class App {
|
|
92
|
-
* constructor(readonly http: HTTP, readonly myClient: MyClient) {}
|
|
93
|
-
* }
|
|
94
|
-
* ```
|
|
95
|
-
*/
|
|
96
|
-
declare const AppType: (world: _autometa_types.Class<_autometa_app.AutometaWorld>, environment?: string | undefined) => (target: _autometa_types.Class<unknown>) => void;
|
|
97
|
-
|
|
98
|
-
declare function makeTestEmitter(opts: {
|
|
99
|
-
groupLogger: boolean;
|
|
100
|
-
}): TestEventEmitter;
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* Executes a gherkin `.feature` file. Assembles Tests
|
|
104
|
-
* using the Cucumber file and globally defined Step Definitions.
|
|
105
|
-
*
|
|
106
|
-
* ``ts
|
|
107
|
-
* // using relative path
|
|
108
|
-
* import { Feature } from '@autometa/runner'
|
|
109
|
-
*
|
|
110
|
-
* Feature('../features/my-feature.feature')
|
|
111
|
-
* ```
|
|
112
|
-
*
|
|
113
|
-
* Steps will be automatically assembled from Globally defined Step Definitions,
|
|
114
|
-
* if a step definition root and app root are defined.
|
|
115
|
-
*
|
|
116
|
-
* ```ts
|
|
117
|
-
* import { defineConfig } from '@autometa/runner'
|
|
118
|
-
*
|
|
119
|
-
* defineConfig({
|
|
120
|
-
* ...
|
|
121
|
-
* roots: {
|
|
122
|
-
* steps: ['./test/steps'],
|
|
123
|
-
* app: ['./app'],
|
|
124
|
-
* },
|
|
125
|
-
* }
|
|
126
|
-
* ```
|
|
127
|
-
*
|
|
128
|
-
* Global steps are defined in standard Cucumber stle.
|
|
129
|
-
* ```ts
|
|
130
|
-
* // ./test/steps/my-steps.ts
|
|
131
|
-
* import { Given, When, Then } from '@autometa/runner'
|
|
132
|
-
*
|
|
133
|
-
* Given('I have a step', () => {})
|
|
134
|
-
* When('I do something', () => {})
|
|
135
|
-
* Then('I expect something', () => {})
|
|
136
|
-
* ```
|
|
137
|
-
* @param filepath The absolute, relative, or 'feature root' path to the `.feature` file.
|
|
138
|
-
*/
|
|
139
|
-
declare function Feature(filepath: string): FeatureScope;
|
|
140
|
-
/**
|
|
141
|
-
* Executes a gherkin `.feature` file. Assembles Tests
|
|
142
|
-
* using the Cucumber file and globally defined Step Definitions.
|
|
143
|
-
* Accepts a timeout in milliseconds which will be applied to
|
|
144
|
-
* all tests within the feature.
|
|
145
|
-
*
|
|
146
|
-
* ```ts
|
|
147
|
-
* // using relative path
|
|
148
|
-
* import { Feature } from '@autometa/runner'
|
|
149
|
-
* // 10 second timeout
|
|
150
|
-
* Feature('../features/my-feature.feature', 10_000)
|
|
151
|
-
* ```
|
|
152
|
-
*
|
|
153
|
-
* Steps will be automatically assembled from Globally defined Step Definitions,
|
|
154
|
-
* if a step definition root and app root are defined.
|
|
155
|
-
*
|
|
156
|
-
* ```ts
|
|
157
|
-
* import { defineConfig } from '@autometa/runner'
|
|
158
|
-
*
|
|
159
|
-
* defineConfig({
|
|
160
|
-
* ...
|
|
161
|
-
* roots: {
|
|
162
|
-
* steps: ['./test/steps'],
|
|
163
|
-
* app: ['./app'],
|
|
164
|
-
* },
|
|
165
|
-
* }
|
|
166
|
-
* ```
|
|
167
|
-
*
|
|
168
|
-
* Global steps are defined in standard Cucumber style.
|
|
169
|
-
*
|
|
170
|
-
* ```ts
|
|
171
|
-
* // ./test/steps/my-steps.ts
|
|
172
|
-
* import { Given, When, Then } from '@autometa/runner'
|
|
173
|
-
*
|
|
174
|
-
* Given('I have a step', () => {})
|
|
175
|
-
* When('I do something', () => {})
|
|
176
|
-
* Then('I expect something', () => {})
|
|
177
|
-
* ```
|
|
178
|
-
* @param filepath The absolute, relative, or 'feature root' path to the `.feature` file.
|
|
179
|
-
* @param timeout The timeout in milliseconds to apply to all tests within the feature.
|
|
180
|
-
*/
|
|
181
|
-
declare function Feature(filepath: string, timeout: number): FeatureScope;
|
|
182
|
-
/**
|
|
183
|
-
* Executes a gherkin `.feature` file. Assembles Tests
|
|
184
|
-
* using the Cucumber file and globally defined Step Definitions.
|
|
185
|
-
* Accepts a timeout as a `TestTimeout` which is a tuple of `[durationNumber, 'ms' | 's' | 'm' | 'h']`
|
|
186
|
-
* which will be applied to all tests within the feature.
|
|
187
|
-
*
|
|
188
|
-
* i.e. `[10, 's']` is a 10 second timeout. `[1, 'm']` is a 1 minute timeout.
|
|
189
|
-
*
|
|
190
|
-
* ```ts
|
|
191
|
-
* // using relative path
|
|
192
|
-
* import { Feature } from '@autometa/runner'
|
|
193
|
-
*
|
|
194
|
-
* // 10 second timeout
|
|
195
|
-
* Feature('../features/my-feature.feature', [10, 's'])
|
|
196
|
-
* ```
|
|
197
|
-
*
|
|
198
|
-
* Steps will be automatically assembled from Globally defined Step Definitions,
|
|
199
|
-
* if a step definition root and app root are defined.
|
|
200
|
-
*
|
|
201
|
-
* ```ts
|
|
202
|
-
* import { defineConfig } from '@autometa/runner'
|
|
203
|
-
*
|
|
204
|
-
* defineConfig({
|
|
205
|
-
* ...
|
|
206
|
-
* roots: {
|
|
207
|
-
* steps: ['./test/steps'],
|
|
208
|
-
* app: ['./app'],
|
|
209
|
-
* },
|
|
210
|
-
* };
|
|
211
|
-
*
|
|
212
|
-
* ```
|
|
213
|
-
*
|
|
214
|
-
* @param filepath
|
|
215
|
-
* @param timeout
|
|
216
|
-
*/
|
|
217
|
-
declare function Feature(filepath: string, timeout: TestTimeout): FeatureScope;
|
|
218
|
-
/**
|
|
219
|
-
* Executes a gherkin `.feature` file. Assembles Tests
|
|
220
|
-
* using the Cucumber file and optionally locally defined steps,
|
|
221
|
-
* mixed with optionally globally defined Step Definitions.
|
|
222
|
-
*
|
|
223
|
-
* ```ts
|
|
224
|
-
* import { Feature } from '@autometa/runner'
|
|
225
|
-
*
|
|
226
|
-
* Feature('My Feature', () => {
|
|
227
|
-
* Given('I have a step', () => {})
|
|
228
|
-
* When('I do something', () => {})
|
|
229
|
-
* Then('I expect something', () => {})
|
|
230
|
-
* })
|
|
231
|
-
* ```
|
|
232
|
-
*
|
|
233
|
-
* If defined in the Gherkin, it will also use any Globally defined Step Definitions which match,
|
|
234
|
-
* if none is defined locally. If a Step Definition is defined both globally and locally,
|
|
235
|
-
* the most local definition will be used. This applies to sub-scopes like Scenarios and Rules
|
|
236
|
-
* also.
|
|
237
|
-
*
|
|
238
|
-
* ```ts
|
|
239
|
-
* import { Feature } from '@autometa/runner'
|
|
240
|
-
*
|
|
241
|
-
* Feature('My Feature', () => {
|
|
242
|
-
* Given('I have a step', () => {})
|
|
243
|
-
* When('I do something', () => {})
|
|
244
|
-
* Then('I expect something', () => {})
|
|
245
|
-
*
|
|
246
|
-
* Scenario('My Scenario', () => {
|
|
247
|
-
* Given('I have a step', () => {})
|
|
248
|
-
* })
|
|
249
|
-
*
|
|
250
|
-
* Rule('My Rule', () => {
|
|
251
|
-
* Given('I have a step', () => {})
|
|
252
|
-
* })
|
|
253
|
-
*
|
|
254
|
-
* @param testDefinition
|
|
255
|
-
* @param filepath
|
|
256
|
-
*/
|
|
257
|
-
declare function Feature(testDefinition: FeatureAction, filepath: string): FeatureScope;
|
|
258
|
-
/**
|
|
259
|
-
* Executes a gherkin `.feature` file. Assembles Tests
|
|
260
|
-
* using the Cucumber file and optionally locally defined steps,
|
|
261
|
-
* mixed with optionally globally defined Step Definitions.
|
|
262
|
-
* Accepts a timeout in milliseconds which will be applied to
|
|
263
|
-
* all tests within the feature.
|
|
264
|
-
*
|
|
265
|
-
* ```ts
|
|
266
|
-
* import { Feature } from '@autometa/runner'
|
|
267
|
-
*
|
|
268
|
-
* // 10 second timeout
|
|
269
|
-
* Feature('My Feature', () => {
|
|
270
|
-
* Given('I have a step', () => {})
|
|
271
|
-
* When('I do something', () => {})
|
|
272
|
-
* Then('I expect something', () => {})
|
|
273
|
-
* }, 10_000)
|
|
274
|
-
* ```
|
|
275
|
-
* @param testDefinition the Feature definition callback
|
|
276
|
-
* @param filepath
|
|
277
|
-
* @param timeout
|
|
278
|
-
*/
|
|
279
|
-
declare function Feature(testDefinition: FeatureAction, filepath: string, timeout: number): FeatureScope;
|
|
280
|
-
declare function Scenario(title: string, action: ScenarioAction): ScenarioScope;
|
|
281
|
-
declare function Scenario(title: string, action: ScenarioAction, timeout: number): ScenarioScope;
|
|
282
|
-
declare function Scenario(title: string, action: ScenarioAction, timeout: SizedTimeout): ScenarioScope;
|
|
283
|
-
declare function ScenarioOutline(title: string, action: ScenarioAction): ScenarioScope;
|
|
284
|
-
declare function ScenarioOutline(title: string, action: ScenarioAction, timeout: number): ScenarioScope;
|
|
285
|
-
declare function ScenarioOutline(title: string, action: ScenarioAction, timeout: SizedTimeout): ScenarioScope;
|
|
286
|
-
declare function Rule(title: string, action: RuleAction): RuleScope;
|
|
287
|
-
declare function Rule(title: string, action: RuleAction, timeout: number): RuleScope;
|
|
288
|
-
declare function Rule(title: string, action: RuleAction, timeout: SizedTimeout): RuleScope;
|
|
289
|
-
/**
|
|
290
|
-
* Defines a `Given` step definition. Matches a gherkin step
|
|
291
|
-
* as either a string literal match, or a Cucumber Expression.
|
|
292
|
-
*
|
|
293
|
-
* The callback function is passed as it's last (or only) argument
|
|
294
|
-
* a copy of the `App` object which also contains a reference to the World.
|
|
295
|
-
* This can be used to access features, or store data across steps within a test.
|
|
296
|
-
*
|
|
297
|
-
* N.b. The App instance is shared between all step definitions and hooks within
|
|
298
|
-
* the context of a scenario, but cannot be accessed from the same step in a different
|
|
299
|
-
* scenario.
|
|
300
|
-
*
|
|
301
|
-
* ```ts
|
|
302
|
-
* import { Given } from '@autometa/runner'
|
|
303
|
-
*
|
|
304
|
-
* Given('I have a step', (app) => {
|
|
305
|
-
* app.world.someData = 'some value'
|
|
306
|
-
* })
|
|
307
|
-
* // using destructuring
|
|
308
|
-
* Given('I have a step', ({ world }) => {
|
|
309
|
-
* world.someData = 'some value'
|
|
310
|
-
* })
|
|
311
|
-
* ```
|
|
312
|
-
*
|
|
313
|
-
* Steps also support Cucumber Expressions, which can be used to match
|
|
314
|
-
* dynamic values in the step.
|
|
315
|
-
*
|
|
316
|
-
* ```ts
|
|
317
|
-
* import { Given } from '@autometa/runner'
|
|
318
|
-
*
|
|
319
|
-
* // matches 'Given I have a step with a 'blue' value'
|
|
320
|
-
* Given('I have a step with a {string} value', (value, { world }) => {
|
|
321
|
-
* world.someData = value
|
|
322
|
-
* })
|
|
323
|
-
*
|
|
324
|
-
* @param pattern The step pattern to match.
|
|
325
|
-
* @param action The step action to execute.
|
|
326
|
-
*/
|
|
327
|
-
declare const Given: <TText extends string, TTable extends _autometa_gherkin.DataTable | _autometa_gherkin.TableDocument<_autometa_gherkin.DataTable> = _autometa_gherkin.NeverDataTable>(title: TText, action: _autometa_scopes.StepActionFn<TText, TTable>, tableType?: _autometa_types.Class<TTable> | undefined) => void;
|
|
328
|
-
/**
|
|
329
|
-
* Defines a `When` step definition. Matches a gherkin step
|
|
330
|
-
* as either a string literal match, or a Cucumber Expression.
|
|
331
|
-
*
|
|
332
|
-
* The callback function is passed as it's last (or only) argument
|
|
333
|
-
* a copy of the `App` object which also contains a reference to the World.
|
|
334
|
-
* This can be used to access features, or store data across steps within a test.
|
|
335
|
-
*
|
|
336
|
-
* N.b. The App instance is shared between all step definitions and hooks within
|
|
337
|
-
*
|
|
338
|
-
* ```ts
|
|
339
|
-
* import { When } from '@autometa/runner'
|
|
340
|
-
*
|
|
341
|
-
* When('I do something', async (app) => {
|
|
342
|
-
* await app.webdriver.click('#some-button')
|
|
343
|
-
* })
|
|
344
|
-
*
|
|
345
|
-
* // using destructuring
|
|
346
|
-
* When('I do something', async ({ webdriver }) => {
|
|
347
|
-
* await webdriver.click('#some-button')
|
|
348
|
-
* })
|
|
349
|
-
* ```
|
|
350
|
-
*
|
|
351
|
-
* Steps also support Cucumber Expressions, which can be used to match
|
|
352
|
-
* dynamic values in the step.
|
|
353
|
-
*
|
|
354
|
-
* ```ts
|
|
355
|
-
* import { When } from '@autometa/runner'
|
|
356
|
-
*
|
|
357
|
-
* // matches 'When I do something with a 'blue' value'
|
|
358
|
-
* When('I do something with a {string} value', async (value, { webdriver }) => {
|
|
359
|
-
* await webdriver.click(`#some-button-${value}`)
|
|
360
|
-
* })
|
|
361
|
-
*
|
|
362
|
-
* @param pattern The step pattern to match.
|
|
363
|
-
* @param action The step action to execute.
|
|
364
|
-
*/
|
|
365
|
-
declare const When: <TText_1 extends string, TTable_1 extends _autometa_gherkin.DataTable | _autometa_gherkin.TableDocument<_autometa_gherkin.DataTable> = _autometa_gherkin.NeverDataTable>(title: TText_1, action: _autometa_scopes.StepActionFn<TText_1, TTable_1>, tableType?: _autometa_types.Class<TTable_1> | undefined) => void;
|
|
366
|
-
/**
|
|
367
|
-
* Defines a `Then` step definition. Matches a gherkin step
|
|
368
|
-
* as either a string literal match, or a Cucumber Expression.
|
|
369
|
-
*
|
|
370
|
-
* The callback function is passed as it's last (or only) argument
|
|
371
|
-
* a copy of the `App` object which also contains a reference to the World.
|
|
372
|
-
* This can be used to access features, or store data across steps within a test.
|
|
373
|
-
*
|
|
374
|
-
* N.b. The App instance is shared between all step definitions and hooks within
|
|
375
|
-
*
|
|
376
|
-
* ```ts
|
|
377
|
-
* import { Then } from '@autometa/runner'
|
|
378
|
-
*
|
|
379
|
-
* Then('I expect something', async (app) => {
|
|
380
|
-
* await app.webdriver.click('#some-button')
|
|
381
|
-
* })
|
|
382
|
-
*
|
|
383
|
-
* // using destructuring
|
|
384
|
-
* Then('I expect something', async ({ webdriver }) => {
|
|
385
|
-
* await webdriver.click('#some-button')
|
|
386
|
-
* })
|
|
387
|
-
* ```
|
|
388
|
-
*
|
|
389
|
-
* Steps also support Cucumber Expressions, which can be used to match
|
|
390
|
-
* dynamic values in the step.
|
|
391
|
-
*
|
|
392
|
-
* ```ts
|
|
393
|
-
* import { Then } from '@autometa/runner'
|
|
394
|
-
*
|
|
395
|
-
* // matches 'Then I expect something with a 'blue' value'
|
|
396
|
-
* Then('I expect something with a {string} value', async (value, { world }) => {
|
|
397
|
-
* expect(world.someData).toBe(value)
|
|
398
|
-
* })
|
|
399
|
-
*
|
|
400
|
-
* @param pattern The step pattern to match.
|
|
401
|
-
* @param action The step action to execute.
|
|
402
|
-
*/
|
|
403
|
-
declare const Then: <TText_2 extends string, TTable_2 extends _autometa_gherkin.DataTable | _autometa_gherkin.TableDocument<_autometa_gherkin.DataTable> = _autometa_gherkin.NeverDataTable>(title: TText_2, action: _autometa_scopes.StepActionFn<TText_2, TTable_2>, tableType?: _autometa_types.Class<TTable_2> | undefined) => void;
|
|
404
|
-
/**
|
|
405
|
-
* Defines a `Before` hook. Executes before each scenario.
|
|
406
|
-
*
|
|
407
|
-
* ```ts
|
|
408
|
-
* import { Before } from '@autometa/runner'
|
|
409
|
-
*
|
|
410
|
-
* Before(async (app) => {
|
|
411
|
-
* await app.webdriver.click('#some-button')
|
|
412
|
-
* })
|
|
413
|
-
*
|
|
414
|
-
* // using destructuring
|
|
415
|
-
* Before(async ({ webdriver }) => {
|
|
416
|
-
* await webdriver.click('#some-button')
|
|
417
|
-
* })
|
|
418
|
-
* ```
|
|
419
|
-
*
|
|
420
|
-
* @param action The hook action to execute.
|
|
421
|
-
*/
|
|
422
|
-
declare const Before: {
|
|
423
|
-
(description: string, action: _autometa_scopes.HookAction): _autometa_scopes.BeforeHook;
|
|
424
|
-
(description: string, action: _autometa_scopes.HookAction, timeout: number): _autometa_scopes.BeforeHook;
|
|
425
|
-
(description: string, action: _autometa_scopes.HookAction, tagFilterExpression: string): _autometa_scopes.BeforeHook;
|
|
426
|
-
(description: string, action: _autometa_scopes.HookAction, tagFilterExpression: string, timeout: number): _autometa_scopes.BeforeHook;
|
|
427
|
-
(description: string, action: _autometa_scopes.HookAction, tagFilterExpression: string, timeout: SizedTimeout): _autometa_scopes.BeforeHook;
|
|
428
|
-
(description: string, action: _autometa_scopes.HookAction, timeout: SizedTimeout): _autometa_scopes.BeforeHook;
|
|
429
|
-
(description: string, action: _autometa_scopes.HookAction, exprOrTimeout?: string | TestTimeout | undefined, timeout?: TestTimeout | undefined): _autometa_scopes.BeforeHook;
|
|
430
|
-
};
|
|
431
|
-
/**
|
|
432
|
-
* Defines a `After` hook. Executes after each scenario.
|
|
433
|
-
*
|
|
434
|
-
* ```ts
|
|
435
|
-
* import { After } from '@autometa/runner'
|
|
436
|
-
*
|
|
437
|
-
* After(async (app) => {
|
|
438
|
-
* await app.webdriver.click('#some-button')
|
|
439
|
-
* })
|
|
440
|
-
*
|
|
441
|
-
* // using destructuring
|
|
442
|
-
* After(async ({ webdriver }) => {
|
|
443
|
-
* await webdriver.click('#some-button')
|
|
444
|
-
* })
|
|
445
|
-
* ```
|
|
446
|
-
*
|
|
447
|
-
* @param action The hook action to execute.
|
|
448
|
-
*/
|
|
449
|
-
declare const After: {
|
|
450
|
-
(description: string, action: _autometa_scopes.HookAction): _autometa_scopes.AfterHook;
|
|
451
|
-
(description: string, action: _autometa_scopes.HookAction, timeout: number): _autometa_scopes.AfterHook;
|
|
452
|
-
(description: string, action: _autometa_scopes.HookAction, tagFilterExpression: string): _autometa_scopes.AfterHook;
|
|
453
|
-
(description: string, action: _autometa_scopes.HookAction, tagFilterExpression: string, timeout: number): _autometa_scopes.AfterHook;
|
|
454
|
-
(description: string, action: _autometa_scopes.HookAction, tagFilterExpression: string, timeout: SizedTimeout): _autometa_scopes.AfterHook;
|
|
455
|
-
(description: string, action: _autometa_scopes.HookAction, timeout: SizedTimeout): _autometa_scopes.AfterHook;
|
|
456
|
-
(description: string, action: _autometa_scopes.HookAction, exprOrTimeout?: string | TestTimeout | undefined, timeout?: TestTimeout | undefined): _autometa_scopes.AfterHook;
|
|
457
|
-
};
|
|
458
|
-
/**
|
|
459
|
-
* Defines a `Setup` hook. Executes before all scenarios.
|
|
460
|
-
* Setups are scoped, meaning a Setup defined inside the scope of a rule
|
|
461
|
-
* will only apply to scenarios within that rule.
|
|
462
|
-
*
|
|
463
|
-
* N.b the Setup Hook and Teardown Hook reference their own unique
|
|
464
|
-
* copy of the App with it's own unique life cycle. Values stored here
|
|
465
|
-
* will not be accessible in tests without a singleton fixture.
|
|
466
|
-
*
|
|
467
|
-
* ```ts
|
|
468
|
-
* import { Setup } from '@autometa/runner'
|
|
469
|
-
*
|
|
470
|
-
* Setup(async (app) => {
|
|
471
|
-
* await app.webdriver.click('#some-button')
|
|
472
|
-
* })
|
|
473
|
-
*
|
|
474
|
-
* // using destructuring
|
|
475
|
-
* Setup(async ({ webdriver }) => {
|
|
476
|
-
* await webdriver.click('#some-button')
|
|
477
|
-
* })
|
|
478
|
-
* ```
|
|
479
|
-
*
|
|
480
|
-
* @param action The hook action to execute.
|
|
481
|
-
*/
|
|
482
|
-
declare const Teardown: {
|
|
483
|
-
(description: string, action: _autometa_scopes.HookAction): _autometa_scopes.TeardownHook;
|
|
484
|
-
(description: string, action: _autometa_scopes.HookAction, timeout: number): _autometa_scopes.TeardownHook;
|
|
485
|
-
(description: string, action: _autometa_scopes.HookAction, tagFilterExpression: string): _autometa_scopes.TeardownHook;
|
|
486
|
-
(description: string, action: _autometa_scopes.HookAction, tagFilterExpression: string, timeout: number): _autometa_scopes.TeardownHook;
|
|
487
|
-
(description: string, action: _autometa_scopes.HookAction, tagFilterExpression: string, timeout: SizedTimeout): _autometa_scopes.TeardownHook;
|
|
488
|
-
(description: string, action: _autometa_scopes.HookAction, timeout: SizedTimeout): _autometa_scopes.TeardownHook;
|
|
489
|
-
};
|
|
490
|
-
/**
|
|
491
|
-
* Defines a `Teardown` hook. Executes after all scenarios have completed.
|
|
492
|
-
* Teardowns are scoped, meaning a Teardown defined inside the scope of a rule
|
|
493
|
-
* will only apply to scenarios within that rule.
|
|
494
|
-
*
|
|
495
|
-
* N.b the Setup Hook and Teardown Hook reference their own unique
|
|
496
|
-
* copy of the App with it's own unique life cycle. Values stored here
|
|
497
|
-
* will not be accessible in tests without a singleston fixture.
|
|
498
|
-
* ```ts
|
|
499
|
-
* import { Teardown } from '@autometa/runner'
|
|
500
|
-
*
|
|
501
|
-
* Teardown(async (app) => {
|
|
502
|
-
* await app.webdriver.click('#some-button')
|
|
503
|
-
* })
|
|
504
|
-
*
|
|
505
|
-
* // using destructuring
|
|
506
|
-
* Teardown(async ({ webdriver }) => {
|
|
507
|
-
* await webdriver.click('#some-button')
|
|
508
|
-
* })
|
|
509
|
-
* ```
|
|
510
|
-
*
|
|
511
|
-
* @param action The hook action to execute.
|
|
512
|
-
*/
|
|
513
|
-
declare const Setup: {
|
|
514
|
-
(description: string, action: _autometa_scopes.HookAction): _autometa_scopes.SetupHook;
|
|
515
|
-
(description: string, action: _autometa_scopes.HookAction, timeout: number): _autometa_scopes.SetupHook;
|
|
516
|
-
(description: string, action: _autometa_scopes.HookAction, tagFilterExpression: string): _autometa_scopes.SetupHook;
|
|
517
|
-
(description: string, action: _autometa_scopes.HookAction, tagFilterExpression: string, timeout: number): _autometa_scopes.SetupHook;
|
|
518
|
-
(description: string, action: _autometa_scopes.HookAction, tagFilterExpression: string, timeout: SizedTimeout): _autometa_scopes.SetupHook;
|
|
519
|
-
(description: string, action: _autometa_scopes.HookAction, timeout: SizedTimeout): _autometa_scopes.SetupHook;
|
|
520
|
-
};
|
|
521
|
-
/**
|
|
522
|
-
* Defines a `BeforeFeature` hook. Executes before each feature.
|
|
523
|
-
*
|
|
524
|
-
* ```ts
|
|
525
|
-
* import { BeforeFeature } from '@autometa/runner'
|
|
526
|
-
*
|
|
527
|
-
* BeforeFeature(async (app) => {
|
|
528
|
-
* await app.webdriver.click('#some-button')
|
|
529
|
-
* })
|
|
530
|
-
*
|
|
531
|
-
* // using destructuring
|
|
532
|
-
* BeforeFeature(async ({ webdriver }) => {
|
|
533
|
-
* await webdriver.click('#some-button')
|
|
534
|
-
* })
|
|
535
|
-
* ```
|
|
536
|
-
*
|
|
537
|
-
* @param action The hook action to execute.
|
|
538
|
-
*/
|
|
539
|
-
declare const BeforeFeature: (description: string, action: _autometa_scopes.HookAction) => _autometa_scopes.BeforeFeatureHook;
|
|
540
|
-
/**
|
|
541
|
-
* Defines a `AfterFeature` hook. Executes after each feature.
|
|
542
|
-
*
|
|
543
|
-
* ```ts
|
|
544
|
-
* import { AfterFeature } from '@autometa/runner'
|
|
545
|
-
*
|
|
546
|
-
* AfterFeature(async (app) => {
|
|
547
|
-
* await app.webdriver.click('#some-button')
|
|
548
|
-
* })
|
|
549
|
-
*
|
|
550
|
-
* // using destructuring
|
|
551
|
-
* AfterFeature(async ({ webdriver }) => {
|
|
552
|
-
* await webdriver.click('#some-button')
|
|
553
|
-
* })
|
|
554
|
-
* ```
|
|
555
|
-
*
|
|
556
|
-
* @param action The hook action to execute.
|
|
557
|
-
*/
|
|
558
|
-
declare const AfterFeature: (description: string, action: _autometa_scopes.AfterGroupHookAction) => _autometa_scopes.AfterFeatureHook;
|
|
559
|
-
/**
|
|
560
|
-
* Defines a `BeforeScenarioOutline` hook. Executes before each scenario outline.
|
|
561
|
-
*
|
|
562
|
-
* ```ts
|
|
563
|
-
* import { BeforeScenarioOutline } from '@autometa/runner'
|
|
564
|
-
*
|
|
565
|
-
* BeforeScenarioOutline(async (app) => {
|
|
566
|
-
* await app.webdriver.click('#some-button')
|
|
567
|
-
* })
|
|
568
|
-
*
|
|
569
|
-
* // using destructuring
|
|
570
|
-
* BeforeScenarioOutline(async ({ webdriver }) => {
|
|
571
|
-
* await webdriver.click('#some-button')
|
|
572
|
-
* })
|
|
573
|
-
* ```
|
|
574
|
-
*
|
|
575
|
-
* @param action The hook action to execute.
|
|
576
|
-
*/
|
|
577
|
-
declare const BeforeScenarioOutline: (description: string, action: _autometa_scopes.HookAction) => _autometa_scopes.BeforeScenarioOutlineHook;
|
|
578
|
-
/**
|
|
579
|
-
* Defines a `AfterScenarioOutline` hook. Executes after each scenario outline.
|
|
580
|
-
*
|
|
581
|
-
* ```ts
|
|
582
|
-
* import { AfterScenarioOutline } from '@autometa/runner'
|
|
583
|
-
*
|
|
584
|
-
* AfterScenarioOutline(async (app) => {
|
|
585
|
-
* await app.webdriver.click('#some-button')
|
|
586
|
-
* })
|
|
587
|
-
*
|
|
588
|
-
* // using destructuring
|
|
589
|
-
* AfterScenarioOutline(async ({ webdriver }) => {
|
|
590
|
-
* await webdriver.click('#some-button')
|
|
591
|
-
* })
|
|
592
|
-
* ```
|
|
593
|
-
*
|
|
594
|
-
* @param action The hook action to execute.
|
|
595
|
-
*/
|
|
596
|
-
declare const AfterScenarioOutline: (description: string, action: _autometa_scopes.AfterGroupHookAction) => _autometa_scopes.AfterScenarioOutlineHook;
|
|
597
|
-
/**
|
|
598
|
-
* Defines a `BeforeExamples` hook. Executes before each examples table.
|
|
599
|
-
*
|
|
600
|
-
* ```ts
|
|
601
|
-
* import { BeforeExamples } from '@autometa/runner'
|
|
602
|
-
*
|
|
603
|
-
* BeforeExamples(async (app) => {
|
|
604
|
-
* await app.webdriver.click('#some-button')
|
|
605
|
-
* })
|
|
606
|
-
*
|
|
607
|
-
* // using destructuring
|
|
608
|
-
* BeforeExamples(async ({ webdriver }) => {
|
|
609
|
-
* await webdriver.click('#some-button')
|
|
610
|
-
* })
|
|
611
|
-
* ```
|
|
612
|
-
*
|
|
613
|
-
* @param action The hook action to execute.
|
|
614
|
-
*/
|
|
615
|
-
declare const BeforeExamples: (description: string, action: _autometa_scopes.HookAction) => _autometa_scopes.BeforeExamplesHook;
|
|
616
|
-
/**
|
|
617
|
-
* Defines a `AfterExamples` hook. Executes after each examples table.
|
|
618
|
-
*
|
|
619
|
-
* ```ts
|
|
620
|
-
* import { AfterExamples } from '@autometa/runner'
|
|
621
|
-
*
|
|
622
|
-
* AfterExamples(async (app) => {
|
|
623
|
-
* await app.webdriver.click('#some-button')
|
|
624
|
-
* })
|
|
625
|
-
*
|
|
626
|
-
* // using destructuring
|
|
627
|
-
* AfterExamples(async ({ webdriver }) => {
|
|
628
|
-
* await webdriver.click('#some-button')
|
|
629
|
-
* })
|
|
630
|
-
* ```
|
|
631
|
-
*
|
|
632
|
-
* @param action The hook action to execute.
|
|
633
|
-
*/
|
|
634
|
-
declare const AfterExamples: (description: string, action: _autometa_scopes.AfterGroupHookAction) => _autometa_scopes.AfterExamplesHook;
|
|
635
|
-
/**
|
|
636
|
-
* Defines a `BeforeRule` hook. Executes before each rule.
|
|
637
|
-
*
|
|
638
|
-
* ```ts
|
|
639
|
-
* import { BeforeRule } from '@autometa/runner'
|
|
640
|
-
*
|
|
641
|
-
* BeforeRule(async (app) => {
|
|
642
|
-
* await app.webdriver.click('#some-button')
|
|
643
|
-
* })
|
|
644
|
-
*
|
|
645
|
-
* // using destructuring
|
|
646
|
-
* BeforeRule(async ({ webdriver }) => {
|
|
647
|
-
* await webdriver.click('#some-button')
|
|
648
|
-
* })
|
|
649
|
-
* ```
|
|
650
|
-
*
|
|
651
|
-
* @param action The hook action to execute.
|
|
652
|
-
*/
|
|
653
|
-
declare const BeforeRule: (description: string, action: _autometa_scopes.HookAction) => _autometa_scopes.BeforeRuleHook;
|
|
654
|
-
/**
|
|
655
|
-
* Defines a `AfterRule` hook. Executes after each rule.
|
|
656
|
-
*
|
|
657
|
-
* ```ts
|
|
658
|
-
* import { AfterRule } from '@autometa/runner'
|
|
659
|
-
*
|
|
660
|
-
* AfterRule(async (app) => {
|
|
661
|
-
* await app.webdriver.click('#some-button')
|
|
662
|
-
* })
|
|
663
|
-
*
|
|
664
|
-
* // using destructuring
|
|
665
|
-
* AfterRule(async ({ webdriver }) => {
|
|
666
|
-
* await webdriver.click('#some-button')
|
|
667
|
-
* })
|
|
668
|
-
* ```
|
|
669
|
-
*
|
|
670
|
-
* @param action The hook action to execute.
|
|
671
|
-
*/
|
|
672
|
-
declare const AfterRule: (description: string, action: _autometa_scopes.AfterGroupHookAction) => _autometa_scopes.AfterRuleHook;
|
|
673
|
-
|
|
674
|
-
export { After, AfterExamples, AfterFeature, AfterRule, AfterScenarioOutline, AppType, Before, BeforeExamples, BeforeFeature, BeforeRule, BeforeScenarioOutline, Feature, Given, Rule, Scenario, ScenarioOutline, Setup, Teardown, Then, When, defineConfig, defineParameterType, makeTestEmitter };
|
package/tsup.config.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from "tsup";
|
|
2
|
-
|
|
3
|
-
export default defineConfig({
|
|
4
|
-
clean: true, // clean up the dist folder
|
|
5
|
-
format: ["cjs", "esm"], // generate cjs and esm files
|
|
6
|
-
dts: true,
|
|
7
|
-
sourcemap: true, // generate sourcemaps
|
|
8
|
-
skipNodeModulesBundle: true,
|
|
9
|
-
entryPoints: ["src/index.ts"],
|
|
10
|
-
target: "es2020",
|
|
11
|
-
outDir: "dist",
|
|
12
|
-
legacyOutput: true,
|
|
13
|
-
external: ["dist"],
|
|
14
|
-
});
|