@autometa/runner 0.5.11 → 0.6.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/.turbo/turbo-test.log +2 -2
- package/CHANGELOG.md +38 -0
- package/dist/esm/index.js +96 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.cts +153 -1
- package/dist/index.d.ts +153 -1
- package/dist/index.js +96 -0
- package/dist/index.js.map +1 -1
- package/package.json +15 -15
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @autometa/runner@0.5.
|
|
2
|
+
> @autometa/runner@0.5.11 test /Users/ben.aherne/Documents/GitHub/autometa/packages/autometa
|
|
3
3
|
> vitest run --passWithNoTests
|
|
4
4
|
|
|
5
5
|
|
|
@@ -7,6 +7,6 @@
|
|
|
7
7
|
|
|
8
8
|
include: **/*.{test,spec}.?(c|m)[jt]s?(x)
|
|
9
9
|
exclude: **/node_modules/**, **/dist/**, **/cypress/**, **/.{idea,git,cache,output,temp}/**, **/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build,eslint,prettier}.config.*
|
|
10
|
+
watch exclude: **/node_modules/**, **/dist/**
|
|
10
11
|
No test files found, exiting with code 0
|
|
11
12
|
|
|
12
|
-
watch exclude: **/node_modules/**, **/dist/**
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
# @autometa/runner
|
|
2
2
|
|
|
3
|
+
## 0.6.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- da669a3: feat: disposable injectables
|
|
8
|
+
- Updated dependencies [da669a3]
|
|
9
|
+
- @autometa/jest-executor@0.6.1
|
|
10
|
+
- @autometa/injection@0.1.4
|
|
11
|
+
- @autometa/app@0.4.1
|
|
12
|
+
- @autometa/coordinator@0.3.30
|
|
13
|
+
- @autometa/http@1.4.19
|
|
14
|
+
- @autometa/config@0.1.26
|
|
15
|
+
- @autometa/cucumber-expressions@0.4.3
|
|
16
|
+
- @autometa/scopes@0.7.1
|
|
17
|
+
- @autometa/test-builder@0.4.1
|
|
18
|
+
- @autometa/gherkin@0.7.1
|
|
19
|
+
- @autometa/events@0.3.1
|
|
20
|
+
|
|
21
|
+
## 0.6.0
|
|
22
|
+
|
|
23
|
+
### Minor Changes
|
|
24
|
+
|
|
25
|
+
- 7440e9f: feat: new group based hooks for feature, rule, outline and examples
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- Updated dependencies [7440e9f]
|
|
30
|
+
- @autometa/jest-executor@0.6.0
|
|
31
|
+
- @autometa/test-builder@0.4.0
|
|
32
|
+
- @autometa/gherkin@0.7.0
|
|
33
|
+
- @autometa/events@0.3.0
|
|
34
|
+
- @autometa/scopes@0.7.0
|
|
35
|
+
- @autometa/app@0.4.0
|
|
36
|
+
- @autometa/coordinator@0.3.29
|
|
37
|
+
- @autometa/config@0.1.25
|
|
38
|
+
- @autometa/cucumber-expressions@0.4.2
|
|
39
|
+
- @autometa/http@1.4.18
|
|
40
|
+
|
|
3
41
|
## 0.5.11
|
|
4
42
|
|
|
5
43
|
### Patch Changes
|
package/dist/esm/index.js
CHANGED
|
@@ -27,12 +27,20 @@ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "defau
|
|
|
27
27
|
var src_exports = {};
|
|
28
28
|
__export(src_exports, {
|
|
29
29
|
After: () => After2,
|
|
30
|
+
AfterExamples: () => AfterExamples2,
|
|
31
|
+
AfterFeature: () => AfterFeature2,
|
|
32
|
+
AfterRule: () => AfterRule2,
|
|
33
|
+
AfterScenarioOutline: () => AfterScenarioOutline2,
|
|
30
34
|
App: () => App,
|
|
31
35
|
AppType: () => AppType,
|
|
32
36
|
AutomationError: () => AutomationError,
|
|
33
37
|
AutometaApp: () => AutometaApp,
|
|
34
38
|
AutometaWorld: () => AutometaWorld,
|
|
35
39
|
Before: () => Before2,
|
|
40
|
+
BeforeExamples: () => BeforeExamples2,
|
|
41
|
+
BeforeFeature: () => BeforeFeature2,
|
|
42
|
+
BeforeRule: () => BeforeRule2,
|
|
43
|
+
BeforeScenarioOutline: () => BeforeScenarioOutline2,
|
|
36
44
|
Bind: () => Bind,
|
|
37
45
|
Constructor: () => Constructor,
|
|
38
46
|
Container: () => Container,
|
|
@@ -221,6 +229,69 @@ var GroupLogEvents = class {
|
|
|
221
229
|
console.log(colorStatus(status, `Ending ${title}`));
|
|
222
230
|
console.groupEnd();
|
|
223
231
|
}
|
|
232
|
+
onBeforeFeatureStart(opts) {
|
|
233
|
+
console.group(opts.title);
|
|
234
|
+
console.group();
|
|
235
|
+
}
|
|
236
|
+
onBeforeFeatureEnd(opts) {
|
|
237
|
+
console.groupEnd();
|
|
238
|
+
console.log(colorStatus(opts.status, `Ending ${opts.title}`));
|
|
239
|
+
console.groupEnd();
|
|
240
|
+
}
|
|
241
|
+
onAfterFeatureStart(opts) {
|
|
242
|
+
console.group(opts.title);
|
|
243
|
+
console.group();
|
|
244
|
+
}
|
|
245
|
+
onAfterFeatureEnd(opts) {
|
|
246
|
+
console.groupEnd();
|
|
247
|
+
console.log(colorStatus(opts.status, `Ending ${opts.title}`));
|
|
248
|
+
console.groupEnd();
|
|
249
|
+
}
|
|
250
|
+
onBeforeRuleStart(opts) {
|
|
251
|
+
console.group(opts.title);
|
|
252
|
+
console.group();
|
|
253
|
+
}
|
|
254
|
+
onBeforeRuleEnd(opts) {
|
|
255
|
+
console.groupEnd();
|
|
256
|
+
console.log(colorStatus(opts.status, `Ending ${opts.title}`));
|
|
257
|
+
console.groupEnd();
|
|
258
|
+
}
|
|
259
|
+
onAfterRuleStart(opts) {
|
|
260
|
+
console.group(opts.title);
|
|
261
|
+
console.group();
|
|
262
|
+
}
|
|
263
|
+
onAfterRuleEnd(opts) {
|
|
264
|
+
console.groupEnd();
|
|
265
|
+
console.log(colorStatus(opts.status, `Ending ${opts.title}`));
|
|
266
|
+
console.groupEnd();
|
|
267
|
+
}
|
|
268
|
+
onBeforeScenarioOutlineStart(opts) {
|
|
269
|
+
console.group(opts.title);
|
|
270
|
+
console.group();
|
|
271
|
+
}
|
|
272
|
+
onBeforeScenarioOutlineEnd(opts) {
|
|
273
|
+
console.groupEnd();
|
|
274
|
+
console.log(colorStatus(opts.status, `Ending ${opts.title}`));
|
|
275
|
+
console.groupEnd();
|
|
276
|
+
}
|
|
277
|
+
onBeforeExamplesStart(opts) {
|
|
278
|
+
console.group(opts.title);
|
|
279
|
+
console.group();
|
|
280
|
+
}
|
|
281
|
+
onBeforeExamplesEnd(opts) {
|
|
282
|
+
console.groupEnd();
|
|
283
|
+
console.log(colorStatus(opts.status, `Ending ${opts.title}`));
|
|
284
|
+
console.groupEnd();
|
|
285
|
+
}
|
|
286
|
+
onAfterExamplesStart(opts) {
|
|
287
|
+
console.group(opts.title);
|
|
288
|
+
console.group();
|
|
289
|
+
}
|
|
290
|
+
onAfterExamplesEnd(opts) {
|
|
291
|
+
console.groupEnd();
|
|
292
|
+
console.log(colorStatus(opts.status, `Ending ${opts.title}`));
|
|
293
|
+
console.groupEnd();
|
|
294
|
+
}
|
|
224
295
|
};
|
|
225
296
|
function colorStatus(status, text) {
|
|
226
297
|
switch (status) {
|
|
@@ -302,11 +373,20 @@ import {
|
|
|
302
373
|
Inject
|
|
303
374
|
} from "@autometa/injection";
|
|
304
375
|
import { getApp } from "@autometa/app";
|
|
376
|
+
import { DisposeMethod } from "@autometa/injection";
|
|
305
377
|
var OPTS = {};
|
|
306
378
|
var AppType = at.bind(null, OPTS);
|
|
307
379
|
|
|
308
380
|
// src/scopes.ts
|
|
309
381
|
var {
|
|
382
|
+
BeforeFeature,
|
|
383
|
+
AfterFeature,
|
|
384
|
+
BeforeScenarioOutline,
|
|
385
|
+
AfterScenarioOutline,
|
|
386
|
+
BeforeExamples,
|
|
387
|
+
AfterExamples,
|
|
388
|
+
BeforeRule,
|
|
389
|
+
AfterRule,
|
|
310
390
|
Feature,
|
|
311
391
|
Scenario,
|
|
312
392
|
ScenarioOutline,
|
|
@@ -368,14 +448,30 @@ var Before2 = Before;
|
|
|
368
448
|
var After2 = After;
|
|
369
449
|
var Teardown2 = Teardown;
|
|
370
450
|
var Setup2 = Setup;
|
|
451
|
+
var BeforeFeature2 = BeforeFeature;
|
|
452
|
+
var AfterFeature2 = AfterFeature;
|
|
453
|
+
var BeforeScenarioOutline2 = BeforeScenarioOutline;
|
|
454
|
+
var AfterScenarioOutline2 = AfterScenarioOutline;
|
|
455
|
+
var BeforeExamples2 = BeforeExamples;
|
|
456
|
+
var AfterExamples2 = AfterExamples;
|
|
457
|
+
var BeforeRule2 = BeforeRule;
|
|
458
|
+
var AfterRule2 = AfterRule;
|
|
371
459
|
export {
|
|
372
460
|
After2 as After,
|
|
461
|
+
AfterExamples2 as AfterExamples,
|
|
462
|
+
AfterFeature2 as AfterFeature,
|
|
463
|
+
AfterRule2 as AfterRule,
|
|
464
|
+
AfterScenarioOutline2 as AfterScenarioOutline,
|
|
373
465
|
App,
|
|
374
466
|
AppType,
|
|
375
467
|
AutomationError,
|
|
376
468
|
AutometaApp,
|
|
377
469
|
AutometaWorld,
|
|
378
470
|
Before2 as Before,
|
|
471
|
+
BeforeExamples2 as BeforeExamples,
|
|
472
|
+
BeforeFeature2 as BeforeFeature,
|
|
473
|
+
BeforeRule2 as BeforeRule,
|
|
474
|
+
BeforeScenarioOutline2 as BeforeScenarioOutline,
|
|
379
475
|
Bind,
|
|
380
476
|
Constructor,
|
|
381
477
|
Container,
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/config.ts","../../src/parameters.ts","../../src/scopes.ts","../../src/events.ts","../../src/event-logger.ts","../../src/executor.ts","../../src/app.ts"],"sourcesContent":["import type {\n FeatureAction,\n FeatureScope,\n ScenarioAction,\n ScenarioScope,\n SizedTimeout,\n TestTimeout,\n} from \"@autometa/scopes\";\n\nexport { defineConfig } from \"./config\";\nexport { defineParameterType } from \"./parameters\";\nimport {\n Feature as FeatureDefinition,\n Scenario as ScenarioDefinition,\n ScenarioOutline as ScenarioOutlineDefinition,\n Rule as RuleDefinition,\n Given as GivenDefinition,\n When as WhenDefinition,\n Then as ThenDefinition,\n Before as BeforeDefinition,\n After as AfterDefinition,\n Teardown as TeardownDefinition,\n Setup as SetupDefinition,\n} from \"./scopes\";\nimport { RuleAction } from \"@autometa/scopes\";\nimport { RuleScope } from \"@autometa/scopes\";\nexport { Pass } from \"./scopes\";\nexport * from \"@autometa/phrases\";\nexport {\n AppType,\n Fixture,\n Container,\n Constructor,\n AutometaApp,\n getApp,\n AutometaWorld,\n App,\n World,\n INJECTION_SCOPE,\n InjectionScope,\n Inject,\n} from \"./app\";\nexport { Dates, Time } from \"@autometa/datetime\";\nexport { AutomationError, raise } from \"@autometa/errors\";\nexport {\n DataTable,\n HTable,\n VTable,\n MTable,\n TableDocument,\n} from \"@autometa/gherkin\";\nexport { Bind } from \"@autometa/bind-decorator\";\nexport { Types } from \"@autometa/scopes\";\nexport * from \"./events\";\nexport * from \"@autometa/http\";\nexport * from \"@autometa/asserters\";\nexport {\n GetAccessedCount,\n GetAssignedValues,\n TrackAccess,\n} from \"@autometa/fixture-proxies\";\n\nexport { FileObject } from \"@autometa/file-proxies\";\n/**\n * Executes a gherkin `.feature` file. Assembles Tests\n * using the Cucumber file and globally defined Step Definitions.\n *\n * ``ts\n * // using relative path\n * import { Feature } from '@autometa/runner'\n *\n * Feature('../features/my-feature.feature')\n * ```\n *\n * Steps will be automatically assembled from Globally defined Step Definitions,\n * if a step definition root and app root are defined.\n *\n * ```ts\n * import { defineConfig } from '@autometa/runner'\n *\n * defineConfig({\n * ...\n * roots: {\n * steps: ['./test/steps'],\n * app: ['./app'],\n * },\n * }\n * ```\n *\n * Global steps are defined in standard Cucumber stle.\n * ```ts\n * // ./test/steps/my-steps.ts\n * import { Given, When, Then } from '@autometa/runner'\n *\n * Given('I have a step', () => {})\n * When('I do something', () => {})\n * Then('I expect something', () => {})\n * ```\n * @param filepath The absolute, relative, or 'feature root' path to the `.feature` file.\n */\nexport function Feature(filepath: string): FeatureScope;\n/**\n * Executes a gherkin `.feature` file. Assembles Tests\n * using the Cucumber file and globally defined Step Definitions.\n * Accepts a timeout in milliseconds which will be applied to\n * all tests within the feature.\n *\n * ```ts\n * // using relative path\n * import { Feature } from '@autometa/runner'\n * // 10 second timeout\n * Feature('../features/my-feature.feature', 10_000)\n * ```\n *\n * Steps will be automatically assembled from Globally defined Step Definitions,\n * if a step definition root and app root are defined.\n *\n * ```ts\n * import { defineConfig } from '@autometa/runner'\n *\n * defineConfig({\n * ...\n * roots: {\n * steps: ['./test/steps'],\n * app: ['./app'],\n * },\n * }\n * ```\n *\n * Global steps are defined in standard Cucumber style.\n *\n * ```ts\n * // ./test/steps/my-steps.ts\n * import { Given, When, Then } from '@autometa/runner'\n *\n * Given('I have a step', () => {})\n * When('I do something', () => {})\n * Then('I expect something', () => {})\n * ```\n * @param filepath The absolute, relative, or 'feature root' path to the `.feature` file.\n * @param timeout The timeout in milliseconds to apply to all tests within the feature.\n */\nexport function Feature(filepath: string, timeout: number): FeatureScope;\n/**\n * Executes a gherkin `.feature` file. Assembles Tests\n * using the Cucumber file and globally defined Step Definitions.\n * Accepts a timeout as a `TestTimeout` which is a tuple of `[durationNumber, 'ms' | 's' | 'm' | 'h']`\n * which will be applied to all tests within the feature.\n *\n * i.e. `[10, 's']` is a 10 second timeout. `[1, 'm']` is a 1 minute timeout.\n *\n * ```ts\n * // using relative path\n * import { Feature } from '@autometa/runner'\n *\n * // 10 second timeout\n * Feature('../features/my-feature.feature', [10, 's'])\n * ```\n *\n * Steps will be automatically assembled from Globally defined Step Definitions,\n * if a step definition root and app root are defined.\n *\n * ```ts\n * import { defineConfig } from '@autometa/runner'\n *\n * defineConfig({\n * ...\n * roots: {\n * steps: ['./test/steps'],\n * app: ['./app'],\n * },\n * };\n *\n * ```\n *\n * @param filepath\n * @param timeout\n */\nexport function Feature(filepath: string, timeout: TestTimeout): FeatureScope;\n/**\n * Executes a gherkin `.feature` file. Assembles Tests\n * using the Cucumber file and optionally locally defined steps,\n * mixed with optionally globally defined Step Definitions.\n *\n * ```ts\n * import { Feature } from '@autometa/runner'\n *\n * Feature('My Feature', () => {\n * Given('I have a step', () => {})\n * When('I do something', () => {})\n * Then('I expect something', () => {})\n * })\n * ```\n *\n * If defined in the Gherkin, it will also use any Globally defined Step Definitions which match,\n * if none is defined locally. If a Step Definition is defined both globally and locally,\n * the most local definition will be used. This applies to sub-scopes like Scenarios and Rules\n * also.\n *\n * ```ts\n * import { Feature } from '@autometa/runner'\n *\n * Feature('My Feature', () => {\n * Given('I have a step', () => {})\n * When('I do something', () => {})\n * Then('I expect something', () => {})\n *\n * Scenario('My Scenario', () => {\n * Given('I have a step', () => {})\n * })\n *\n * Rule('My Rule', () => {\n * Given('I have a step', () => {})\n * })\n *\n * @param testDefinition\n * @param filepath\n */\nexport function Feature(\n testDefinition: FeatureAction,\n filepath: string\n): FeatureScope;\n/**\n * Executes a gherkin `.feature` file. Assembles Tests\n * using the Cucumber file and optionally locally defined steps,\n * mixed with optionally globally defined Step Definitions.\n * Accepts a timeout in milliseconds which will be applied to\n * all tests within the feature.\n *\n * ```ts\n * import { Feature } from '@autometa/runner'\n *\n * // 10 second timeout\n * Feature('My Feature', () => {\n * Given('I have a step', () => {})\n * When('I do something', () => {})\n * Then('I expect something', () => {})\n * }, 10_000)\n * ```\n * @param testDefinition the Feature definition callback\n * @param filepath\n * @param timeout\n */\nexport function Feature(\n testDefinition: FeatureAction,\n filepath: string,\n timeout: number\n): FeatureScope;\nexport function Feature(\n ...args: (FeatureAction | string | TestTimeout)[]\n): FeatureScope {\n return FeatureDefinition(...args);\n}\n\nexport function Scenario(title: string, action: ScenarioAction): ScenarioScope;\nexport function Scenario(\n title: string,\n action: ScenarioAction,\n timeout: number\n): ScenarioScope;\nexport function Scenario(\n title: string,\n action: ScenarioAction,\n timeout: SizedTimeout\n): ScenarioScope;\nexport function Scenario(\n ...args: (string | ScenarioAction | SizedTimeout | number)[]\n): ScenarioScope {\n return ScenarioDefinition(...args);\n}\n\nexport function ScenarioOutline(\n title: string,\n action: ScenarioAction\n): ScenarioScope;\nexport function ScenarioOutline(\n title: string,\n action: ScenarioAction,\n timeout: number\n): ScenarioScope;\nexport function ScenarioOutline(\n title: string,\n action: ScenarioAction,\n timeout: SizedTimeout\n): ScenarioScope;\nexport function ScenarioOutline(\n ...args: (string | ScenarioAction | SizedTimeout | number)[]\n): ScenarioScope {\n return ScenarioOutlineDefinition(...args);\n}\n\nexport function Rule(title: string, action: RuleAction): RuleScope;\nexport function Rule(\n title: string,\n action: RuleAction,\n timeout: number\n): RuleScope;\nexport function Rule(\n title: string,\n action: RuleAction,\n timeout: SizedTimeout\n): RuleScope;\nexport function Rule(\n ...args: (string | RuleAction | SizedTimeout | number)[]\n): RuleScope {\n return RuleDefinition(...args);\n}\n/**\n * Defines a `Given` step definition. Matches a gherkin step\n * as either a string literal match, or a Cucumber Expression.\n *\n * The callback function is passed as it's last (or only) argument\n * a copy of the `App` object which also contains a reference to the World.\n * This can be used to access features, or store data across steps within a test.\n *\n * N.b. The App instance is shared between all step definitions and hooks within\n * the context of a scenario, but cannot be accessed from the same step in a different\n * scenario.\n *\n * ```ts\n * import { Given } from '@autometa/runner'\n *\n * Given('I have a step', (app) => {\n * app.world.someData = 'some value'\n * })\n * // using destructuring\n * Given('I have a step', ({ world }) => {\n * world.someData = 'some value'\n * })\n * ```\n *\n * Steps also support Cucumber Expressions, which can be used to match\n * dynamic values in the step.\n *\n * ```ts\n * import { Given } from '@autometa/runner'\n *\n * // matches 'Given I have a step with a 'blue' value'\n * Given('I have a step with a {string} value', (value, { world }) => {\n * world.someData = value\n * })\n *\n * @param pattern The step pattern to match.\n * @param action The step action to execute.\n */\nexport const Given = GivenDefinition;\n/**\n * Defines a `When` step definition. Matches a gherkin step\n * as either a string literal match, or a Cucumber Expression.\n *\n * The callback function is passed as it's last (or only) argument\n * a copy of the `App` object which also contains a reference to the World.\n * This can be used to access features, or store data across steps within a test.\n *\n * N.b. The App instance is shared between all step definitions and hooks within\n *\n * ```ts\n * import { When } from '@autometa/runner'\n *\n * When('I do something', async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * When('I do something', async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * Steps also support Cucumber Expressions, which can be used to match\n * dynamic values in the step.\n *\n * ```ts\n * import { When } from '@autometa/runner'\n *\n * // matches 'When I do something with a 'blue' value'\n * When('I do something with a {string} value', async (value, { webdriver }) => {\n * await webdriver.click(`#some-button-${value}`)\n * })\n *\n * @param pattern The step pattern to match.\n * @param action The step action to execute.\n */\nexport const When = WhenDefinition;\n\n/**\n * Defines a `Then` step definition. Matches a gherkin step\n * as either a string literal match, or a Cucumber Expression.\n *\n * The callback function is passed as it's last (or only) argument\n * a copy of the `App` object which also contains a reference to the World.\n * This can be used to access features, or store data across steps within a test.\n *\n * N.b. The App instance is shared between all step definitions and hooks within\n *\n * ```ts\n * import { Then } from '@autometa/runner'\n *\n * Then('I expect something', async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * Then('I expect something', async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * Steps also support Cucumber Expressions, which can be used to match\n * dynamic values in the step.\n *\n * ```ts\n * import { Then } from '@autometa/runner'\n *\n * // matches 'Then I expect something with a 'blue' value'\n * Then('I expect something with a {string} value', async (value, { world }) => {\n * expect(world.someData).toBe(value)\n * })\n *\n * @param pattern The step pattern to match.\n * @param action The step action to execute.\n */\nexport const Then = ThenDefinition;\n\n/**\n * Defines a `Before` hook. Executes before each scenario.\n *\n * ```ts\n * import { Before } from '@autometa/runner'\n *\n * Before(async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * Before(async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * @param action The hook action to execute.\n */\nexport const Before = BeforeDefinition;\n\n/**\n * Defines a `After` hook. Executes after each scenario.\n *\n * ```ts\n * import { After } from '@autometa/runner'\n *\n * After(async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * After(async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * @param action The hook action to execute.\n */\nexport const After = AfterDefinition;\n\n/**\n * Defines a `Setup` hook. Executes before all scenarios.\n * Setups are scoped, meaning a Setup defined inside the scope of a rule\n * will only apply to scenarios within that rule.\n *\n * N.b the Setup Hook and Teardown Hook reference their own unique\n * copy of the App with it's own unique life cycle. Values stored here\n * will not be accessible in tests without a singleton fixture.\n *\n * ```ts\n * import { Setup } from '@autometa/runner'\n *\n * Setup(async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * Setup(async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * @param action The hook action to execute.\n */\nexport const Teardown = TeardownDefinition;\n\n/**\n * Defines a `Teardown` hook. Executes after all scenarios have completed.\n * Teardowns are scoped, meaning a Teardown defined inside the scope of a rule\n * will only apply to scenarios within that rule.\n *\n * N.b the Setup Hook and Teardown Hook reference their own unique\n * copy of the App with it's own unique life cycle. Values stored here\n * will not be accessible in tests without a singleston fixture.\n * ```ts\n * import { Teardown } from '@autometa/runner'\n *\n * Teardown(async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * Teardown(async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * @param action The hook action to execute.\n */\nexport const Setup = SetupDefinition;\n","import {\n Config,\n TestExecutorConfig,\n defineConfig as dc,\n} from \"@autometa/config\";\n\nexport const CONFIG = new Config(new Map<string, TestExecutorConfig>());\nexport const defineConfig = dc.bind(null, CONFIG);\n","import { ParameterTypeRegistry } from \"@cucumber/cucumber-expressions\";\nimport {\n BooleanParam,\n DateParam,\n NumberParam,\n PrimitiveParam,\n OrdinalParam,\n TextParam,\n defineParameterType as dpt,\n} from \"@autometa/cucumber-expressions\";\n\nexport const PARAM_REGISTRY = new ParameterTypeRegistry();\n\n/**\n * Defines a parameter type for use in step definitions.\n *\n * ```ts\n * import { Color } from '../support/color';\n *\n * defineParameterType({\n * name: \"color\",\n * regex: /red|blue|yellow/,\n * transform: (value: string) => Color(value)\n * })\n *\n * // using regex arrays\n * defineParameterType({\n * name: \"color\",\n * regex: [/red/, /blue/, /yellow/],\n * transform: (value: string) => Color(value)\n * })\n * ```\n */\nexport const defineParameterType = dpt.bind(null, PARAM_REGISTRY);\n\ndefineParameterType(\n NumberParam,\n BooleanParam,\n PrimitiveParam,\n TextParam,\n DateParam,\n OrdinalParam\n);\n","import { PARAM_REGISTRY } from \"./parameters\";\nimport { GetCucumberFunctions, Pass } from \"@autometa/scopes\";\nimport { Coordinator } from \"@autometa/coordinator\";\nimport { CONFIG } from \"./config\";\nimport { makeTestEmitter } from \"./events\";\nimport { executor } from \"./executor\";\nimport { OPTS } from \"./app\";\nconst {\n Feature,\n Scenario,\n ScenarioOutline,\n Rule,\n Given,\n When,\n Then,\n Before,\n After,\n Teardown,\n Setup,\n Global,\n} = GetCucumberFunctions(PARAM_REGISTRY);\nconst coordinator = new Coordinator(Global, CONFIG, OPTS);\nGlobal.onFeatureExecuted = (feature, caller) => {\n const groupLogger = CONFIG.current.test?.groupLogging ?? false;\n const events = makeTestEmitter({ groupLogger });\n coordinator.run(feature, caller, events, executor);\n};\n\nexport {\n Feature,\n Scenario,\n ScenarioOutline,\n Rule,\n Given,\n When,\n Then,\n Before,\n After,\n Teardown,\n Setup,\n Pass,\n};\n","import { TestEventEmitter } from \"@autometa/events\";\nimport { CONFIG } from \"./config\";\nexport * from \"@autometa/events\";\nimport { GroupLogEvents } from \"./event-logger\";\nimport p from \"path\";\nexport function makeTestEmitter(opts: { groupLogger: boolean }) {\n const events = CONFIG.current.events;\n const emitter = new TestEventEmitter();\n if (opts.groupLogger) {\n emitter.load(new GroupLogEvents());\n }\n if (!events) {\n return emitter;\n }\n\n for (const event of events) {\n const isLocal = isRelativePath(event) || isAbsolutePath(event);\n if (isLocal) {\n const uriRoot = process.cwd();\n const uri = p.join(uriRoot, event);\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const listener = require(uri);\n if (\"default\" in listener && typeof listener.default === \"function\") {\n emitter.load(new listener.default());\n return emitter;\n }\n if (\"default\" in listener && typeof listener.default === \"object\") {\n emitter.load(listener.default);\n return emitter;\n }\n if (typeof listener === \"function\") {\n emitter.load(new listener());\n return emitter;\n }\n emitter.load(listener);\n return emitter;\n }\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const listener = require(event);\n if (\"default\" in listener) {\n emitter.load(listener.default);\n return emitter;\n }\n emitter.load(listener);\n return emitter;\n }\n\n return emitter;\n}\n\nfunction isRelativePath(path: string) {\n return path.startsWith(\".\");\n}\n\nfunction isAbsolutePath(path: string) {\n return p.isAbsolute(path);\n}\n","import {\n EndAfterOpts,\n EndBeforeOpts,\n EndFeatureOpts,\n EndRuleOpts,\n EndScenarioOpts,\n EndScenarioOutlineOpts,\n EndSetupOpts,\n EndStepOpts,\n EndTeardownOpts,\n EventSubscriber,\n StartAfterOpts,\n StartBeforeOpts,\n StartFeatureOpts,\n StartRuleOpts,\n StartScenarioOpts,\n StartScenarioOutlineOpts,\n StartSetupOpts,\n StartStepOpts,\n StartTeardownOpts,\n} from \"@autometa/events\";\nimport colors from \"colors-cli\";\nexport class GroupLogEvents implements EventSubscriber {\n onFeatureStart({ title }: StartFeatureOpts) {\n console.group(title);\n console.group();\n }\n onFeatureEnd({ title, status }: EndFeatureOpts): void {\n console.groupEnd();\n console.log(colorStatus(status, `Ending ${title}`));\n console.groupEnd();\n }\n onScenarioStart({ title }: StartScenarioOpts): void {\n console.group(title);\n console.group();\n }\n onScenarioEnd({ title, status }: EndScenarioOpts): void {\n console.groupEnd();\n console.log(colorStatus(status, `Ending ${title}`));\n console.groupEnd();\n }\n onScenarioOutlineStart(opts: StartScenarioOutlineOpts): void {\n console.group(opts.title);\n console.group();\n }\n onScenarioOutlineEnd({ title, status }: EndScenarioOutlineOpts): void {\n console.groupEnd();\n console.log(colorStatus(status, `Ending ${title}`));\n console.groupEnd();\n }\n onRuleStart({ title }: StartRuleOpts): void {\n console.group(title);\n console.group();\n }\n onRuleEnd({ title, status }: EndRuleOpts): void {\n console.groupEnd();\n console.log(colorStatus(status, `Ending ${title}`));\n console.groupEnd();\n }\n onStepStart({ title }: StartStepOpts) {\n console.group(title);\n console.group();\n }\n onStepEnd({ title, status }: EndStepOpts) {\n console.groupEnd();\n console.log(colorStatus(status, `Ending ${title}`));\n console.groupEnd();\n }\n onBeforeStart({ title, status }: StartBeforeOpts): void {\n if (status === \"SKIPPED\") {\n return;\n }\n console.group(title);\n console.group();\n }\n onBeforeEnd({ title, status }: EndBeforeOpts): void {\n if (status === \"SKIPPED\") {\n return;\n }\n console.groupEnd();\n console.log(colorStatus(status, `Ending ${title}`));\n console.groupEnd();\n }\n onAfterStart({ title, status }: StartAfterOpts): void {\n if (status === \"SKIPPED\") {\n return;\n }\n console.group(title);\n console.group();\n }\n onAfterEnd({ title, status }: EndAfterOpts): void {\n if (status === \"SKIPPED\") {\n return;\n }\n console.groupEnd();\n console.log(colorStatus(status, `Ending ${title}`));\n console.groupEnd();\n }\n onTeardownStart({ title, status }: StartTeardownOpts): void {\n if (status === \"SKIPPED\") {\n return;\n }\n console.group(title);\n console.group();\n }\n onTeardownEnd({ title, status }: EndTeardownOpts): void {\n if (status === \"SKIPPED\") {\n return;\n }\n console.groupEnd();\n console.log(colorStatus(status, `Ending ${title}`));\n console.groupEnd();\n }\n onSetupStart({ title, status }: StartSetupOpts): void {\n if (status === \"SKIPPED\") {\n return;\n }\n console.group(title);\n console.group();\n }\n onSetupEnd({ title, status }: EndSetupOpts): void {\n if (status === \"SKIPPED\") {\n return;\n }\n console.groupEnd();\n console.log(colorStatus(status, `Ending ${title}`));\n console.groupEnd();\n }\n}\nfunction colorStatus(\n status: \"FAILED\" | \"PASSED\" | \"SKIPPED\" | \"BROKEN\" | undefined,\n text: string\n) {\n switch (status) {\n case \"FAILED\":\n return `${colors.red(\"x\")} ${text}`;\n case \"PASSED\":\n return `${colors.green(\"✔️\")} ${text}`;\n case \"SKIPPED\":\n return `${colors.yellow(\"⊘\")} ${text}`;\n default:\n return text;\n }\n}\n","import { execute } from \"@autometa/jest-executor\";\n\nexport const executor = execute;\n","import \"@autometa/types\";\nimport { AppType as at } from \"@autometa/app\";\nimport { CoordinatorOpts } from \"@autometa/coordinator\";\nexport { AutometaApp, AutometaWorld, App, World } from \"@autometa/app\";\nexport {\n Fixture,\n INJECTION_SCOPE,\n InjectionScope,\n Token,\n Container,\n Constructor,\n Inject,\n} from \"@autometa/injection\";\nexport const OPTS = {} as Record<string, CoordinatorOpts>;\n/**\n * Marks a class as being the `App` of the test framework. The `App` is the\n * entry point for the test framework. The App will be made available as the final\n * argument in the Step Definition Callbacks.\n *\n * ```ts\n *\n * @AppType(World)\n * @Constructor(MyClient)\n * class App {\n * constructor(readonly myCLient: MyClient) {}\n * }\n * ```\n * Or with tokens\n *\n * ```ts\n * import from \"@autometa/runner\";\n * import { World } from \"./default.world\";\n * @AppType(World)\n * @Constructor(HTTP, Token(\"MyClient\"))\n * class App {\n * constructor(readonly http: HTTP, readonly myClient: MyClient) {}\n * }\n * ```\n */\nexport const AppType = at.bind(null, OPTS);\nexport { getApp } from \"@autometa/app\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,eAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA,eAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAAAC;AAAA,EAAA,gBAAAC;AAAA,EAAA,uB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B,IAAM,OAAO,CAAC;AA0Bd,IAAM,UAAU,GAAG,KAAK,MAAM,IAAI;;;AJhCzC,IAAM;AAAA,EACJ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,IAAI,qBAAqB,cAAc;AACvC,IAAM,cAAc,IAAI,YAAY,QAAQ,QAAQ,IAAI;AACxD,OAAO,oBAAoB,CAAC,SAAS,WAAW;AAC9C,QAAM,cAAc,OAAO,QAAQ,MAAM,gBAAgB;AACzD,QAAM,SAAS,gBAAgB,EAAE,YAAY,CAAC;AAC9C,cAAY,IAAI,SAAS,QAAQ,QAAQ,QAAQ;AACnD;;;AH2BA,wBAAc;AA1Bd,cAAc;AAed,SAAS,OAAO,YAAY;AAC5B,SAAS,iBAAiB,aAAa;AACvC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,YAAY;AACrB,SAAS,aAAa;AAEtB,cAAc;AACd,cAAc;AACd;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,kBAAkB;AA0LpB,SAASC,YACX,MACW;AACd,SAAO,QAAkB,GAAG,IAAI;AAClC;AAaO,SAASC,aACX,MACY;AACf,SAAO,SAAmB,GAAG,IAAI;AACnC;AAgBO,SAASC,oBACX,MACY;AACf,SAAO,gBAA0B,GAAG,IAAI;AAC1C;AAaO,SAASC,SACX,MACQ;AACX,SAAO,KAAe,GAAG,IAAI;AAC/B;AAuCO,IAAMC,SAAQ;AAsCd,IAAMC,QAAO;AAuCb,IAAMC,QAAO;AAoBb,IAAMC,UAAS;AAoBf,IAAMC,SAAQ;AA0Bd,IAAMC,YAAW;AAyBjB,IAAMC,SAAQ;","names":["After","Before","Feature","Given","Rule","Scenario","ScenarioOutline","Setup","Teardown","Then","When","listener","Feature","Scenario","ScenarioOutline","Rule","Given","When","Then","Before","After","Teardown","Setup"]}
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/config.ts","../../src/parameters.ts","../../src/scopes.ts","../../src/events.ts","../../src/event-logger.ts","../../src/executor.ts","../../src/app.ts"],"sourcesContent":["import type {\n FeatureAction,\n FeatureScope,\n ScenarioAction,\n ScenarioScope,\n SizedTimeout,\n TestTimeout,\n} from \"@autometa/scopes\";\n\nexport { defineConfig } from \"./config\";\nexport { defineParameterType } from \"./parameters\";\nimport {\n Feature as FeatureDefinition,\n Scenario as ScenarioDefinition,\n ScenarioOutline as ScenarioOutlineDefinition,\n Rule as RuleDefinition,\n Given as GivenDefinition,\n When as WhenDefinition,\n Then as ThenDefinition,\n Before as BeforeDefinition,\n After as AfterDefinition,\n Teardown as TeardownDefinition,\n Setup as SetupDefinition,\n BeforeFeature as BeforeFeatureDefinition,\n AfterFeature as AfterFeatureDefinition,\n BeforeScenarioOutline as BeforeScenarioOutlineDefinition,\n AfterScenarioOutline as AfterScenarioOutlineDefinition,\n BeforeExamples as BeforeExamplesDefinition,\n AfterExamples as AfterExamplesDefinition,\n BeforeRule as BeforeRuleDefinition,\n AfterRule as AfterRuleDefinition,\n} from \"./scopes\";\nimport { RuleAction } from \"@autometa/scopes\";\nimport { RuleScope } from \"@autometa/scopes\";\nexport { Pass } from \"./scopes\";\nexport * from \"@autometa/phrases\";\nexport {\n AppType,\n Fixture,\n Container,\n Constructor,\n AutometaApp,\n getApp,\n AutometaWorld,\n App,\n World,\n INJECTION_SCOPE,\n InjectionScope,\n Inject,\n} from \"./app\";\nexport { Dates, Time } from \"@autometa/datetime\";\nexport { AutomationError, raise } from \"@autometa/errors\";\nexport {\n DataTable,\n HTable,\n VTable,\n MTable,\n TableDocument,\n} from \"@autometa/gherkin\";\nexport { Bind } from \"@autometa/bind-decorator\";\nexport { Types } from \"@autometa/scopes\";\nexport * from \"./events\";\nexport * from \"@autometa/http\";\nexport * from \"@autometa/asserters\";\nexport {\n GetAccessedCount,\n GetAssignedValues,\n TrackAccess,\n} from \"@autometa/fixture-proxies\";\n\nexport { FileObject } from \"@autometa/file-proxies\";\n/**\n * Executes a gherkin `.feature` file. Assembles Tests\n * using the Cucumber file and globally defined Step Definitions.\n *\n * ``ts\n * // using relative path\n * import { Feature } from '@autometa/runner'\n *\n * Feature('../features/my-feature.feature')\n * ```\n *\n * Steps will be automatically assembled from Globally defined Step Definitions,\n * if a step definition root and app root are defined.\n *\n * ```ts\n * import { defineConfig } from '@autometa/runner'\n *\n * defineConfig({\n * ...\n * roots: {\n * steps: ['./test/steps'],\n * app: ['./app'],\n * },\n * }\n * ```\n *\n * Global steps are defined in standard Cucumber stle.\n * ```ts\n * // ./test/steps/my-steps.ts\n * import { Given, When, Then } from '@autometa/runner'\n *\n * Given('I have a step', () => {})\n * When('I do something', () => {})\n * Then('I expect something', () => {})\n * ```\n * @param filepath The absolute, relative, or 'feature root' path to the `.feature` file.\n */\nexport function Feature(filepath: string): FeatureScope;\n/**\n * Executes a gherkin `.feature` file. Assembles Tests\n * using the Cucumber file and globally defined Step Definitions.\n * Accepts a timeout in milliseconds which will be applied to\n * all tests within the feature.\n *\n * ```ts\n * // using relative path\n * import { Feature } from '@autometa/runner'\n * // 10 second timeout\n * Feature('../features/my-feature.feature', 10_000)\n * ```\n *\n * Steps will be automatically assembled from Globally defined Step Definitions,\n * if a step definition root and app root are defined.\n *\n * ```ts\n * import { defineConfig } from '@autometa/runner'\n *\n * defineConfig({\n * ...\n * roots: {\n * steps: ['./test/steps'],\n * app: ['./app'],\n * },\n * }\n * ```\n *\n * Global steps are defined in standard Cucumber style.\n *\n * ```ts\n * // ./test/steps/my-steps.ts\n * import { Given, When, Then } from '@autometa/runner'\n *\n * Given('I have a step', () => {})\n * When('I do something', () => {})\n * Then('I expect something', () => {})\n * ```\n * @param filepath The absolute, relative, or 'feature root' path to the `.feature` file.\n * @param timeout The timeout in milliseconds to apply to all tests within the feature.\n */\nexport function Feature(filepath: string, timeout: number): FeatureScope;\n/**\n * Executes a gherkin `.feature` file. Assembles Tests\n * using the Cucumber file and globally defined Step Definitions.\n * Accepts a timeout as a `TestTimeout` which is a tuple of `[durationNumber, 'ms' | 's' | 'm' | 'h']`\n * which will be applied to all tests within the feature.\n *\n * i.e. `[10, 's']` is a 10 second timeout. `[1, 'm']` is a 1 minute timeout.\n *\n * ```ts\n * // using relative path\n * import { Feature } from '@autometa/runner'\n *\n * // 10 second timeout\n * Feature('../features/my-feature.feature', [10, 's'])\n * ```\n *\n * Steps will be automatically assembled from Globally defined Step Definitions,\n * if a step definition root and app root are defined.\n *\n * ```ts\n * import { defineConfig } from '@autometa/runner'\n *\n * defineConfig({\n * ...\n * roots: {\n * steps: ['./test/steps'],\n * app: ['./app'],\n * },\n * };\n *\n * ```\n *\n * @param filepath\n * @param timeout\n */\nexport function Feature(filepath: string, timeout: TestTimeout): FeatureScope;\n/**\n * Executes a gherkin `.feature` file. Assembles Tests\n * using the Cucumber file and optionally locally defined steps,\n * mixed with optionally globally defined Step Definitions.\n *\n * ```ts\n * import { Feature } from '@autometa/runner'\n *\n * Feature('My Feature', () => {\n * Given('I have a step', () => {})\n * When('I do something', () => {})\n * Then('I expect something', () => {})\n * })\n * ```\n *\n * If defined in the Gherkin, it will also use any Globally defined Step Definitions which match,\n * if none is defined locally. If a Step Definition is defined both globally and locally,\n * the most local definition will be used. This applies to sub-scopes like Scenarios and Rules\n * also.\n *\n * ```ts\n * import { Feature } from '@autometa/runner'\n *\n * Feature('My Feature', () => {\n * Given('I have a step', () => {})\n * When('I do something', () => {})\n * Then('I expect something', () => {})\n *\n * Scenario('My Scenario', () => {\n * Given('I have a step', () => {})\n * })\n *\n * Rule('My Rule', () => {\n * Given('I have a step', () => {})\n * })\n *\n * @param testDefinition\n * @param filepath\n */\nexport function Feature(\n testDefinition: FeatureAction,\n filepath: string\n): FeatureScope;\n/**\n * Executes a gherkin `.feature` file. Assembles Tests\n * using the Cucumber file and optionally locally defined steps,\n * mixed with optionally globally defined Step Definitions.\n * Accepts a timeout in milliseconds which will be applied to\n * all tests within the feature.\n *\n * ```ts\n * import { Feature } from '@autometa/runner'\n *\n * // 10 second timeout\n * Feature('My Feature', () => {\n * Given('I have a step', () => {})\n * When('I do something', () => {})\n * Then('I expect something', () => {})\n * }, 10_000)\n * ```\n * @param testDefinition the Feature definition callback\n * @param filepath\n * @param timeout\n */\nexport function Feature(\n testDefinition: FeatureAction,\n filepath: string,\n timeout: number\n): FeatureScope;\nexport function Feature(\n ...args: (FeatureAction | string | TestTimeout)[]\n): FeatureScope {\n return FeatureDefinition(...args);\n}\n\nexport function Scenario(title: string, action: ScenarioAction): ScenarioScope;\nexport function Scenario(\n title: string,\n action: ScenarioAction,\n timeout: number\n): ScenarioScope;\nexport function Scenario(\n title: string,\n action: ScenarioAction,\n timeout: SizedTimeout\n): ScenarioScope;\nexport function Scenario(\n ...args: (string | ScenarioAction | SizedTimeout | number)[]\n): ScenarioScope {\n return ScenarioDefinition(...args);\n}\n\nexport function ScenarioOutline(\n title: string,\n action: ScenarioAction\n): ScenarioScope;\nexport function ScenarioOutline(\n title: string,\n action: ScenarioAction,\n timeout: number\n): ScenarioScope;\nexport function ScenarioOutline(\n title: string,\n action: ScenarioAction,\n timeout: SizedTimeout\n): ScenarioScope;\nexport function ScenarioOutline(\n ...args: (string | ScenarioAction | SizedTimeout | number)[]\n): ScenarioScope {\n return ScenarioOutlineDefinition(...args);\n}\n\nexport function Rule(title: string, action: RuleAction): RuleScope;\nexport function Rule(\n title: string,\n action: RuleAction,\n timeout: number\n): RuleScope;\nexport function Rule(\n title: string,\n action: RuleAction,\n timeout: SizedTimeout\n): RuleScope;\nexport function Rule(\n ...args: (string | RuleAction | SizedTimeout | number)[]\n): RuleScope {\n return RuleDefinition(...args);\n}\n/**\n * Defines a `Given` step definition. Matches a gherkin step\n * as either a string literal match, or a Cucumber Expression.\n *\n * The callback function is passed as it's last (or only) argument\n * a copy of the `App` object which also contains a reference to the World.\n * This can be used to access features, or store data across steps within a test.\n *\n * N.b. The App instance is shared between all step definitions and hooks within\n * the context of a scenario, but cannot be accessed from the same step in a different\n * scenario.\n *\n * ```ts\n * import { Given } from '@autometa/runner'\n *\n * Given('I have a step', (app) => {\n * app.world.someData = 'some value'\n * })\n * // using destructuring\n * Given('I have a step', ({ world }) => {\n * world.someData = 'some value'\n * })\n * ```\n *\n * Steps also support Cucumber Expressions, which can be used to match\n * dynamic values in the step.\n *\n * ```ts\n * import { Given } from '@autometa/runner'\n *\n * // matches 'Given I have a step with a 'blue' value'\n * Given('I have a step with a {string} value', (value, { world }) => {\n * world.someData = value\n * })\n *\n * @param pattern The step pattern to match.\n * @param action The step action to execute.\n */\nexport const Given = GivenDefinition;\n/**\n * Defines a `When` step definition. Matches a gherkin step\n * as either a string literal match, or a Cucumber Expression.\n *\n * The callback function is passed as it's last (or only) argument\n * a copy of the `App` object which also contains a reference to the World.\n * This can be used to access features, or store data across steps within a test.\n *\n * N.b. The App instance is shared between all step definitions and hooks within\n *\n * ```ts\n * import { When } from '@autometa/runner'\n *\n * When('I do something', async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * When('I do something', async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * Steps also support Cucumber Expressions, which can be used to match\n * dynamic values in the step.\n *\n * ```ts\n * import { When } from '@autometa/runner'\n *\n * // matches 'When I do something with a 'blue' value'\n * When('I do something with a {string} value', async (value, { webdriver }) => {\n * await webdriver.click(`#some-button-${value}`)\n * })\n *\n * @param pattern The step pattern to match.\n * @param action The step action to execute.\n */\nexport const When = WhenDefinition;\n\n/**\n * Defines a `Then` step definition. Matches a gherkin step\n * as either a string literal match, or a Cucumber Expression.\n *\n * The callback function is passed as it's last (or only) argument\n * a copy of the `App` object which also contains a reference to the World.\n * This can be used to access features, or store data across steps within a test.\n *\n * N.b. The App instance is shared between all step definitions and hooks within\n *\n * ```ts\n * import { Then } from '@autometa/runner'\n *\n * Then('I expect something', async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * Then('I expect something', async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * Steps also support Cucumber Expressions, which can be used to match\n * dynamic values in the step.\n *\n * ```ts\n * import { Then } from '@autometa/runner'\n *\n * // matches 'Then I expect something with a 'blue' value'\n * Then('I expect something with a {string} value', async (value, { world }) => {\n * expect(world.someData).toBe(value)\n * })\n *\n * @param pattern The step pattern to match.\n * @param action The step action to execute.\n */\nexport const Then = ThenDefinition;\n\n/**\n * Defines a `Before` hook. Executes before each scenario.\n *\n * ```ts\n * import { Before } from '@autometa/runner'\n *\n * Before(async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * Before(async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * @param action The hook action to execute.\n */\nexport const Before = BeforeDefinition;\n\n/**\n * Defines a `After` hook. Executes after each scenario.\n *\n * ```ts\n * import { After } from '@autometa/runner'\n *\n * After(async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * After(async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * @param action The hook action to execute.\n */\nexport const After = AfterDefinition;\n\n/**\n * Defines a `Setup` hook. Executes before all scenarios.\n * Setups are scoped, meaning a Setup defined inside the scope of a rule\n * will only apply to scenarios within that rule.\n *\n * N.b the Setup Hook and Teardown Hook reference their own unique\n * copy of the App with it's own unique life cycle. Values stored here\n * will not be accessible in tests without a singleton fixture.\n *\n * ```ts\n * import { Setup } from '@autometa/runner'\n *\n * Setup(async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * Setup(async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * @param action The hook action to execute.\n */\nexport const Teardown = TeardownDefinition;\n\n/**\n * Defines a `Teardown` hook. Executes after all scenarios have completed.\n * Teardowns are scoped, meaning a Teardown defined inside the scope of a rule\n * will only apply to scenarios within that rule.\n *\n * N.b the Setup Hook and Teardown Hook reference their own unique\n * copy of the App with it's own unique life cycle. Values stored here\n * will not be accessible in tests without a singleston fixture.\n * ```ts\n * import { Teardown } from '@autometa/runner'\n *\n * Teardown(async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * Teardown(async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * @param action The hook action to execute.\n */\nexport const Setup = SetupDefinition;\n\n/**\n * Defines a `BeforeFeature` hook. Executes before each feature.\n *\n * ```ts\n * import { BeforeFeature } from '@autometa/runner'\n *\n * BeforeFeature(async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * BeforeFeature(async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * @param action The hook action to execute.\n */\nexport const BeforeFeature = BeforeFeatureDefinition;\n\n/**\n * Defines a `AfterFeature` hook. Executes after each feature.\n *\n * ```ts\n * import { AfterFeature } from '@autometa/runner'\n *\n * AfterFeature(async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * AfterFeature(async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * @param action The hook action to execute.\n */\nexport const AfterFeature = AfterFeatureDefinition;\n\n/**\n * Defines a `BeforeScenarioOutline` hook. Executes before each scenario outline.\n *\n * ```ts\n * import { BeforeScenarioOutline } from '@autometa/runner'\n *\n * BeforeScenarioOutline(async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * BeforeScenarioOutline(async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * @param action The hook action to execute.\n */\nexport const BeforeScenarioOutline = BeforeScenarioOutlineDefinition;\n\n/**\n * Defines a `AfterScenarioOutline` hook. Executes after each scenario outline.\n *\n * ```ts\n * import { AfterScenarioOutline } from '@autometa/runner'\n *\n * AfterScenarioOutline(async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * AfterScenarioOutline(async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * @param action The hook action to execute.\n */\n\nexport const AfterScenarioOutline = AfterScenarioOutlineDefinition;\n\n/**\n * Defines a `BeforeExamples` hook. Executes before each examples table.\n *\n * ```ts\n * import { BeforeExamples } from '@autometa/runner'\n *\n * BeforeExamples(async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * BeforeExamples(async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * @param action The hook action to execute.\n */\n\nexport const BeforeExamples = BeforeExamplesDefinition;\n\n/**\n * Defines a `AfterExamples` hook. Executes after each examples table.\n *\n * ```ts\n * import { AfterExamples } from '@autometa/runner'\n *\n * AfterExamples(async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * AfterExamples(async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * @param action The hook action to execute.\n */\nexport const AfterExamples = AfterExamplesDefinition;\n\n/**\n * Defines a `BeforeRule` hook. Executes before each rule.\n *\n * ```ts\n * import { BeforeRule } from '@autometa/runner'\n *\n * BeforeRule(async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * BeforeRule(async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * @param action The hook action to execute.\n */\n\nexport const BeforeRule = BeforeRuleDefinition;\n\n/**\n * Defines a `AfterRule` hook. Executes after each rule.\n *\n * ```ts\n * import { AfterRule } from '@autometa/runner'\n *\n * AfterRule(async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * AfterRule(async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * @param action The hook action to execute.\n */\n\nexport const AfterRule = AfterRuleDefinition;\n","import {\n Config,\n TestExecutorConfig,\n defineConfig as dc,\n} from \"@autometa/config\";\n\nexport const CONFIG = new Config(new Map<string, TestExecutorConfig>());\nexport const defineConfig = dc.bind(null, CONFIG);\n","import { ParameterTypeRegistry } from \"@cucumber/cucumber-expressions\";\nimport {\n BooleanParam,\n DateParam,\n NumberParam,\n PrimitiveParam,\n OrdinalParam,\n TextParam,\n defineParameterType as dpt,\n} from \"@autometa/cucumber-expressions\";\n\nexport const PARAM_REGISTRY = new ParameterTypeRegistry();\n\n/**\n * Defines a parameter type for use in step definitions.\n *\n * ```ts\n * import { Color } from '../support/color';\n *\n * defineParameterType({\n * name: \"color\",\n * regex: /red|blue|yellow/,\n * transform: (value: string) => Color(value)\n * })\n *\n * // using regex arrays\n * defineParameterType({\n * name: \"color\",\n * regex: [/red/, /blue/, /yellow/],\n * transform: (value: string) => Color(value)\n * })\n * ```\n */\nexport const defineParameterType = dpt.bind(null, PARAM_REGISTRY);\n\ndefineParameterType(\n NumberParam,\n BooleanParam,\n PrimitiveParam,\n TextParam,\n DateParam,\n OrdinalParam\n);\n","import { PARAM_REGISTRY } from \"./parameters\";\nimport { GetCucumberFunctions, Pass } from \"@autometa/scopes\";\nimport { Coordinator } from \"@autometa/coordinator\";\nimport { CONFIG } from \"./config\";\nimport { makeTestEmitter } from \"./events\";\nimport { executor } from \"./executor\";\nimport { OPTS } from \"./app\";\nconst {\n BeforeFeature,\n AfterFeature,\n BeforeScenarioOutline,\n AfterScenarioOutline,\n BeforeExamples,\n AfterExamples,\n BeforeRule,\n AfterRule,\n Feature,\n Scenario,\n ScenarioOutline,\n Rule,\n Given,\n When,\n Then,\n Before,\n After,\n Teardown,\n Setup,\n Global,\n} = GetCucumberFunctions(PARAM_REGISTRY);\nconst coordinator = new Coordinator(Global, CONFIG, OPTS);\nGlobal.onFeatureExecuted = (feature, caller) => {\n const groupLogger = CONFIG.current.test?.groupLogging ?? false;\n const events = makeTestEmitter({ groupLogger });\n coordinator.run(feature, caller, events, executor);\n};\n\nexport {\n Feature,\n Scenario,\n ScenarioOutline,\n Rule,\n Given,\n When,\n Then,\n Before,\n After,\n Teardown,\n Setup,\n BeforeFeature,\n AfterFeature,\n BeforeScenarioOutline,\n AfterScenarioOutline,\n BeforeExamples,\n AfterExamples,\n BeforeRule,\n AfterRule,\n Pass,\n};\n","import { TestEventEmitter } from \"@autometa/events\";\nimport { CONFIG } from \"./config\";\nexport * from \"@autometa/events\";\nimport { GroupLogEvents } from \"./event-logger\";\nimport p from \"path\";\nexport function makeTestEmitter(opts: { groupLogger: boolean }) {\n const events = CONFIG.current.events;\n const emitter = new TestEventEmitter();\n if (opts.groupLogger) {\n emitter.load(new GroupLogEvents());\n }\n if (!events) {\n return emitter;\n }\n\n for (const event of events) {\n const isLocal = isRelativePath(event) || isAbsolutePath(event);\n if (isLocal) {\n const uriRoot = process.cwd();\n const uri = p.join(uriRoot, event);\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const listener = require(uri);\n if (\"default\" in listener && typeof listener.default === \"function\") {\n emitter.load(new listener.default());\n return emitter;\n }\n if (\"default\" in listener && typeof listener.default === \"object\") {\n emitter.load(listener.default);\n return emitter;\n }\n if (typeof listener === \"function\") {\n emitter.load(new listener());\n return emitter;\n }\n emitter.load(listener);\n return emitter;\n }\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const listener = require(event);\n if (\"default\" in listener) {\n emitter.load(listener.default);\n return emitter;\n }\n emitter.load(listener);\n return emitter;\n }\n\n return emitter;\n}\n\nfunction isRelativePath(path: string) {\n return path.startsWith(\".\");\n}\n\nfunction isAbsolutePath(path: string) {\n return p.isAbsolute(path);\n}\n","import {\n EndAfterOpts,\n EndBeforeOpts,\n EndFeatureOpts,\n EndRuleOpts,\n EndScenarioOpts,\n EndScenarioOutlineOpts,\n EndSetupOpts,\n EndStepOpts,\n EndTeardownOpts,\n EventSubscriber,\n StartAfterOpts,\n StartBeforeOpts,\n StartFeatureOpts,\n StartRuleOpts,\n StartScenarioOpts,\n StartScenarioOutlineOpts,\n StartSetupOpts,\n StartStepOpts,\n StartTeardownOpts,\n} from \"@autometa/events\";\nimport colors from \"colors-cli\";\nexport class GroupLogEvents implements EventSubscriber {\n onFeatureStart({ title }: StartFeatureOpts) {\n console.group(title);\n console.group();\n }\n onFeatureEnd({ title, status }: EndFeatureOpts): void {\n console.groupEnd();\n console.log(colorStatus(status, `Ending ${title}`));\n console.groupEnd();\n }\n onScenarioStart({ title }: StartScenarioOpts): void {\n console.group(title);\n console.group();\n }\n onScenarioEnd({ title, status }: EndScenarioOpts): void {\n console.groupEnd();\n console.log(colorStatus(status, `Ending ${title}`));\n console.groupEnd();\n }\n onScenarioOutlineStart(opts: StartScenarioOutlineOpts): void {\n console.group(opts.title);\n console.group();\n }\n onScenarioOutlineEnd({ title, status }: EndScenarioOutlineOpts): void {\n console.groupEnd();\n console.log(colorStatus(status, `Ending ${title}`));\n console.groupEnd();\n }\n onRuleStart({ title }: StartRuleOpts): void {\n console.group(title);\n console.group();\n }\n onRuleEnd({ title, status }: EndRuleOpts): void {\n console.groupEnd();\n console.log(colorStatus(status, `Ending ${title}`));\n console.groupEnd();\n }\n onStepStart({ title }: StartStepOpts) {\n console.group(title);\n console.group();\n }\n onStepEnd({ title, status }: EndStepOpts) {\n console.groupEnd();\n console.log(colorStatus(status, `Ending ${title}`));\n console.groupEnd();\n }\n onBeforeStart({ title, status }: StartBeforeOpts): void {\n if (status === \"SKIPPED\") {\n return;\n }\n console.group(title);\n console.group();\n }\n onBeforeEnd({ title, status }: EndBeforeOpts): void {\n if (status === \"SKIPPED\") {\n return;\n }\n console.groupEnd();\n console.log(colorStatus(status, `Ending ${title}`));\n console.groupEnd();\n }\n onAfterStart({ title, status }: StartAfterOpts): void {\n if (status === \"SKIPPED\") {\n return;\n }\n console.group(title);\n console.group();\n }\n onAfterEnd({ title, status }: EndAfterOpts): void {\n if (status === \"SKIPPED\") {\n return;\n }\n console.groupEnd();\n console.log(colorStatus(status, `Ending ${title}`));\n console.groupEnd();\n }\n onTeardownStart({ title, status }: StartTeardownOpts): void {\n if (status === \"SKIPPED\") {\n return;\n }\n console.group(title);\n console.group();\n }\n onTeardownEnd({ title, status }: EndTeardownOpts): void {\n if (status === \"SKIPPED\") {\n return;\n }\n console.groupEnd();\n console.log(colorStatus(status, `Ending ${title}`));\n console.groupEnd();\n }\n onSetupStart({ title, status }: StartSetupOpts): void {\n if (status === \"SKIPPED\") {\n return;\n }\n console.group(title);\n console.group();\n }\n onSetupEnd({ title, status }: EndSetupOpts): void {\n if (status === \"SKIPPED\") {\n return;\n }\n console.groupEnd();\n console.log(colorStatus(status, `Ending ${title}`));\n console.groupEnd();\n }\n onBeforeFeatureStart(opts: StartFeatureOpts): void {\n console.group(opts.title);\n console.group();\n }\n\n onBeforeFeatureEnd(opts: EndFeatureOpts): void {\n console.groupEnd();\n console.log(colorStatus(opts.status, `Ending ${opts.title}`));\n console.groupEnd();\n }\n\n onAfterFeatureStart(opts: StartFeatureOpts): void {\n console.group(opts.title);\n console.group();\n }\n\n onAfterFeatureEnd(opts: EndFeatureOpts): void {\n console.groupEnd();\n console.log(colorStatus(opts.status, `Ending ${opts.title}`));\n console.groupEnd();\n }\n\n onBeforeRuleStart(opts: StartRuleOpts): void {\n console.group(opts.title);\n console.group();\n }\n\n onBeforeRuleEnd(opts: EndRuleOpts): void {\n console.groupEnd();\n console.log(colorStatus(opts.status, `Ending ${opts.title}`));\n console.groupEnd();\n }\n\n onAfterRuleStart(opts: StartRuleOpts): void {\n console.group(opts.title);\n console.group();\n }\n\n onAfterRuleEnd(opts: EndRuleOpts): void {\n console.groupEnd();\n console.log(colorStatus(opts.status, `Ending ${opts.title}`));\n console.groupEnd();\n }\n\n onBeforeScenarioOutlineStart(opts: StartScenarioOutlineOpts): void {\n console.group(opts.title);\n console.group();\n }\n\n onBeforeScenarioOutlineEnd(opts: EndScenarioOpts): void {\n console.groupEnd();\n console.log(colorStatus(opts.status, `Ending ${opts.title}`));\n console.groupEnd();\n }\n\n onBeforeExamplesStart(opts: StartScenarioOutlineOpts): void {\n console.group(opts.title);\n console.group();\n }\n\n onBeforeExamplesEnd(opts: EndScenarioOpts): void {\n console.groupEnd();\n console.log(colorStatus(opts.status, `Ending ${opts.title}`));\n console.groupEnd();\n }\n\n onAfterExamplesStart(opts: StartScenarioOutlineOpts): void {\n console.group(opts.title);\n console.group();\n }\n\n onAfterExamplesEnd(opts: EndScenarioOpts): void {\n console.groupEnd();\n console.log(colorStatus(opts.status, `Ending ${opts.title}`));\n console.groupEnd();\n }\n}\nfunction colorStatus(\n status: \"FAILED\" | \"PASSED\" | \"SKIPPED\" | \"BROKEN\" | undefined,\n text: string\n) {\n switch (status) {\n case \"FAILED\":\n return `${colors.red(\"x\")} ${text}`;\n case \"PASSED\":\n return `${colors.green(\"✔️\")} ${text}`;\n case \"SKIPPED\":\n return `${colors.yellow(\"⊘\")} ${text}`;\n default:\n return text;\n }\n}\n","import { execute } from \"@autometa/jest-executor\";\n\nexport const executor = execute;\n","import \"@autometa/types\";\nimport { AppType as at } from \"@autometa/app\";\nimport { CoordinatorOpts } from \"@autometa/coordinator\";\nexport { AutometaApp, AutometaWorld, App, World } from \"@autometa/app\";\nexport {\n Fixture,\n INJECTION_SCOPE,\n InjectionScope,\n Token,\n Container,\n Constructor,\n Inject,\n} from \"@autometa/injection\";\nexport const OPTS = {} as Record<string, CoordinatorOpts>;\n/**\n * Marks a class as being the `App` of the test framework. The `App` is the\n * entry point for the test framework. The App will be made available as the final\n * argument in the Step Definition Callbacks.\n *\n * ```ts\n *\n * @AppType(World)\n * @Constructor(MyClient)\n * class App {\n * constructor(readonly myCLient: MyClient) {}\n * }\n * ```\n * Or with tokens\n *\n * ```ts\n * import from \"@autometa/runner\";\n * import { World } from \"./default.world\";\n * @AppType(World)\n * @Constructor(HTTP, Token(\"MyClient\"))\n * class App {\n * constructor(readonly http: HTTP, readonly myClient: MyClient) {}\n * }\n * ```\n */\nexport const AppType = at.bind(null, OPTS);\nexport { getApp } from \"@autometa/app\";\nexport { DisposeMethod } from \"@autometa/injection\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;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AI,YAAY,QAAQ,QAAQ,IAAI;AACxD,OAAO,oBAAoB,CAAC,SAAS,WAAW;AAC9C,QAAM,cAAc,OAAO,QAAQ,MAAM,gBAAgB;AACzD,QAAM,SAAS,gBAAgB,EAAE,YAAY,CAAC;AAC9C,cAAY,IAAI,SAAS,QAAQ,QAAQ,QAAQ;AACnD;;;AH2BA,wBAAc;AA1Bd,cAAc;AAed,SAAS,OAAO,YAAY;AAC5B,SAAS,iBAAiB,aAAa;AACvC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,YAAY;AACrB,SAAS,aAAa;AAEtB,cAAc;AACd,cAAc;AACd;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,kBAAkB;AA0LpB,SAASC,YACX,MACW;AACd,SAAO,QAAkB,GAAG,IAAI;AAClC;AAaO,SAASC,aACX,MACY;AACf,SAAO,SAAmB,GAAG,IAAI;AACnC;AAgBO,SAASC,oBACX,MACY;AACf,SAAO,gBAA0B,GAAG,IAAI;AAC1C;AAaO,SAASC,SACX,MACQ;AACX,SAAO,KAAe,GAAG,IAAI;AAC/B;AAuCO,IAAMC,SAAQ;AAsCd,IAAMC,QAAO;AAuCb,IAAMC,QAAO;AAoBb,IAAMC,UAAS;AAoBf,IAAMC,SAAQ;AA0Bd,IAAMC,YAAW;AAyBjB,IAAMC,SAAQ;AAoBd,IAAMC,iBAAgB;AAoBtB,IAAMC,gBAAe;AAoBrB,IAAMC,yBAAwB;AAqB9B,IAAMC,wBAAuB;AAqB7B,IAAMC,kBAAiB;AAoBvB,IAAMC,iBAAgB;AAqBtB,IAAMC,cAAa;AAqBnB,IAAMC,aAAY;","names":["After","AfterExamples","AfterFeature","AfterRule","AfterScenarioOutline","Before","BeforeExamples","BeforeFeature","BeforeRule","BeforeScenarioOutline","Feature","Given","Rule","Scenario","ScenarioOutline","Setup","Teardown","Then","When","listener","Feature","Scenario","ScenarioOutline","Rule","Given","When","Then","Before","After","Teardown","Setup","BeforeFeature","AfterFeature","BeforeScenarioOutline","AfterScenarioOutline","BeforeExamples","AfterExamples","BeforeRule","AfterRule"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -518,5 +518,157 @@ declare const Setup: {
|
|
|
518
518
|
(description: string, action: _autometa_scopes.HookAction, tagFilterExpression: string, timeout: SizedTimeout): _autometa_scopes.SetupHook;
|
|
519
519
|
(description: string, action: _autometa_scopes.HookAction, timeout: SizedTimeout): _autometa_scopes.SetupHook;
|
|
520
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;
|
|
521
673
|
|
|
522
|
-
export { After, AppType, Before, Feature, Given, Rule, Scenario, ScenarioOutline, Setup, Teardown, Then, When, defineConfig, defineParameterType, makeTestEmitter };
|
|
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/dist/index.d.ts
CHANGED
|
@@ -518,5 +518,157 @@ declare const Setup: {
|
|
|
518
518
|
(description: string, action: _autometa_scopes.HookAction, tagFilterExpression: string, timeout: SizedTimeout): _autometa_scopes.SetupHook;
|
|
519
519
|
(description: string, action: _autometa_scopes.HookAction, timeout: SizedTimeout): _autometa_scopes.SetupHook;
|
|
520
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;
|
|
521
673
|
|
|
522
|
-
export { After, AppType, Before, Feature, Given, Rule, Scenario, ScenarioOutline, Setup, Teardown, Then, When, defineConfig, defineParameterType, makeTestEmitter };
|
|
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/dist/index.js
CHANGED
|
@@ -32,12 +32,20 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
32
32
|
var src_exports = {};
|
|
33
33
|
__export(src_exports, {
|
|
34
34
|
After: () => After2,
|
|
35
|
+
AfterExamples: () => AfterExamples2,
|
|
36
|
+
AfterFeature: () => AfterFeature2,
|
|
37
|
+
AfterRule: () => AfterRule2,
|
|
38
|
+
AfterScenarioOutline: () => AfterScenarioOutline2,
|
|
35
39
|
App: () => import_app2.App,
|
|
36
40
|
AppType: () => AppType,
|
|
37
41
|
AutomationError: () => import_errors.AutomationError,
|
|
38
42
|
AutometaApp: () => import_app2.AutometaApp,
|
|
39
43
|
AutometaWorld: () => import_app2.AutometaWorld,
|
|
40
44
|
Before: () => Before2,
|
|
45
|
+
BeforeExamples: () => BeforeExamples2,
|
|
46
|
+
BeforeFeature: () => BeforeFeature2,
|
|
47
|
+
BeforeRule: () => BeforeRule2,
|
|
48
|
+
BeforeScenarioOutline: () => BeforeScenarioOutline2,
|
|
41
49
|
Bind: () => import_bind_decorator.Bind,
|
|
42
50
|
Constructor: () => import_injection.Constructor,
|
|
43
51
|
Container: () => import_injection.Container,
|
|
@@ -215,6 +223,69 @@ var GroupLogEvents = class {
|
|
|
215
223
|
console.log(colorStatus(status, `Ending ${title}`));
|
|
216
224
|
console.groupEnd();
|
|
217
225
|
}
|
|
226
|
+
onBeforeFeatureStart(opts) {
|
|
227
|
+
console.group(opts.title);
|
|
228
|
+
console.group();
|
|
229
|
+
}
|
|
230
|
+
onBeforeFeatureEnd(opts) {
|
|
231
|
+
console.groupEnd();
|
|
232
|
+
console.log(colorStatus(opts.status, `Ending ${opts.title}`));
|
|
233
|
+
console.groupEnd();
|
|
234
|
+
}
|
|
235
|
+
onAfterFeatureStart(opts) {
|
|
236
|
+
console.group(opts.title);
|
|
237
|
+
console.group();
|
|
238
|
+
}
|
|
239
|
+
onAfterFeatureEnd(opts) {
|
|
240
|
+
console.groupEnd();
|
|
241
|
+
console.log(colorStatus(opts.status, `Ending ${opts.title}`));
|
|
242
|
+
console.groupEnd();
|
|
243
|
+
}
|
|
244
|
+
onBeforeRuleStart(opts) {
|
|
245
|
+
console.group(opts.title);
|
|
246
|
+
console.group();
|
|
247
|
+
}
|
|
248
|
+
onBeforeRuleEnd(opts) {
|
|
249
|
+
console.groupEnd();
|
|
250
|
+
console.log(colorStatus(opts.status, `Ending ${opts.title}`));
|
|
251
|
+
console.groupEnd();
|
|
252
|
+
}
|
|
253
|
+
onAfterRuleStart(opts) {
|
|
254
|
+
console.group(opts.title);
|
|
255
|
+
console.group();
|
|
256
|
+
}
|
|
257
|
+
onAfterRuleEnd(opts) {
|
|
258
|
+
console.groupEnd();
|
|
259
|
+
console.log(colorStatus(opts.status, `Ending ${opts.title}`));
|
|
260
|
+
console.groupEnd();
|
|
261
|
+
}
|
|
262
|
+
onBeforeScenarioOutlineStart(opts) {
|
|
263
|
+
console.group(opts.title);
|
|
264
|
+
console.group();
|
|
265
|
+
}
|
|
266
|
+
onBeforeScenarioOutlineEnd(opts) {
|
|
267
|
+
console.groupEnd();
|
|
268
|
+
console.log(colorStatus(opts.status, `Ending ${opts.title}`));
|
|
269
|
+
console.groupEnd();
|
|
270
|
+
}
|
|
271
|
+
onBeforeExamplesStart(opts) {
|
|
272
|
+
console.group(opts.title);
|
|
273
|
+
console.group();
|
|
274
|
+
}
|
|
275
|
+
onBeforeExamplesEnd(opts) {
|
|
276
|
+
console.groupEnd();
|
|
277
|
+
console.log(colorStatus(opts.status, `Ending ${opts.title}`));
|
|
278
|
+
console.groupEnd();
|
|
279
|
+
}
|
|
280
|
+
onAfterExamplesStart(opts) {
|
|
281
|
+
console.group(opts.title);
|
|
282
|
+
console.group();
|
|
283
|
+
}
|
|
284
|
+
onAfterExamplesEnd(opts) {
|
|
285
|
+
console.groupEnd();
|
|
286
|
+
console.log(colorStatus(opts.status, `Ending ${opts.title}`));
|
|
287
|
+
console.groupEnd();
|
|
288
|
+
}
|
|
218
289
|
};
|
|
219
290
|
function colorStatus(status, text) {
|
|
220
291
|
switch (status) {
|
|
@@ -288,11 +359,20 @@ var import_app = require("@autometa/app");
|
|
|
288
359
|
var import_app2 = require("@autometa/app");
|
|
289
360
|
var import_injection = require("@autometa/injection");
|
|
290
361
|
var import_app3 = require("@autometa/app");
|
|
362
|
+
var import_injection2 = require("@autometa/injection");
|
|
291
363
|
var OPTS = {};
|
|
292
364
|
var AppType = import_app.AppType.bind(null, OPTS);
|
|
293
365
|
|
|
294
366
|
// src/scopes.ts
|
|
295
367
|
var {
|
|
368
|
+
BeforeFeature,
|
|
369
|
+
AfterFeature,
|
|
370
|
+
BeforeScenarioOutline,
|
|
371
|
+
AfterScenarioOutline,
|
|
372
|
+
BeforeExamples,
|
|
373
|
+
AfterExamples,
|
|
374
|
+
BeforeRule,
|
|
375
|
+
AfterRule,
|
|
296
376
|
Feature,
|
|
297
377
|
Scenario,
|
|
298
378
|
ScenarioOutline,
|
|
@@ -344,15 +424,31 @@ var Before2 = Before;
|
|
|
344
424
|
var After2 = After;
|
|
345
425
|
var Teardown2 = Teardown;
|
|
346
426
|
var Setup2 = Setup;
|
|
427
|
+
var BeforeFeature2 = BeforeFeature;
|
|
428
|
+
var AfterFeature2 = AfterFeature;
|
|
429
|
+
var BeforeScenarioOutline2 = BeforeScenarioOutline;
|
|
430
|
+
var AfterScenarioOutline2 = AfterScenarioOutline;
|
|
431
|
+
var BeforeExamples2 = BeforeExamples;
|
|
432
|
+
var AfterExamples2 = AfterExamples;
|
|
433
|
+
var BeforeRule2 = BeforeRule;
|
|
434
|
+
var AfterRule2 = AfterRule;
|
|
347
435
|
// Annotate the CommonJS export names for ESM import in node:
|
|
348
436
|
0 && (module.exports = {
|
|
349
437
|
After,
|
|
438
|
+
AfterExamples,
|
|
439
|
+
AfterFeature,
|
|
440
|
+
AfterRule,
|
|
441
|
+
AfterScenarioOutline,
|
|
350
442
|
App,
|
|
351
443
|
AppType,
|
|
352
444
|
AutomationError,
|
|
353
445
|
AutometaApp,
|
|
354
446
|
AutometaWorld,
|
|
355
447
|
Before,
|
|
448
|
+
BeforeExamples,
|
|
449
|
+
BeforeFeature,
|
|
450
|
+
BeforeRule,
|
|
451
|
+
BeforeScenarioOutline,
|
|
356
452
|
Bind,
|
|
357
453
|
Constructor,
|
|
358
454
|
Container,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/config.ts","../src/parameters.ts","../src/scopes.ts","../src/events.ts","../src/event-logger.ts","../src/executor.ts","../src/app.ts"],"sourcesContent":["import type {\n FeatureAction,\n FeatureScope,\n ScenarioAction,\n ScenarioScope,\n SizedTimeout,\n TestTimeout,\n} from \"@autometa/scopes\";\n\nexport { defineConfig } from \"./config\";\nexport { defineParameterType } from \"./parameters\";\nimport {\n Feature as FeatureDefinition,\n Scenario as ScenarioDefinition,\n ScenarioOutline as ScenarioOutlineDefinition,\n Rule as RuleDefinition,\n Given as GivenDefinition,\n When as WhenDefinition,\n Then as ThenDefinition,\n Before as BeforeDefinition,\n After as AfterDefinition,\n Teardown as TeardownDefinition,\n Setup as SetupDefinition,\n} from \"./scopes\";\nimport { RuleAction } from \"@autometa/scopes\";\nimport { RuleScope } from \"@autometa/scopes\";\nexport { Pass } from \"./scopes\";\nexport * from \"@autometa/phrases\";\nexport {\n AppType,\n Fixture,\n Container,\n Constructor,\n AutometaApp,\n getApp,\n AutometaWorld,\n App,\n World,\n INJECTION_SCOPE,\n InjectionScope,\n Inject,\n} from \"./app\";\nexport { Dates, Time } from \"@autometa/datetime\";\nexport { AutomationError, raise } from \"@autometa/errors\";\nexport {\n DataTable,\n HTable,\n VTable,\n MTable,\n TableDocument,\n} from \"@autometa/gherkin\";\nexport { Bind } from \"@autometa/bind-decorator\";\nexport { Types } from \"@autometa/scopes\";\nexport * from \"./events\";\nexport * from \"@autometa/http\";\nexport * from \"@autometa/asserters\";\nexport {\n GetAccessedCount,\n GetAssignedValues,\n TrackAccess,\n} from \"@autometa/fixture-proxies\";\n\nexport { FileObject } from \"@autometa/file-proxies\";\n/**\n * Executes a gherkin `.feature` file. Assembles Tests\n * using the Cucumber file and globally defined Step Definitions.\n *\n * ``ts\n * // using relative path\n * import { Feature } from '@autometa/runner'\n *\n * Feature('../features/my-feature.feature')\n * ```\n *\n * Steps will be automatically assembled from Globally defined Step Definitions,\n * if a step definition root and app root are defined.\n *\n * ```ts\n * import { defineConfig } from '@autometa/runner'\n *\n * defineConfig({\n * ...\n * roots: {\n * steps: ['./test/steps'],\n * app: ['./app'],\n * },\n * }\n * ```\n *\n * Global steps are defined in standard Cucumber stle.\n * ```ts\n * // ./test/steps/my-steps.ts\n * import { Given, When, Then } from '@autometa/runner'\n *\n * Given('I have a step', () => {})\n * When('I do something', () => {})\n * Then('I expect something', () => {})\n * ```\n * @param filepath The absolute, relative, or 'feature root' path to the `.feature` file.\n */\nexport function Feature(filepath: string): FeatureScope;\n/**\n * Executes a gherkin `.feature` file. Assembles Tests\n * using the Cucumber file and globally defined Step Definitions.\n * Accepts a timeout in milliseconds which will be applied to\n * all tests within the feature.\n *\n * ```ts\n * // using relative path\n * import { Feature } from '@autometa/runner'\n * // 10 second timeout\n * Feature('../features/my-feature.feature', 10_000)\n * ```\n *\n * Steps will be automatically assembled from Globally defined Step Definitions,\n * if a step definition root and app root are defined.\n *\n * ```ts\n * import { defineConfig } from '@autometa/runner'\n *\n * defineConfig({\n * ...\n * roots: {\n * steps: ['./test/steps'],\n * app: ['./app'],\n * },\n * }\n * ```\n *\n * Global steps are defined in standard Cucumber style.\n *\n * ```ts\n * // ./test/steps/my-steps.ts\n * import { Given, When, Then } from '@autometa/runner'\n *\n * Given('I have a step', () => {})\n * When('I do something', () => {})\n * Then('I expect something', () => {})\n * ```\n * @param filepath The absolute, relative, or 'feature root' path to the `.feature` file.\n * @param timeout The timeout in milliseconds to apply to all tests within the feature.\n */\nexport function Feature(filepath: string, timeout: number): FeatureScope;\n/**\n * Executes a gherkin `.feature` file. Assembles Tests\n * using the Cucumber file and globally defined Step Definitions.\n * Accepts a timeout as a `TestTimeout` which is a tuple of `[durationNumber, 'ms' | 's' | 'm' | 'h']`\n * which will be applied to all tests within the feature.\n *\n * i.e. `[10, 's']` is a 10 second timeout. `[1, 'm']` is a 1 minute timeout.\n *\n * ```ts\n * // using relative path\n * import { Feature } from '@autometa/runner'\n *\n * // 10 second timeout\n * Feature('../features/my-feature.feature', [10, 's'])\n * ```\n *\n * Steps will be automatically assembled from Globally defined Step Definitions,\n * if a step definition root and app root are defined.\n *\n * ```ts\n * import { defineConfig } from '@autometa/runner'\n *\n * defineConfig({\n * ...\n * roots: {\n * steps: ['./test/steps'],\n * app: ['./app'],\n * },\n * };\n *\n * ```\n *\n * @param filepath\n * @param timeout\n */\nexport function Feature(filepath: string, timeout: TestTimeout): FeatureScope;\n/**\n * Executes a gherkin `.feature` file. Assembles Tests\n * using the Cucumber file and optionally locally defined steps,\n * mixed with optionally globally defined Step Definitions.\n *\n * ```ts\n * import { Feature } from '@autometa/runner'\n *\n * Feature('My Feature', () => {\n * Given('I have a step', () => {})\n * When('I do something', () => {})\n * Then('I expect something', () => {})\n * })\n * ```\n *\n * If defined in the Gherkin, it will also use any Globally defined Step Definitions which match,\n * if none is defined locally. If a Step Definition is defined both globally and locally,\n * the most local definition will be used. This applies to sub-scopes like Scenarios and Rules\n * also.\n *\n * ```ts\n * import { Feature } from '@autometa/runner'\n *\n * Feature('My Feature', () => {\n * Given('I have a step', () => {})\n * When('I do something', () => {})\n * Then('I expect something', () => {})\n *\n * Scenario('My Scenario', () => {\n * Given('I have a step', () => {})\n * })\n *\n * Rule('My Rule', () => {\n * Given('I have a step', () => {})\n * })\n *\n * @param testDefinition\n * @param filepath\n */\nexport function Feature(\n testDefinition: FeatureAction,\n filepath: string\n): FeatureScope;\n/**\n * Executes a gherkin `.feature` file. Assembles Tests\n * using the Cucumber file and optionally locally defined steps,\n * mixed with optionally globally defined Step Definitions.\n * Accepts a timeout in milliseconds which will be applied to\n * all tests within the feature.\n *\n * ```ts\n * import { Feature } from '@autometa/runner'\n *\n * // 10 second timeout\n * Feature('My Feature', () => {\n * Given('I have a step', () => {})\n * When('I do something', () => {})\n * Then('I expect something', () => {})\n * }, 10_000)\n * ```\n * @param testDefinition the Feature definition callback\n * @param filepath\n * @param timeout\n */\nexport function Feature(\n testDefinition: FeatureAction,\n filepath: string,\n timeout: number\n): FeatureScope;\nexport function Feature(\n ...args: (FeatureAction | string | TestTimeout)[]\n): FeatureScope {\n return FeatureDefinition(...args);\n}\n\nexport function Scenario(title: string, action: ScenarioAction): ScenarioScope;\nexport function Scenario(\n title: string,\n action: ScenarioAction,\n timeout: number\n): ScenarioScope;\nexport function Scenario(\n title: string,\n action: ScenarioAction,\n timeout: SizedTimeout\n): ScenarioScope;\nexport function Scenario(\n ...args: (string | ScenarioAction | SizedTimeout | number)[]\n): ScenarioScope {\n return ScenarioDefinition(...args);\n}\n\nexport function ScenarioOutline(\n title: string,\n action: ScenarioAction\n): ScenarioScope;\nexport function ScenarioOutline(\n title: string,\n action: ScenarioAction,\n timeout: number\n): ScenarioScope;\nexport function ScenarioOutline(\n title: string,\n action: ScenarioAction,\n timeout: SizedTimeout\n): ScenarioScope;\nexport function ScenarioOutline(\n ...args: (string | ScenarioAction | SizedTimeout | number)[]\n): ScenarioScope {\n return ScenarioOutlineDefinition(...args);\n}\n\nexport function Rule(title: string, action: RuleAction): RuleScope;\nexport function Rule(\n title: string,\n action: RuleAction,\n timeout: number\n): RuleScope;\nexport function Rule(\n title: string,\n action: RuleAction,\n timeout: SizedTimeout\n): RuleScope;\nexport function Rule(\n ...args: (string | RuleAction | SizedTimeout | number)[]\n): RuleScope {\n return RuleDefinition(...args);\n}\n/**\n * Defines a `Given` step definition. Matches a gherkin step\n * as either a string literal match, or a Cucumber Expression.\n *\n * The callback function is passed as it's last (or only) argument\n * a copy of the `App` object which also contains a reference to the World.\n * This can be used to access features, or store data across steps within a test.\n *\n * N.b. The App instance is shared between all step definitions and hooks within\n * the context of a scenario, but cannot be accessed from the same step in a different\n * scenario.\n *\n * ```ts\n * import { Given } from '@autometa/runner'\n *\n * Given('I have a step', (app) => {\n * app.world.someData = 'some value'\n * })\n * // using destructuring\n * Given('I have a step', ({ world }) => {\n * world.someData = 'some value'\n * })\n * ```\n *\n * Steps also support Cucumber Expressions, which can be used to match\n * dynamic values in the step.\n *\n * ```ts\n * import { Given } from '@autometa/runner'\n *\n * // matches 'Given I have a step with a 'blue' value'\n * Given('I have a step with a {string} value', (value, { world }) => {\n * world.someData = value\n * })\n *\n * @param pattern The step pattern to match.\n * @param action The step action to execute.\n */\nexport const Given = GivenDefinition;\n/**\n * Defines a `When` step definition. Matches a gherkin step\n * as either a string literal match, or a Cucumber Expression.\n *\n * The callback function is passed as it's last (or only) argument\n * a copy of the `App` object which also contains a reference to the World.\n * This can be used to access features, or store data across steps within a test.\n *\n * N.b. The App instance is shared between all step definitions and hooks within\n *\n * ```ts\n * import { When } from '@autometa/runner'\n *\n * When('I do something', async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * When('I do something', async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * Steps also support Cucumber Expressions, which can be used to match\n * dynamic values in the step.\n *\n * ```ts\n * import { When } from '@autometa/runner'\n *\n * // matches 'When I do something with a 'blue' value'\n * When('I do something with a {string} value', async (value, { webdriver }) => {\n * await webdriver.click(`#some-button-${value}`)\n * })\n *\n * @param pattern The step pattern to match.\n * @param action The step action to execute.\n */\nexport const When = WhenDefinition;\n\n/**\n * Defines a `Then` step definition. Matches a gherkin step\n * as either a string literal match, or a Cucumber Expression.\n *\n * The callback function is passed as it's last (or only) argument\n * a copy of the `App` object which also contains a reference to the World.\n * This can be used to access features, or store data across steps within a test.\n *\n * N.b. The App instance is shared between all step definitions and hooks within\n *\n * ```ts\n * import { Then } from '@autometa/runner'\n *\n * Then('I expect something', async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * Then('I expect something', async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * Steps also support Cucumber Expressions, which can be used to match\n * dynamic values in the step.\n *\n * ```ts\n * import { Then } from '@autometa/runner'\n *\n * // matches 'Then I expect something with a 'blue' value'\n * Then('I expect something with a {string} value', async (value, { world }) => {\n * expect(world.someData).toBe(value)\n * })\n *\n * @param pattern The step pattern to match.\n * @param action The step action to execute.\n */\nexport const Then = ThenDefinition;\n\n/**\n * Defines a `Before` hook. Executes before each scenario.\n *\n * ```ts\n * import { Before } from '@autometa/runner'\n *\n * Before(async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * Before(async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * @param action The hook action to execute.\n */\nexport const Before = BeforeDefinition;\n\n/**\n * Defines a `After` hook. Executes after each scenario.\n *\n * ```ts\n * import { After } from '@autometa/runner'\n *\n * After(async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * After(async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * @param action The hook action to execute.\n */\nexport const After = AfterDefinition;\n\n/**\n * Defines a `Setup` hook. Executes before all scenarios.\n * Setups are scoped, meaning a Setup defined inside the scope of a rule\n * will only apply to scenarios within that rule.\n *\n * N.b the Setup Hook and Teardown Hook reference their own unique\n * copy of the App with it's own unique life cycle. Values stored here\n * will not be accessible in tests without a singleton fixture.\n *\n * ```ts\n * import { Setup } from '@autometa/runner'\n *\n * Setup(async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * Setup(async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * @param action The hook action to execute.\n */\nexport const Teardown = TeardownDefinition;\n\n/**\n * Defines a `Teardown` hook. Executes after all scenarios have completed.\n * Teardowns are scoped, meaning a Teardown defined inside the scope of a rule\n * will only apply to scenarios within that rule.\n *\n * N.b the Setup Hook and Teardown Hook reference their own unique\n * copy of the App with it's own unique life cycle. Values stored here\n * will not be accessible in tests without a singleston fixture.\n * ```ts\n * import { Teardown } from '@autometa/runner'\n *\n * Teardown(async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * Teardown(async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * @param action The hook action to execute.\n */\nexport const Setup = SetupDefinition;\n","import {\n Config,\n TestExecutorConfig,\n defineConfig as dc,\n} from \"@autometa/config\";\n\nexport const CONFIG = new Config(new Map<string, TestExecutorConfig>());\nexport const defineConfig = dc.bind(null, CONFIG);\n","import { ParameterTypeRegistry } from \"@cucumber/cucumber-expressions\";\nimport {\n BooleanParam,\n DateParam,\n NumberParam,\n PrimitiveParam,\n OrdinalParam,\n TextParam,\n defineParameterType as dpt,\n} from \"@autometa/cucumber-expressions\";\n\nexport const PARAM_REGISTRY = new ParameterTypeRegistry();\n\n/**\n * Defines a parameter type for use in step definitions.\n *\n * ```ts\n * import { Color } from '../support/color';\n *\n * defineParameterType({\n * name: \"color\",\n * regex: /red|blue|yellow/,\n * transform: (value: string) => Color(value)\n * })\n *\n * // using regex arrays\n * defineParameterType({\n * name: \"color\",\n * regex: [/red/, /blue/, /yellow/],\n * transform: (value: string) => Color(value)\n * })\n * ```\n */\nexport const defineParameterType = dpt.bind(null, PARAM_REGISTRY);\n\ndefineParameterType(\n NumberParam,\n BooleanParam,\n PrimitiveParam,\n TextParam,\n DateParam,\n OrdinalParam\n);\n","import { PARAM_REGISTRY } from \"./parameters\";\nimport { GetCucumberFunctions, Pass } from \"@autometa/scopes\";\nimport { Coordinator } from \"@autometa/coordinator\";\nimport { CONFIG } from \"./config\";\nimport { makeTestEmitter } from \"./events\";\nimport { executor } from \"./executor\";\nimport { OPTS } from \"./app\";\nconst {\n Feature,\n Scenario,\n ScenarioOutline,\n Rule,\n Given,\n When,\n Then,\n Before,\n After,\n Teardown,\n Setup,\n Global,\n} = GetCucumberFunctions(PARAM_REGISTRY);\nconst coordinator = new Coordinator(Global, CONFIG, OPTS);\nGlobal.onFeatureExecuted = (feature, caller) => {\n const groupLogger = CONFIG.current.test?.groupLogging ?? false;\n const events = makeTestEmitter({ groupLogger });\n coordinator.run(feature, caller, events, executor);\n};\n\nexport {\n Feature,\n Scenario,\n ScenarioOutline,\n Rule,\n Given,\n When,\n Then,\n Before,\n After,\n Teardown,\n Setup,\n Pass,\n};\n","import { TestEventEmitter } from \"@autometa/events\";\nimport { CONFIG } from \"./config\";\nexport * from \"@autometa/events\";\nimport { GroupLogEvents } from \"./event-logger\";\nimport p from \"path\";\nexport function makeTestEmitter(opts: { groupLogger: boolean }) {\n const events = CONFIG.current.events;\n const emitter = new TestEventEmitter();\n if (opts.groupLogger) {\n emitter.load(new GroupLogEvents());\n }\n if (!events) {\n return emitter;\n }\n\n for (const event of events) {\n const isLocal = isRelativePath(event) || isAbsolutePath(event);\n if (isLocal) {\n const uriRoot = process.cwd();\n const uri = p.join(uriRoot, event);\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const listener = require(uri);\n if (\"default\" in listener && typeof listener.default === \"function\") {\n emitter.load(new listener.default());\n return emitter;\n }\n if (\"default\" in listener && typeof listener.default === \"object\") {\n emitter.load(listener.default);\n return emitter;\n }\n if (typeof listener === \"function\") {\n emitter.load(new listener());\n return emitter;\n }\n emitter.load(listener);\n return emitter;\n }\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const listener = require(event);\n if (\"default\" in listener) {\n emitter.load(listener.default);\n return emitter;\n }\n emitter.load(listener);\n return emitter;\n }\n\n return emitter;\n}\n\nfunction isRelativePath(path: string) {\n return path.startsWith(\".\");\n}\n\nfunction isAbsolutePath(path: string) {\n return p.isAbsolute(path);\n}\n","import {\n EndAfterOpts,\n EndBeforeOpts,\n EndFeatureOpts,\n EndRuleOpts,\n EndScenarioOpts,\n EndScenarioOutlineOpts,\n EndSetupOpts,\n EndStepOpts,\n EndTeardownOpts,\n EventSubscriber,\n StartAfterOpts,\n StartBeforeOpts,\n StartFeatureOpts,\n StartRuleOpts,\n StartScenarioOpts,\n StartScenarioOutlineOpts,\n StartSetupOpts,\n StartStepOpts,\n StartTeardownOpts,\n} from \"@autometa/events\";\nimport colors from \"colors-cli\";\nexport class GroupLogEvents implements EventSubscriber {\n onFeatureStart({ title }: StartFeatureOpts) {\n console.group(title);\n console.group();\n }\n onFeatureEnd({ title, status }: EndFeatureOpts): void {\n console.groupEnd();\n console.log(colorStatus(status, `Ending ${title}`));\n console.groupEnd();\n }\n onScenarioStart({ title }: StartScenarioOpts): void {\n console.group(title);\n console.group();\n }\n onScenarioEnd({ title, status }: EndScenarioOpts): void {\n console.groupEnd();\n console.log(colorStatus(status, `Ending ${title}`));\n console.groupEnd();\n }\n onScenarioOutlineStart(opts: StartScenarioOutlineOpts): void {\n console.group(opts.title);\n console.group();\n }\n onScenarioOutlineEnd({ title, status }: EndScenarioOutlineOpts): void {\n console.groupEnd();\n console.log(colorStatus(status, `Ending ${title}`));\n console.groupEnd();\n }\n onRuleStart({ title }: StartRuleOpts): void {\n console.group(title);\n console.group();\n }\n onRuleEnd({ title, status }: EndRuleOpts): void {\n console.groupEnd();\n console.log(colorStatus(status, `Ending ${title}`));\n console.groupEnd();\n }\n onStepStart({ title }: StartStepOpts) {\n console.group(title);\n console.group();\n }\n onStepEnd({ title, status }: EndStepOpts) {\n console.groupEnd();\n console.log(colorStatus(status, `Ending ${title}`));\n console.groupEnd();\n }\n onBeforeStart({ title, status }: StartBeforeOpts): void {\n if (status === \"SKIPPED\") {\n return;\n }\n console.group(title);\n console.group();\n }\n onBeforeEnd({ title, status }: EndBeforeOpts): void {\n if (status === \"SKIPPED\") {\n return;\n }\n console.groupEnd();\n console.log(colorStatus(status, `Ending ${title}`));\n console.groupEnd();\n }\n onAfterStart({ title, status }: StartAfterOpts): void {\n if (status === \"SKIPPED\") {\n return;\n }\n console.group(title);\n console.group();\n }\n onAfterEnd({ title, status }: EndAfterOpts): void {\n if (status === \"SKIPPED\") {\n return;\n }\n console.groupEnd();\n console.log(colorStatus(status, `Ending ${title}`));\n console.groupEnd();\n }\n onTeardownStart({ title, status }: StartTeardownOpts): void {\n if (status === \"SKIPPED\") {\n return;\n }\n console.group(title);\n console.group();\n }\n onTeardownEnd({ title, status }: EndTeardownOpts): void {\n if (status === \"SKIPPED\") {\n return;\n }\n console.groupEnd();\n console.log(colorStatus(status, `Ending ${title}`));\n console.groupEnd();\n }\n onSetupStart({ title, status }: StartSetupOpts): void {\n if (status === \"SKIPPED\") {\n return;\n }\n console.group(title);\n console.group();\n }\n onSetupEnd({ title, status }: EndSetupOpts): void {\n if (status === \"SKIPPED\") {\n return;\n }\n console.groupEnd();\n console.log(colorStatus(status, `Ending ${title}`));\n console.groupEnd();\n }\n}\nfunction colorStatus(\n status: \"FAILED\" | \"PASSED\" | \"SKIPPED\" | \"BROKEN\" | undefined,\n text: string\n) {\n switch (status) {\n case \"FAILED\":\n return `${colors.red(\"x\")} ${text}`;\n case \"PASSED\":\n return `${colors.green(\"✔️\")} ${text}`;\n case \"SKIPPED\":\n return `${colors.yellow(\"⊘\")} ${text}`;\n default:\n return text;\n }\n}\n","import { execute } from \"@autometa/jest-executor\";\n\nexport const executor = execute;\n","import \"@autometa/types\";\nimport { AppType as at } from \"@autometa/app\";\nimport { CoordinatorOpts } from \"@autometa/coordinator\";\nexport { AutometaApp, AutometaWorld, App, World } from \"@autometa/app\";\nexport {\n Fixture,\n INJECTION_SCOPE,\n InjectionScope,\n Token,\n Container,\n Constructor,\n Inject,\n} from \"@autometa/injection\";\nexport const OPTS = {} as Record<string, CoordinatorOpts>;\n/**\n * Marks a class as being the `App` of the test framework. The `App` is the\n * entry point for the test framework. The App will be made available as the final\n * argument in the Step Definition Callbacks.\n *\n * ```ts\n *\n * @AppType(World)\n * @Constructor(MyClient)\n * class App {\n * constructor(readonly myCLient: MyClient) {}\n * }\n * ```\n * Or with tokens\n *\n * ```ts\n * import from \"@autometa/runner\";\n * import { World } from \"./default.world\";\n * @AppType(World)\n * @Constructor(HTTP, Token(\"MyClient\"))\n * class App {\n * constructor(readonly http: HTTP, readonly myClient: MyClient) {}\n * }\n * ```\n */\nexport const AppType = at.bind(null, OPTS);\nexport { getApp } from \"@autometa/app\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,eAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA,eAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAAAC;AAAA,EAAA,gBAAAC;AAAA,EAAA,uBAAAC;AAAA,EAAA,aAAAC;AAAA,EAAA;AAAA,kBAAAC;AAAA,EAAA,YAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA,cAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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,QAAQ,MAAM,gBAAgB;AACzD,QAAM,SAAS,gBAAgB,EAAE,YAAY,CAAC;AAC9C,cAAY,IAAI,SAAS,QAAQ,QAAQ,QAAQ;AACnD;;;AHCA,wBAAc,8BA3Bd;AA0CA,sBAA4B;AAC5B,oBAAuC;AACvC,qBAMO;AACP,4BAAqB;AACrB,IAAAC,iBAAsB;AACtB,wBAAc,gBArDd;AAsDA,wBAAc,2BAtDd;AAuDA,wBAAc,gCAvDd;AAwDA,6BAIO;AAEP,0BAA2B;AA0LpB,SAASC,YACX,MACW;AACd,SAAO,QAAkB,GAAG,IAAI;AAClC;AAaO,SAASC,aACX,MACY;AACf,SAAO,SAAmB,GAAG,IAAI;AACnC;AAgBO,SAASC,oBACX,MACY;AACf,SAAO,gBAA0B,GAAG,IAAI;AAC1C;AAaO,SAASC,SACX,MACQ;AACX,SAAO,KAAe,GAAG,IAAI;AAC/B;AAuCO,IAAMC,SAAQ;AAsCd,IAAMC,QAAO;AAuCb,IAAMC,QAAO;AAoBb,IAAMC,UAAS;AAoBf,IAAMC,SAAQ;AA0Bd,IAAMC,YAAW;AAyBjB,IAAMC,SAAQ;","names":["After","Before","Feature","Given","Rule","Scenario","ScenarioOutline","Setup","Teardown","Then","When","dc","import_cucumber_expressions","dpt","colors","p","listener","import_app","at","import_scopes","Feature","Scenario","ScenarioOutline","Rule","Given","When","Then","Before","After","Teardown","Setup"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/config.ts","../src/parameters.ts","../src/scopes.ts","../src/events.ts","../src/event-logger.ts","../src/executor.ts","../src/app.ts"],"sourcesContent":["import type {\n FeatureAction,\n FeatureScope,\n ScenarioAction,\n ScenarioScope,\n SizedTimeout,\n TestTimeout,\n} from \"@autometa/scopes\";\n\nexport { defineConfig } from \"./config\";\nexport { defineParameterType } from \"./parameters\";\nimport {\n Feature as FeatureDefinition,\n Scenario as ScenarioDefinition,\n ScenarioOutline as ScenarioOutlineDefinition,\n Rule as RuleDefinition,\n Given as GivenDefinition,\n When as WhenDefinition,\n Then as ThenDefinition,\n Before as BeforeDefinition,\n After as AfterDefinition,\n Teardown as TeardownDefinition,\n Setup as SetupDefinition,\n BeforeFeature as BeforeFeatureDefinition,\n AfterFeature as AfterFeatureDefinition,\n BeforeScenarioOutline as BeforeScenarioOutlineDefinition,\n AfterScenarioOutline as AfterScenarioOutlineDefinition,\n BeforeExamples as BeforeExamplesDefinition,\n AfterExamples as AfterExamplesDefinition,\n BeforeRule as BeforeRuleDefinition,\n AfterRule as AfterRuleDefinition,\n} from \"./scopes\";\nimport { RuleAction } from \"@autometa/scopes\";\nimport { RuleScope } from \"@autometa/scopes\";\nexport { Pass } from \"./scopes\";\nexport * from \"@autometa/phrases\";\nexport {\n AppType,\n Fixture,\n Container,\n Constructor,\n AutometaApp,\n getApp,\n AutometaWorld,\n App,\n World,\n INJECTION_SCOPE,\n InjectionScope,\n Inject,\n} from \"./app\";\nexport { Dates, Time } from \"@autometa/datetime\";\nexport { AutomationError, raise } from \"@autometa/errors\";\nexport {\n DataTable,\n HTable,\n VTable,\n MTable,\n TableDocument,\n} from \"@autometa/gherkin\";\nexport { Bind } from \"@autometa/bind-decorator\";\nexport { Types } from \"@autometa/scopes\";\nexport * from \"./events\";\nexport * from \"@autometa/http\";\nexport * from \"@autometa/asserters\";\nexport {\n GetAccessedCount,\n GetAssignedValues,\n TrackAccess,\n} from \"@autometa/fixture-proxies\";\n\nexport { FileObject } from \"@autometa/file-proxies\";\n/**\n * Executes a gherkin `.feature` file. Assembles Tests\n * using the Cucumber file and globally defined Step Definitions.\n *\n * ``ts\n * // using relative path\n * import { Feature } from '@autometa/runner'\n *\n * Feature('../features/my-feature.feature')\n * ```\n *\n * Steps will be automatically assembled from Globally defined Step Definitions,\n * if a step definition root and app root are defined.\n *\n * ```ts\n * import { defineConfig } from '@autometa/runner'\n *\n * defineConfig({\n * ...\n * roots: {\n * steps: ['./test/steps'],\n * app: ['./app'],\n * },\n * }\n * ```\n *\n * Global steps are defined in standard Cucumber stle.\n * ```ts\n * // ./test/steps/my-steps.ts\n * import { Given, When, Then } from '@autometa/runner'\n *\n * Given('I have a step', () => {})\n * When('I do something', () => {})\n * Then('I expect something', () => {})\n * ```\n * @param filepath The absolute, relative, or 'feature root' path to the `.feature` file.\n */\nexport function Feature(filepath: string): FeatureScope;\n/**\n * Executes a gherkin `.feature` file. Assembles Tests\n * using the Cucumber file and globally defined Step Definitions.\n * Accepts a timeout in milliseconds which will be applied to\n * all tests within the feature.\n *\n * ```ts\n * // using relative path\n * import { Feature } from '@autometa/runner'\n * // 10 second timeout\n * Feature('../features/my-feature.feature', 10_000)\n * ```\n *\n * Steps will be automatically assembled from Globally defined Step Definitions,\n * if a step definition root and app root are defined.\n *\n * ```ts\n * import { defineConfig } from '@autometa/runner'\n *\n * defineConfig({\n * ...\n * roots: {\n * steps: ['./test/steps'],\n * app: ['./app'],\n * },\n * }\n * ```\n *\n * Global steps are defined in standard Cucumber style.\n *\n * ```ts\n * // ./test/steps/my-steps.ts\n * import { Given, When, Then } from '@autometa/runner'\n *\n * Given('I have a step', () => {})\n * When('I do something', () => {})\n * Then('I expect something', () => {})\n * ```\n * @param filepath The absolute, relative, or 'feature root' path to the `.feature` file.\n * @param timeout The timeout in milliseconds to apply to all tests within the feature.\n */\nexport function Feature(filepath: string, timeout: number): FeatureScope;\n/**\n * Executes a gherkin `.feature` file. Assembles Tests\n * using the Cucumber file and globally defined Step Definitions.\n * Accepts a timeout as a `TestTimeout` which is a tuple of `[durationNumber, 'ms' | 's' | 'm' | 'h']`\n * which will be applied to all tests within the feature.\n *\n * i.e. `[10, 's']` is a 10 second timeout. `[1, 'm']` is a 1 minute timeout.\n *\n * ```ts\n * // using relative path\n * import { Feature } from '@autometa/runner'\n *\n * // 10 second timeout\n * Feature('../features/my-feature.feature', [10, 's'])\n * ```\n *\n * Steps will be automatically assembled from Globally defined Step Definitions,\n * if a step definition root and app root are defined.\n *\n * ```ts\n * import { defineConfig } from '@autometa/runner'\n *\n * defineConfig({\n * ...\n * roots: {\n * steps: ['./test/steps'],\n * app: ['./app'],\n * },\n * };\n *\n * ```\n *\n * @param filepath\n * @param timeout\n */\nexport function Feature(filepath: string, timeout: TestTimeout): FeatureScope;\n/**\n * Executes a gherkin `.feature` file. Assembles Tests\n * using the Cucumber file and optionally locally defined steps,\n * mixed with optionally globally defined Step Definitions.\n *\n * ```ts\n * import { Feature } from '@autometa/runner'\n *\n * Feature('My Feature', () => {\n * Given('I have a step', () => {})\n * When('I do something', () => {})\n * Then('I expect something', () => {})\n * })\n * ```\n *\n * If defined in the Gherkin, it will also use any Globally defined Step Definitions which match,\n * if none is defined locally. If a Step Definition is defined both globally and locally,\n * the most local definition will be used. This applies to sub-scopes like Scenarios and Rules\n * also.\n *\n * ```ts\n * import { Feature } from '@autometa/runner'\n *\n * Feature('My Feature', () => {\n * Given('I have a step', () => {})\n * When('I do something', () => {})\n * Then('I expect something', () => {})\n *\n * Scenario('My Scenario', () => {\n * Given('I have a step', () => {})\n * })\n *\n * Rule('My Rule', () => {\n * Given('I have a step', () => {})\n * })\n *\n * @param testDefinition\n * @param filepath\n */\nexport function Feature(\n testDefinition: FeatureAction,\n filepath: string\n): FeatureScope;\n/**\n * Executes a gherkin `.feature` file. Assembles Tests\n * using the Cucumber file and optionally locally defined steps,\n * mixed with optionally globally defined Step Definitions.\n * Accepts a timeout in milliseconds which will be applied to\n * all tests within the feature.\n *\n * ```ts\n * import { Feature } from '@autometa/runner'\n *\n * // 10 second timeout\n * Feature('My Feature', () => {\n * Given('I have a step', () => {})\n * When('I do something', () => {})\n * Then('I expect something', () => {})\n * }, 10_000)\n * ```\n * @param testDefinition the Feature definition callback\n * @param filepath\n * @param timeout\n */\nexport function Feature(\n testDefinition: FeatureAction,\n filepath: string,\n timeout: number\n): FeatureScope;\nexport function Feature(\n ...args: (FeatureAction | string | TestTimeout)[]\n): FeatureScope {\n return FeatureDefinition(...args);\n}\n\nexport function Scenario(title: string, action: ScenarioAction): ScenarioScope;\nexport function Scenario(\n title: string,\n action: ScenarioAction,\n timeout: number\n): ScenarioScope;\nexport function Scenario(\n title: string,\n action: ScenarioAction,\n timeout: SizedTimeout\n): ScenarioScope;\nexport function Scenario(\n ...args: (string | ScenarioAction | SizedTimeout | number)[]\n): ScenarioScope {\n return ScenarioDefinition(...args);\n}\n\nexport function ScenarioOutline(\n title: string,\n action: ScenarioAction\n): ScenarioScope;\nexport function ScenarioOutline(\n title: string,\n action: ScenarioAction,\n timeout: number\n): ScenarioScope;\nexport function ScenarioOutline(\n title: string,\n action: ScenarioAction,\n timeout: SizedTimeout\n): ScenarioScope;\nexport function ScenarioOutline(\n ...args: (string | ScenarioAction | SizedTimeout | number)[]\n): ScenarioScope {\n return ScenarioOutlineDefinition(...args);\n}\n\nexport function Rule(title: string, action: RuleAction): RuleScope;\nexport function Rule(\n title: string,\n action: RuleAction,\n timeout: number\n): RuleScope;\nexport function Rule(\n title: string,\n action: RuleAction,\n timeout: SizedTimeout\n): RuleScope;\nexport function Rule(\n ...args: (string | RuleAction | SizedTimeout | number)[]\n): RuleScope {\n return RuleDefinition(...args);\n}\n/**\n * Defines a `Given` step definition. Matches a gherkin step\n * as either a string literal match, or a Cucumber Expression.\n *\n * The callback function is passed as it's last (or only) argument\n * a copy of the `App` object which also contains a reference to the World.\n * This can be used to access features, or store data across steps within a test.\n *\n * N.b. The App instance is shared between all step definitions and hooks within\n * the context of a scenario, but cannot be accessed from the same step in a different\n * scenario.\n *\n * ```ts\n * import { Given } from '@autometa/runner'\n *\n * Given('I have a step', (app) => {\n * app.world.someData = 'some value'\n * })\n * // using destructuring\n * Given('I have a step', ({ world }) => {\n * world.someData = 'some value'\n * })\n * ```\n *\n * Steps also support Cucumber Expressions, which can be used to match\n * dynamic values in the step.\n *\n * ```ts\n * import { Given } from '@autometa/runner'\n *\n * // matches 'Given I have a step with a 'blue' value'\n * Given('I have a step with a {string} value', (value, { world }) => {\n * world.someData = value\n * })\n *\n * @param pattern The step pattern to match.\n * @param action The step action to execute.\n */\nexport const Given = GivenDefinition;\n/**\n * Defines a `When` step definition. Matches a gherkin step\n * as either a string literal match, or a Cucumber Expression.\n *\n * The callback function is passed as it's last (or only) argument\n * a copy of the `App` object which also contains a reference to the World.\n * This can be used to access features, or store data across steps within a test.\n *\n * N.b. The App instance is shared between all step definitions and hooks within\n *\n * ```ts\n * import { When } from '@autometa/runner'\n *\n * When('I do something', async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * When('I do something', async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * Steps also support Cucumber Expressions, which can be used to match\n * dynamic values in the step.\n *\n * ```ts\n * import { When } from '@autometa/runner'\n *\n * // matches 'When I do something with a 'blue' value'\n * When('I do something with a {string} value', async (value, { webdriver }) => {\n * await webdriver.click(`#some-button-${value}`)\n * })\n *\n * @param pattern The step pattern to match.\n * @param action The step action to execute.\n */\nexport const When = WhenDefinition;\n\n/**\n * Defines a `Then` step definition. Matches a gherkin step\n * as either a string literal match, or a Cucumber Expression.\n *\n * The callback function is passed as it's last (or only) argument\n * a copy of the `App` object which also contains a reference to the World.\n * This can be used to access features, or store data across steps within a test.\n *\n * N.b. The App instance is shared between all step definitions and hooks within\n *\n * ```ts\n * import { Then } from '@autometa/runner'\n *\n * Then('I expect something', async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * Then('I expect something', async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * Steps also support Cucumber Expressions, which can be used to match\n * dynamic values in the step.\n *\n * ```ts\n * import { Then } from '@autometa/runner'\n *\n * // matches 'Then I expect something with a 'blue' value'\n * Then('I expect something with a {string} value', async (value, { world }) => {\n * expect(world.someData).toBe(value)\n * })\n *\n * @param pattern The step pattern to match.\n * @param action The step action to execute.\n */\nexport const Then = ThenDefinition;\n\n/**\n * Defines a `Before` hook. Executes before each scenario.\n *\n * ```ts\n * import { Before } from '@autometa/runner'\n *\n * Before(async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * Before(async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * @param action The hook action to execute.\n */\nexport const Before = BeforeDefinition;\n\n/**\n * Defines a `After` hook. Executes after each scenario.\n *\n * ```ts\n * import { After } from '@autometa/runner'\n *\n * After(async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * After(async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * @param action The hook action to execute.\n */\nexport const After = AfterDefinition;\n\n/**\n * Defines a `Setup` hook. Executes before all scenarios.\n * Setups are scoped, meaning a Setup defined inside the scope of a rule\n * will only apply to scenarios within that rule.\n *\n * N.b the Setup Hook and Teardown Hook reference their own unique\n * copy of the App with it's own unique life cycle. Values stored here\n * will not be accessible in tests without a singleton fixture.\n *\n * ```ts\n * import { Setup } from '@autometa/runner'\n *\n * Setup(async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * Setup(async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * @param action The hook action to execute.\n */\nexport const Teardown = TeardownDefinition;\n\n/**\n * Defines a `Teardown` hook. Executes after all scenarios have completed.\n * Teardowns are scoped, meaning a Teardown defined inside the scope of a rule\n * will only apply to scenarios within that rule.\n *\n * N.b the Setup Hook and Teardown Hook reference their own unique\n * copy of the App with it's own unique life cycle. Values stored here\n * will not be accessible in tests without a singleston fixture.\n * ```ts\n * import { Teardown } from '@autometa/runner'\n *\n * Teardown(async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * Teardown(async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * @param action The hook action to execute.\n */\nexport const Setup = SetupDefinition;\n\n/**\n * Defines a `BeforeFeature` hook. Executes before each feature.\n *\n * ```ts\n * import { BeforeFeature } from '@autometa/runner'\n *\n * BeforeFeature(async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * BeforeFeature(async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * @param action The hook action to execute.\n */\nexport const BeforeFeature = BeforeFeatureDefinition;\n\n/**\n * Defines a `AfterFeature` hook. Executes after each feature.\n *\n * ```ts\n * import { AfterFeature } from '@autometa/runner'\n *\n * AfterFeature(async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * AfterFeature(async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * @param action The hook action to execute.\n */\nexport const AfterFeature = AfterFeatureDefinition;\n\n/**\n * Defines a `BeforeScenarioOutline` hook. Executes before each scenario outline.\n *\n * ```ts\n * import { BeforeScenarioOutline } from '@autometa/runner'\n *\n * BeforeScenarioOutline(async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * BeforeScenarioOutline(async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * @param action The hook action to execute.\n */\nexport const BeforeScenarioOutline = BeforeScenarioOutlineDefinition;\n\n/**\n * Defines a `AfterScenarioOutline` hook. Executes after each scenario outline.\n *\n * ```ts\n * import { AfterScenarioOutline } from '@autometa/runner'\n *\n * AfterScenarioOutline(async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * AfterScenarioOutline(async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * @param action The hook action to execute.\n */\n\nexport const AfterScenarioOutline = AfterScenarioOutlineDefinition;\n\n/**\n * Defines a `BeforeExamples` hook. Executes before each examples table.\n *\n * ```ts\n * import { BeforeExamples } from '@autometa/runner'\n *\n * BeforeExamples(async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * BeforeExamples(async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * @param action The hook action to execute.\n */\n\nexport const BeforeExamples = BeforeExamplesDefinition;\n\n/**\n * Defines a `AfterExamples` hook. Executes after each examples table.\n *\n * ```ts\n * import { AfterExamples } from '@autometa/runner'\n *\n * AfterExamples(async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * AfterExamples(async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * @param action The hook action to execute.\n */\nexport const AfterExamples = AfterExamplesDefinition;\n\n/**\n * Defines a `BeforeRule` hook. Executes before each rule.\n *\n * ```ts\n * import { BeforeRule } from '@autometa/runner'\n *\n * BeforeRule(async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * BeforeRule(async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * @param action The hook action to execute.\n */\n\nexport const BeforeRule = BeforeRuleDefinition;\n\n/**\n * Defines a `AfterRule` hook. Executes after each rule.\n *\n * ```ts\n * import { AfterRule } from '@autometa/runner'\n *\n * AfterRule(async (app) => {\n * await app.webdriver.click('#some-button')\n * })\n *\n * // using destructuring\n * AfterRule(async ({ webdriver }) => {\n * await webdriver.click('#some-button')\n * })\n * ```\n *\n * @param action The hook action to execute.\n */\n\nexport const AfterRule = AfterRuleDefinition;\n","import {\n Config,\n TestExecutorConfig,\n defineConfig as dc,\n} from \"@autometa/config\";\n\nexport const CONFIG = new Config(new Map<string, TestExecutorConfig>());\nexport const defineConfig = dc.bind(null, CONFIG);\n","import { ParameterTypeRegistry } from \"@cucumber/cucumber-expressions\";\nimport {\n BooleanParam,\n DateParam,\n NumberParam,\n PrimitiveParam,\n OrdinalParam,\n TextParam,\n defineParameterType as dpt,\n} from \"@autometa/cucumber-expressions\";\n\nexport const PARAM_REGISTRY = new ParameterTypeRegistry();\n\n/**\n * Defines a parameter type for use in step definitions.\n *\n * ```ts\n * import { Color } from '../support/color';\n *\n * defineParameterType({\n * name: \"color\",\n * regex: /red|blue|yellow/,\n * transform: (value: string) => Color(value)\n * })\n *\n * // using regex arrays\n * defineParameterType({\n * name: \"color\",\n * regex: [/red/, /blue/, /yellow/],\n * transform: (value: string) => Color(value)\n * })\n * ```\n */\nexport const defineParameterType = dpt.bind(null, PARAM_REGISTRY);\n\ndefineParameterType(\n NumberParam,\n BooleanParam,\n PrimitiveParam,\n TextParam,\n DateParam,\n OrdinalParam\n);\n","import { PARAM_REGISTRY } from \"./parameters\";\nimport { GetCucumberFunctions, Pass } from \"@autometa/scopes\";\nimport { Coordinator } from \"@autometa/coordinator\";\nimport { CONFIG } from \"./config\";\nimport { makeTestEmitter } from \"./events\";\nimport { executor } from \"./executor\";\nimport { OPTS } from \"./app\";\nconst {\n BeforeFeature,\n AfterFeature,\n BeforeScenarioOutline,\n AfterScenarioOutline,\n BeforeExamples,\n AfterExamples,\n BeforeRule,\n AfterRule,\n Feature,\n Scenario,\n ScenarioOutline,\n Rule,\n Given,\n When,\n Then,\n Before,\n After,\n Teardown,\n Setup,\n Global,\n} = GetCucumberFunctions(PARAM_REGISTRY);\nconst coordinator = new Coordinator(Global, CONFIG, OPTS);\nGlobal.onFeatureExecuted = (feature, caller) => {\n const groupLogger = CONFIG.current.test?.groupLogging ?? false;\n const events = makeTestEmitter({ groupLogger });\n coordinator.run(feature, caller, events, executor);\n};\n\nexport {\n Feature,\n Scenario,\n ScenarioOutline,\n Rule,\n Given,\n When,\n Then,\n Before,\n After,\n Teardown,\n Setup,\n BeforeFeature,\n AfterFeature,\n BeforeScenarioOutline,\n AfterScenarioOutline,\n BeforeExamples,\n AfterExamples,\n BeforeRule,\n AfterRule,\n Pass,\n};\n","import { TestEventEmitter } from \"@autometa/events\";\nimport { CONFIG } from \"./config\";\nexport * from \"@autometa/events\";\nimport { GroupLogEvents } from \"./event-logger\";\nimport p from \"path\";\nexport function makeTestEmitter(opts: { groupLogger: boolean }) {\n const events = CONFIG.current.events;\n const emitter = new TestEventEmitter();\n if (opts.groupLogger) {\n emitter.load(new GroupLogEvents());\n }\n if (!events) {\n return emitter;\n }\n\n for (const event of events) {\n const isLocal = isRelativePath(event) || isAbsolutePath(event);\n if (isLocal) {\n const uriRoot = process.cwd();\n const uri = p.join(uriRoot, event);\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const listener = require(uri);\n if (\"default\" in listener && typeof listener.default === \"function\") {\n emitter.load(new listener.default());\n return emitter;\n }\n if (\"default\" in listener && typeof listener.default === \"object\") {\n emitter.load(listener.default);\n return emitter;\n }\n if (typeof listener === \"function\") {\n emitter.load(new listener());\n return emitter;\n }\n emitter.load(listener);\n return emitter;\n }\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const listener = require(event);\n if (\"default\" in listener) {\n emitter.load(listener.default);\n return emitter;\n }\n emitter.load(listener);\n return emitter;\n }\n\n return emitter;\n}\n\nfunction isRelativePath(path: string) {\n return path.startsWith(\".\");\n}\n\nfunction isAbsolutePath(path: string) {\n return p.isAbsolute(path);\n}\n","import {\n EndAfterOpts,\n EndBeforeOpts,\n EndFeatureOpts,\n EndRuleOpts,\n EndScenarioOpts,\n EndScenarioOutlineOpts,\n EndSetupOpts,\n EndStepOpts,\n EndTeardownOpts,\n EventSubscriber,\n StartAfterOpts,\n StartBeforeOpts,\n StartFeatureOpts,\n StartRuleOpts,\n StartScenarioOpts,\n StartScenarioOutlineOpts,\n StartSetupOpts,\n StartStepOpts,\n StartTeardownOpts,\n} from \"@autometa/events\";\nimport colors from \"colors-cli\";\nexport class GroupLogEvents implements EventSubscriber {\n onFeatureStart({ title }: StartFeatureOpts) {\n console.group(title);\n console.group();\n }\n onFeatureEnd({ title, status }: EndFeatureOpts): void {\n console.groupEnd();\n console.log(colorStatus(status, `Ending ${title}`));\n console.groupEnd();\n }\n onScenarioStart({ title }: StartScenarioOpts): void {\n console.group(title);\n console.group();\n }\n onScenarioEnd({ title, status }: EndScenarioOpts): void {\n console.groupEnd();\n console.log(colorStatus(status, `Ending ${title}`));\n console.groupEnd();\n }\n onScenarioOutlineStart(opts: StartScenarioOutlineOpts): void {\n console.group(opts.title);\n console.group();\n }\n onScenarioOutlineEnd({ title, status }: EndScenarioOutlineOpts): void {\n console.groupEnd();\n console.log(colorStatus(status, `Ending ${title}`));\n console.groupEnd();\n }\n onRuleStart({ title }: StartRuleOpts): void {\n console.group(title);\n console.group();\n }\n onRuleEnd({ title, status }: EndRuleOpts): void {\n console.groupEnd();\n console.log(colorStatus(status, `Ending ${title}`));\n console.groupEnd();\n }\n onStepStart({ title }: StartStepOpts) {\n console.group(title);\n console.group();\n }\n onStepEnd({ title, status }: EndStepOpts) {\n console.groupEnd();\n console.log(colorStatus(status, `Ending ${title}`));\n console.groupEnd();\n }\n onBeforeStart({ title, status }: StartBeforeOpts): void {\n if (status === \"SKIPPED\") {\n return;\n }\n console.group(title);\n console.group();\n }\n onBeforeEnd({ title, status }: EndBeforeOpts): void {\n if (status === \"SKIPPED\") {\n return;\n }\n console.groupEnd();\n console.log(colorStatus(status, `Ending ${title}`));\n console.groupEnd();\n }\n onAfterStart({ title, status }: StartAfterOpts): void {\n if (status === \"SKIPPED\") {\n return;\n }\n console.group(title);\n console.group();\n }\n onAfterEnd({ title, status }: EndAfterOpts): void {\n if (status === \"SKIPPED\") {\n return;\n }\n console.groupEnd();\n console.log(colorStatus(status, `Ending ${title}`));\n console.groupEnd();\n }\n onTeardownStart({ title, status }: StartTeardownOpts): void {\n if (status === \"SKIPPED\") {\n return;\n }\n console.group(title);\n console.group();\n }\n onTeardownEnd({ title, status }: EndTeardownOpts): void {\n if (status === \"SKIPPED\") {\n return;\n }\n console.groupEnd();\n console.log(colorStatus(status, `Ending ${title}`));\n console.groupEnd();\n }\n onSetupStart({ title, status }: StartSetupOpts): void {\n if (status === \"SKIPPED\") {\n return;\n }\n console.group(title);\n console.group();\n }\n onSetupEnd({ title, status }: EndSetupOpts): void {\n if (status === \"SKIPPED\") {\n return;\n }\n console.groupEnd();\n console.log(colorStatus(status, `Ending ${title}`));\n console.groupEnd();\n }\n onBeforeFeatureStart(opts: StartFeatureOpts): void {\n console.group(opts.title);\n console.group();\n }\n\n onBeforeFeatureEnd(opts: EndFeatureOpts): void {\n console.groupEnd();\n console.log(colorStatus(opts.status, `Ending ${opts.title}`));\n console.groupEnd();\n }\n\n onAfterFeatureStart(opts: StartFeatureOpts): void {\n console.group(opts.title);\n console.group();\n }\n\n onAfterFeatureEnd(opts: EndFeatureOpts): void {\n console.groupEnd();\n console.log(colorStatus(opts.status, `Ending ${opts.title}`));\n console.groupEnd();\n }\n\n onBeforeRuleStart(opts: StartRuleOpts): void {\n console.group(opts.title);\n console.group();\n }\n\n onBeforeRuleEnd(opts: EndRuleOpts): void {\n console.groupEnd();\n console.log(colorStatus(opts.status, `Ending ${opts.title}`));\n console.groupEnd();\n }\n\n onAfterRuleStart(opts: StartRuleOpts): void {\n console.group(opts.title);\n console.group();\n }\n\n onAfterRuleEnd(opts: EndRuleOpts): void {\n console.groupEnd();\n console.log(colorStatus(opts.status, `Ending ${opts.title}`));\n console.groupEnd();\n }\n\n onBeforeScenarioOutlineStart(opts: StartScenarioOutlineOpts): void {\n console.group(opts.title);\n console.group();\n }\n\n onBeforeScenarioOutlineEnd(opts: EndScenarioOpts): void {\n console.groupEnd();\n console.log(colorStatus(opts.status, `Ending ${opts.title}`));\n console.groupEnd();\n }\n\n onBeforeExamplesStart(opts: StartScenarioOutlineOpts): void {\n console.group(opts.title);\n console.group();\n }\n\n onBeforeExamplesEnd(opts: EndScenarioOpts): void {\n console.groupEnd();\n console.log(colorStatus(opts.status, `Ending ${opts.title}`));\n console.groupEnd();\n }\n\n onAfterExamplesStart(opts: StartScenarioOutlineOpts): void {\n console.group(opts.title);\n console.group();\n }\n\n onAfterExamplesEnd(opts: EndScenarioOpts): void {\n console.groupEnd();\n console.log(colorStatus(opts.status, `Ending ${opts.title}`));\n console.groupEnd();\n }\n}\nfunction colorStatus(\n status: \"FAILED\" | \"PASSED\" | \"SKIPPED\" | \"BROKEN\" | undefined,\n text: string\n) {\n switch (status) {\n case \"FAILED\":\n return `${colors.red(\"x\")} ${text}`;\n case \"PASSED\":\n return `${colors.green(\"✔️\")} ${text}`;\n case \"SKIPPED\":\n return `${colors.yellow(\"⊘\")} ${text}`;\n default:\n return text;\n }\n}\n","import { execute } from \"@autometa/jest-executor\";\n\nexport const executor = execute;\n","import \"@autometa/types\";\nimport { AppType as at } from \"@autometa/app\";\nimport { CoordinatorOpts } from \"@autometa/coordinator\";\nexport { AutometaApp, AutometaWorld, App, World } from \"@autometa/app\";\nexport {\n Fixture,\n INJECTION_SCOPE,\n InjectionScope,\n Token,\n Container,\n Constructor,\n Inject,\n} from \"@autometa/injection\";\nexport const OPTS = {} as Record<string, CoordinatorOpts>;\n/**\n * Marks a class as being the `App` of the test framework. The `App` is the\n * entry point for the test framework. The App will be made available as the final\n * argument in the Step Definition Callbacks.\n *\n * ```ts\n *\n * @AppType(World)\n * @Constructor(MyClient)\n * class App {\n * constructor(readonly myCLient: MyClient) {}\n * }\n * ```\n * Or with tokens\n *\n * ```ts\n * import from \"@autometa/runner\";\n * import { World } from \"./default.world\";\n * @AppType(World)\n * @Constructor(HTTP, Token(\"MyClient\"))\n * class App {\n * constructor(readonly http: HTTP, readonly myClient: MyClient) {}\n * }\n * ```\n */\nexport const AppType = at.bind(null, OPTS);\nexport { getApp } from \"@autometa/app\";\nexport { DisposeMethod } from \"@autometa/injection\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,eAAAA;AAAA,EAAA,qBAAAC;AAAA,EAAA,oBAAAC;AAAA,EAAA,iBAAAC;AAAA,EAAA,4BAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,6BAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA,eAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAAAC;AA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AI;AAC1C;AAaO,SAASC,SACX,MACQ;AACX,SAAO,KAAe,GAAG,IAAI;AAC/B;AAuCO,IAAMC,SAAQ;AAsCd,IAAMC,QAAO;AAuCb,IAAMC,QAAO;AAoBb,IAAMC,UAAS;AAoBf,IAAMC,SAAQ;AA0Bd,IAAMC,YAAW;AAyBjB,IAAMC,SAAQ;AAoBd,IAAMC,iBAAgB;AAoBtB,IAAMC,gBAAe;AAoBrB,IAAMC,yBAAwB;AAqB9B,IAAMC,wBAAuB;AAqB7B,IAAMC,kBAAiB;AAoBvB,IAAMC,iBAAgB;AAqBtB,IAAMC,cAAa;AAqBnB,IAAMC,aAAY;","names":["After","AfterExamples","AfterFeature","AfterRule","AfterScenarioOutline","Before","BeforeExamples","BeforeFeature","BeforeRule","BeforeScenarioOutline","Feature","Given","Rule","Scenario","ScenarioOutline","Setup","Teardown","Then","When","dc","import_cucumber_expressions","dpt","colors","p","listener","import_app","import_injection","at","import_scopes","Feature","Scenario","ScenarioOutline","Rule","Given","When","Then","Before","After","Teardown","Setup","BeforeFeature","AfterFeature","BeforeScenarioOutline","AfterScenarioOutline","BeforeExamples","AfterExamples","BeforeRule","AfterRule"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autometa/runner",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -33,25 +33,25 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@cucumber/cucumber-expressions": "^16.1.2",
|
|
35
35
|
"colors-cli": "^1.0.32",
|
|
36
|
-
"@autometa/
|
|
37
|
-
"@autometa/
|
|
38
|
-
"@autometa/
|
|
36
|
+
"@autometa/app": "^0.4.1",
|
|
37
|
+
"@autometa/asserters": "^0.1.8",
|
|
38
|
+
"@autometa/bind-decorator": "^0.5.1",
|
|
39
|
+
"@autometa/config": "^0.1.26",
|
|
40
|
+
"@autometa/cucumber-expressions": "^0.4.3",
|
|
39
41
|
"@autometa/datetime": "^0.1.16",
|
|
42
|
+
"@autometa/coordinator": "^0.3.30",
|
|
40
43
|
"@autometa/errors": "^0.2.2",
|
|
41
|
-
"@autometa/events": "^0.
|
|
44
|
+
"@autometa/events": "^0.3.1",
|
|
42
45
|
"@autometa/file-proxies": "^0.2.0",
|
|
43
46
|
"@autometa/fixture-proxies": "^0.1.3",
|
|
44
|
-
"@autometa/gherkin": "^0.
|
|
45
|
-
"@autometa/
|
|
46
|
-
"@autometa/
|
|
47
|
+
"@autometa/gherkin": "^0.7.1",
|
|
48
|
+
"@autometa/injection": "^0.1.4",
|
|
49
|
+
"@autometa/http": "^1.4.19",
|
|
47
50
|
"@autometa/phrases": "^0.1.12",
|
|
48
|
-
"@autometa/
|
|
49
|
-
"@autometa/
|
|
50
|
-
"@autometa/test-builder": "^0.
|
|
51
|
-
"@autometa/
|
|
52
|
-
"@autometa/app": "^0.3.5",
|
|
53
|
-
"@autometa/bind-decorator": "^0.5.1",
|
|
54
|
-
"@autometa/injection": "^0.1.3"
|
|
51
|
+
"@autometa/jest-executor": "^0.6.1",
|
|
52
|
+
"@autometa/scopes": "^0.7.1",
|
|
53
|
+
"@autometa/test-builder": "^0.4.1",
|
|
54
|
+
"@autometa/types": "^0.4.1"
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
57
|
"test": "vitest run --passWithNoTests",
|