@genesislcap/foundation-testing 14.202.1-alpha-34c59e8.0 → 14.202.1-alpha-271f747.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/playwright/test.js +6 -6
- package/dist/cjs/playwright-bdd/index.js +31 -1
- package/dist/dts/playwright/test.d.ts +2 -0
- package/dist/dts/playwright/test.d.ts.map +1 -1
- package/dist/dts/playwright-bdd/index.d.ts +9 -0
- package/dist/dts/playwright-bdd/index.d.ts.map +1 -1
- package/dist/esm/playwright/test.js +2 -2
- package/dist/esm/playwright-bdd/index.js +31 -0
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.test = exports.defaultAuditThresholds = exports.playAudit = exports.base = exports.expect = void 0;
|
|
3
|
+
exports.test = exports.defaultAuditThresholds = exports.defaultPackageConfig = exports.DEFAULT_PORT = exports.playAudit = exports.base = exports.expect = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const test_1 = require("@playwright/test");
|
|
6
6
|
const portfinder_sync_1 = require("portfinder-sync");
|
|
@@ -10,12 +10,12 @@ var test_3 = require("@playwright/test");
|
|
|
10
10
|
Object.defineProperty(exports, "base", { enumerable: true, get: function () { return test_3.test; } });
|
|
11
11
|
var playwright_lighthouse_1 = require("playwright-lighthouse");
|
|
12
12
|
Object.defineProperty(exports, "playAudit", { enumerable: true, get: function () { return playwright_lighthouse_1.playAudit; } });
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
exports.DEFAULT_PORT = 5030;
|
|
14
|
+
exports.defaultPackageConfig = {
|
|
15
15
|
API_HOST: process.env.API_HOST,
|
|
16
16
|
DEFAULT_USER: process.env.DEFAULT_USER,
|
|
17
17
|
DEFAULT_PASSWORD: process.env.DEFAULT_PASSWORD,
|
|
18
|
-
PORT: Number(process.env.PORT || DEFAULT_PORT),
|
|
18
|
+
PORT: Number(process.env.PORT || exports.DEFAULT_PORT),
|
|
19
19
|
};
|
|
20
20
|
exports.defaultAuditThresholds = {
|
|
21
21
|
performance: 20,
|
|
@@ -32,10 +32,10 @@ exports.defaultAuditThresholds = {
|
|
|
32
32
|
* fixture for your e2e tests depending on the needs of your app or micro frontend.
|
|
33
33
|
*/
|
|
34
34
|
exports.test = test_1.test.extend({
|
|
35
|
-
config: [defaultPackageConfig, { option: true, scope: 'worker', timeout: 60000 }],
|
|
35
|
+
config: [exports.defaultPackageConfig, { option: true, scope: 'worker', timeout: 60000 }],
|
|
36
36
|
port: [
|
|
37
37
|
({ config }, use) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
38
|
-
const port = (0, portfinder_sync_1.getPort)((config === null || config === void 0 ? void 0 : config.PORT) || process.env.PORT || defaultPackageConfig.PORT);
|
|
38
|
+
const port = (0, portfinder_sync_1.getPort)((config === null || config === void 0 ? void 0 : config.PORT) || process.env.PORT || exports.defaultPackageConfig.PORT);
|
|
39
39
|
yield use(port);
|
|
40
40
|
}),
|
|
41
41
|
{ scope: 'worker' }, // option: true
|
|
@@ -1,6 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PlaywrightBDD = void 0;
|
|
3
|
+
exports.test = exports.PlaywrightBDD = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
+
const test_1 = require("@playwright/test");
|
|
5
6
|
const PlaywrightBDD = tslib_1.__importStar(require("playwright-bdd"));
|
|
6
7
|
exports.PlaywrightBDD = PlaywrightBDD;
|
|
8
|
+
const portfinder_sync_1 = require("portfinder-sync");
|
|
9
|
+
const test_2 = require("../playwright/test");
|
|
10
|
+
/**
|
|
11
|
+
* Playwright BDD test
|
|
12
|
+
* @public
|
|
13
|
+
* @remarks
|
|
14
|
+
* This is just an example playwright-bdd test fixture stub. In reality, you will likely create a custom
|
|
15
|
+
* fixture for your e2e tests depending on the needs of your app or micro frontend.
|
|
16
|
+
*/
|
|
17
|
+
exports.test = PlaywrightBDD.test.extend({
|
|
18
|
+
config: [test_2.defaultPackageConfig, { option: true, scope: 'worker', timeout: 60000 }],
|
|
19
|
+
port: [
|
|
20
|
+
({ config }, use) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
21
|
+
const port = (0, portfinder_sync_1.getPort)((config === null || config === void 0 ? void 0 : config.PORT) || process.env.PORT || test_2.defaultPackageConfig.PORT);
|
|
22
|
+
yield use(port);
|
|
23
|
+
}),
|
|
24
|
+
{ scope: 'worker' }, // option: true
|
|
25
|
+
],
|
|
26
|
+
browser: [
|
|
27
|
+
({ port }, use) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
28
|
+
const browser = yield test_1.chromium.launch({
|
|
29
|
+
args: [`--remote-debugging-port=${port}`],
|
|
30
|
+
});
|
|
31
|
+
yield use(browser);
|
|
32
|
+
}),
|
|
33
|
+
{ scope: 'worker' },
|
|
34
|
+
],
|
|
35
|
+
audit: [test_2.defaultAuditThresholds, { option: true, scope: 'worker' }], // TODO: These are not being used from other test setups extending this.
|
|
36
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../../../src/playwright/test.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAIhD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,IAAI,IAAI,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAChD,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,YAAY,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE7D;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,CA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AC1B,MAAM,EAAE,aAAa,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,eAAe,CAAC;CACxB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,IAAI,6PAmBf,CAAC"}
|
|
@@ -1,3 +1,12 @@
|
|
|
1
1
|
import * as PlaywrightBDD from 'playwright-bdd';
|
|
2
|
+
import { WorkerFixture } from '../playwright/test';
|
|
2
3
|
export { PlaywrightBDD };
|
|
4
|
+
/**
|
|
5
|
+
* Playwright BDD test
|
|
6
|
+
* @public
|
|
7
|
+
* @remarks
|
|
8
|
+
* This is just an example playwright-bdd test fixture stub. In reality, you will likely create a custom
|
|
9
|
+
* fixture for your e2e tests depending on the needs of your app or micro frontend.
|
|
10
|
+
*/
|
|
11
|
+
export declare const test: import("@playwright/test").TestType<import("@playwright/test").PlaywrightTestArgs & import("@playwright/test").PlaywrightTestOptions & import("playwright-bdd/dist/run/bddFixtures/test").BddFixturesTest, import("@playwright/test").PlaywrightWorkerArgs & import("@playwright/test").PlaywrightWorkerOptions & import("playwright-bdd/dist/run/bddFixtures/worker").BddFixturesWorker & WorkerFixture>;
|
|
3
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/playwright-bdd/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/playwright-bdd/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,aAAa,MAAM,gBAAgB,CAAC;AAIhD,OAAO,EAAe,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEhE,OAAO,EAAE,aAAa,EAAE,CAAC;AAEzB;;;;;;GAMG;AACH,eAAO,MAAM,IAAI,2YAmBf,CAAC"}
|
|
@@ -4,8 +4,8 @@ import { getPort } from 'portfinder-sync';
|
|
|
4
4
|
export { expect } from '@playwright/test';
|
|
5
5
|
export { test as base } from '@playwright/test';
|
|
6
6
|
export { playAudit } from 'playwright-lighthouse';
|
|
7
|
-
const DEFAULT_PORT = 5030;
|
|
8
|
-
const defaultPackageConfig = {
|
|
7
|
+
export const DEFAULT_PORT = 5030;
|
|
8
|
+
export const defaultPackageConfig = {
|
|
9
9
|
API_HOST: process.env.API_HOST,
|
|
10
10
|
DEFAULT_USER: process.env.DEFAULT_USER,
|
|
11
11
|
DEFAULT_PASSWORD: process.env.DEFAULT_PASSWORD,
|
|
@@ -1,2 +1,33 @@
|
|
|
1
|
+
import { __awaiter } from "tslib";
|
|
2
|
+
import { chromium } from '@playwright/test';
|
|
1
3
|
import * as PlaywrightBDD from 'playwright-bdd';
|
|
4
|
+
import { getPort } from 'portfinder-sync';
|
|
5
|
+
import { defaultAuditThresholds, defaultPackageConfig } from '../playwright/test';
|
|
2
6
|
export { PlaywrightBDD };
|
|
7
|
+
/**
|
|
8
|
+
* Playwright BDD test
|
|
9
|
+
* @public
|
|
10
|
+
* @remarks
|
|
11
|
+
* This is just an example playwright-bdd test fixture stub. In reality, you will likely create a custom
|
|
12
|
+
* fixture for your e2e tests depending on the needs of your app or micro frontend.
|
|
13
|
+
*/
|
|
14
|
+
export const test = PlaywrightBDD.test.extend({
|
|
15
|
+
config: [defaultPackageConfig, { option: true, scope: 'worker', timeout: 60000 }],
|
|
16
|
+
port: [
|
|
17
|
+
({ config }, use) => __awaiter(void 0, void 0, void 0, function* () {
|
|
18
|
+
const port = getPort((config === null || config === void 0 ? void 0 : config.PORT) || process.env.PORT || defaultPackageConfig.PORT);
|
|
19
|
+
yield use(port);
|
|
20
|
+
}),
|
|
21
|
+
{ scope: 'worker' }, // option: true
|
|
22
|
+
],
|
|
23
|
+
browser: [
|
|
24
|
+
({ port }, use) => __awaiter(void 0, void 0, void 0, function* () {
|
|
25
|
+
const browser = yield chromium.launch({
|
|
26
|
+
args: [`--remote-debugging-port=${port}`],
|
|
27
|
+
});
|
|
28
|
+
yield use(browser);
|
|
29
|
+
}),
|
|
30
|
+
{ scope: 'worker' },
|
|
31
|
+
],
|
|
32
|
+
audit: [defaultAuditThresholds, { option: true, scope: 'worker' }], // TODO: These are not being used from other test setups extending this.
|
|
33
|
+
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/foundation-testing",
|
|
3
3
|
"description": "Genesis Foundation Testing",
|
|
4
|
-
"version": "14.202.1-alpha-
|
|
4
|
+
"version": "14.202.1-alpha-271f747.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"typescript": "^4.9.5"
|
|
80
80
|
},
|
|
81
81
|
"dependencies": {
|
|
82
|
-
"@genesislcap/foundation-logger": "14.202.1-alpha-
|
|
82
|
+
"@genesislcap/foundation-logger": "14.202.1-alpha-271f747.0",
|
|
83
83
|
"@microsoft/fast-element": "^1.12.0",
|
|
84
84
|
"@microsoft/fast-foundation": "^2.49.4",
|
|
85
85
|
"@playwright/test": "^1.18.1",
|
|
@@ -101,5 +101,5 @@
|
|
|
101
101
|
"publishConfig": {
|
|
102
102
|
"access": "public"
|
|
103
103
|
},
|
|
104
|
-
"gitHead": "
|
|
104
|
+
"gitHead": "b5bf689b2c306d4fd5f04e2e1d403ec43cac828a"
|
|
105
105
|
}
|