@o3r/core 11.0.0-next.0 → 11.0.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -2
- package/builders/app-version/index.d.ts.map +1 -1
- package/builders/app-version/index.js +3 -2
- package/builders/app-version/index.js.map +1 -1
- package/builders/lib-build/index.d.ts.map +1 -1
- package/builders/lib-build/index.js +3 -2
- package/builders/lib-build/index.js.map +1 -1
- package/builders/multi-watcher/index.d.ts.map +1 -1
- package/builders/multi-watcher/index.js +5 -3
- package/builders/multi-watcher/index.js.map +1 -1
- package/builders/ngc/index.d.ts.map +1 -1
- package/builders/ngc/index.js +3 -2
- package/builders/ngc/index.js.map +1 -1
- package/builders/pattern-replacement/index.d.ts.map +1 -1
- package/builders/pattern-replacement/index.js +3 -2
- package/builders/pattern-replacement/index.js.map +1 -1
- package/builders/run-script/index.d.ts.map +1 -1
- package/builders/run-script/index.js +3 -2
- package/builders/run-script/index.js.map +1 -1
- package/builders/utils.d.ts +12 -0
- package/builders/utils.d.ts.map +1 -0
- package/builders/utils.js +24 -0
- package/builders/utils.js.map +1 -0
- package/core/interfaces/configuration.d.ts +14 -0
- package/core/interfaces/configuration.d.ts.map +1 -1
- package/core/metadata/component.decorator.d.ts.map +1 -1
- package/esm2022/core/interfaces/configuration.mjs +1 -1
- package/esm2022/messages/message.helpers.mjs +1 -1
- package/esm2022/store/async/async-entity.adapter.mjs +1 -1
- package/esm2022/store/async/async.helpers.mjs +1 -1
- package/esm2022/store/async/async.interfaces.mjs +1 -1
- package/esm2022/store/async/async.operators.mjs +1 -1
- package/esm2022/store/async/async.serializer.mjs +1 -1
- package/esm2022/store/types.mjs +1 -1
- package/esm2022/utils/deep-fill/deep-fill.mjs +1 -1
- package/esm2022/utils/rendering/rendering.helpers.mjs +1 -1
- package/fesm2022/o3r-core.mjs +2 -2
- package/fesm2022/o3r-core.mjs.map +1 -1
- package/messages/message.helpers.d.ts +2 -2
- package/messages/message.helpers.d.ts.map +1 -1
- package/messages/message.helpers.js.map +1 -1
- package/migration.json +1 -1
- package/package.json +49 -36
- package/schematics/add-modules/index.d.ts +1 -1
- package/schematics/add-modules/index.d.ts.map +1 -1
- package/schematics/add-modules/index.js +6 -2
- package/schematics/add-modules/index.js.map +1 -1
- package/schematics/component/container/index.d.ts +1 -1
- package/schematics/component/container/index.d.ts.map +1 -1
- package/schematics/component/container/index.js +13 -6
- package/schematics/component/container/index.js.map +1 -1
- package/schematics/component/index.d.ts +1 -2
- package/schematics/component/index.d.ts.map +1 -1
- package/schematics/component/index.js +10 -25
- package/schematics/component/index.js.map +1 -1
- package/schematics/component/presenter/index.d.ts +1 -1
- package/schematics/component/presenter/index.d.ts.map +1 -1
- package/schematics/component/presenter/index.js +9 -3
- package/schematics/component/presenter/index.js.map +1 -1
- package/schematics/component/schema.d.ts +2 -0
- package/schematics/component/schema.d.ts.map +1 -1
- package/schematics/context-to-component/index.d.ts +2 -1
- package/schematics/context-to-component/index.d.ts.map +1 -1
- package/schematics/context-to-component/index.js +5 -4
- package/schematics/context-to-component/index.js.map +1 -1
- package/schematics/convert-component/index.d.ts +1 -1
- package/schematics/convert-component/index.d.ts.map +1 -1
- package/schematics/convert-component/index.js +7 -2
- package/schematics/convert-component/index.js.map +1 -1
- package/schematics/ng-add/component-decorator/index.d.ts +0 -1
- package/schematics/ng-add/component-decorator/index.d.ts.map +1 -1
- package/schematics/ng-add/component-decorator/index.js +3 -4
- package/schematics/ng-add/component-decorator/index.js.map +1 -1
- package/schematics/ng-add/index.d.ts +1 -1
- package/schematics/ng-add/index.d.ts.map +1 -1
- package/schematics/ng-add/index.js +44 -24
- package/schematics/ng-add/index.js.map +1 -1
- package/schematics/ng-add/project-setup/index.d.ts +5 -3
- package/schematics/ng-add/project-setup/index.d.ts.map +1 -1
- package/schematics/ng-add/project-setup/index.js +27 -23
- package/schematics/ng-add/project-setup/index.js.map +1 -1
- package/schematics/ng-add/schema.d.ts +2 -0
- package/schematics/ng-add/schema.d.ts.map +1 -1
- package/schematics/ng-add/schema.json +5 -0
- package/schematics/ng-add/updates-for-v8/cms-adapters/update-builders-names.js.map +1 -1
- package/schematics/ng-add/updates-for-v8/generators/update-generators-names.js.map +1 -1
- package/schematics/ng-add/utils/linter/index.js +3 -3
- package/schematics/ng-add/utils/linter/index.js.map +1 -1
- package/schematics/ng-add-create/index.d.ts +2 -2
- package/schematics/ng-add-create/index.d.ts.map +1 -1
- package/schematics/ng-add-create/index.js +15 -5
- package/schematics/ng-add-create/index.js.map +1 -1
- package/schematics/ng-add-create/templates/schematics/ng-add/index.ts.template +53 -23
- package/schematics/ng-add-create/templates/schematics/ng-add/schema.json.template +2 -3
- package/schematics/ng-add-create/templates/schematics/ng-add/schema.ts.template +1 -1
- package/schematics/ng-update/index.d.ts +4 -4
- package/schematics/ng-update/index.d.ts.map +1 -1
- package/schematics/ng-update/index.js +14 -6
- package/schematics/ng-update/index.js.map +1 -1
- package/schematics/ng-update/v10.0/configuration.js.map +1 -1
- package/schematics/ng-update/v8.2/import-map.d.ts.map +1 -1
- package/schematics/ng-update/v8.2/import-map.js +3 -0
- package/schematics/ng-update/v8.2/import-map.js.map +1 -1
- package/schematics/page/index.d.ts +1 -1
- package/schematics/page/index.d.ts.map +1 -1
- package/schematics/page/index.js +6 -2
- package/schematics/page/index.js.map +1 -1
- package/schematics/page/schema.json +0 -1
- package/schematics/renovate/index.d.ts +1 -2
- package/schematics/renovate/index.d.ts.map +1 -1
- package/schematics/renovate/index.js +7 -3
- package/schematics/renovate/index.js.map +1 -1
- package/schematics/rule-factories/additional-modules/index.d.ts +3 -2
- package/schematics/rule-factories/additional-modules/index.d.ts.map +1 -1
- package/schematics/rule-factories/additional-modules/index.js +20 -13
- package/schematics/rule-factories/additional-modules/index.js.map +1 -1
- package/schematics/rule-factories/component/analytics.d.ts.map +1 -1
- package/schematics/rule-factories/component/analytics.js +1 -0
- package/schematics/rule-factories/component/analytics.js.map +1 -1
- package/schematics/rule-factories/component/common.d.ts.map +1 -1
- package/schematics/rule-factories/component/common.js +14 -18
- package/schematics/rule-factories/component/common.js.map +1 -1
- package/schematics/rule-factories/component/configuration.d.ts.map +1 -1
- package/schematics/rule-factories/component/configuration.js +1 -0
- package/schematics/rule-factories/component/configuration.js.map +1 -1
- package/schematics/rule-factories/component/context.js +1 -1
- package/schematics/rule-factories/component/context.js.map +1 -1
- package/schematics/rule-factories/component/design-token.d.ts +4 -0
- package/schematics/rule-factories/component/design-token.d.ts.map +1 -0
- package/schematics/rule-factories/component/design-token.js +10 -0
- package/schematics/rule-factories/component/design-token.js.map +1 -0
- package/schematics/rule-factories/component/fixture.d.ts.map +1 -1
- package/schematics/rule-factories/component/fixture.js +1 -0
- package/schematics/rule-factories/component/fixture.js.map +1 -1
- package/schematics/rule-factories/component/localization.d.ts.map +1 -1
- package/schematics/rule-factories/component/localization.js +1 -0
- package/schematics/rule-factories/component/localization.js.map +1 -1
- package/schematics/rule-factories/component/rules-engine.js +1 -1
- package/schematics/rule-factories/component/rules-engine.js.map +1 -1
- package/schematics/rule-factories/customization-environment/index.js.map +1 -1
- package/schematics/rule-factories/index.d.ts +0 -1
- package/schematics/rule-factories/index.d.ts.map +1 -1
- package/schematics/rule-factories/index.js +0 -1
- package/schematics/rule-factories/index.js.map +1 -1
- package/schematics/rule-factories/o3r-basic-updates/index.js.map +1 -1
- package/schematics/rule-factories/otter-environment/index.js +1 -1
- package/schematics/rule-factories/otter-environment/index.js.map +1 -1
- package/schematics/rule-factories/store/index.d.ts +7 -2
- package/schematics/rule-factories/store/index.d.ts.map +1 -1
- package/schematics/rule-factories/store/index.js +31 -38
- package/schematics/rule-factories/store/index.js.map +1 -1
- package/schematics/schematics-update/index.d.ts +1 -2
- package/schematics/schematics-update/index.d.ts.map +1 -1
- package/schematics/schematics-update/index.js +7 -5
- package/schematics/schematics-update/index.js.map +1 -1
- package/schematics/scripts/sub-entry-imports.js.map +1 -1
- package/schematics/service/index.d.ts +2 -2
- package/schematics/service/index.d.ts.map +1 -1
- package/schematics/service/index.js +7 -3
- package/schematics/service/index.js.map +1 -1
- package/schematics/shared/presets/all.preset.d.ts.map +1 -1
- package/schematics/shared/presets/all.preset.js +1 -0
- package/schematics/shared/presets/all.preset.js.map +1 -1
- package/schematics/shared/presets/helpers.d.ts +1 -1
- package/schematics/shared/presets/helpers.d.ts.map +1 -1
- package/schematics/shared/presets/helpers.js +24 -11
- package/schematics/shared/presets/helpers.js.map +1 -1
- package/schematics/shared/presets/preset.interface.d.ts +5 -1
- package/schematics/shared/presets/preset.interface.d.ts.map +1 -1
- package/schematics/show-modules/index.d.ts +1 -1
- package/schematics/show-modules/index.d.ts.map +1 -1
- package/schematics/show-modules/index.js +6 -2
- package/schematics/show-modules/index.js.map +1 -1
- package/schematics/store/entity-async/index.d.ts +1 -2
- package/schematics/store/entity-async/index.d.ts.map +1 -1
- package/schematics/store/entity-async/index.js +6 -3
- package/schematics/store/entity-async/index.js.map +1 -1
- package/schematics/store/entity-sync/index.d.ts +1 -2
- package/schematics/store/entity-sync/index.d.ts.map +1 -1
- package/schematics/store/entity-sync/index.js +6 -3
- package/schematics/store/entity-sync/index.js.map +1 -1
- package/schematics/store/index.d.ts +1 -2
- package/schematics/store/index.d.ts.map +1 -1
- package/schematics/store/index.js +7 -3
- package/schematics/store/index.js.map +1 -1
- package/schematics/store/simple-async/index.d.ts +1 -2
- package/schematics/store/simple-async/index.d.ts.map +1 -1
- package/schematics/store/simple-async/index.js +6 -3
- package/schematics/store/simple-async/index.js.map +1 -1
- package/schematics/store/simple-sync/index.d.ts +1 -6
- package/schematics/store/simple-sync/index.d.ts.map +1 -1
- package/schematics/store/simple-sync/index.js +2 -2
- package/schematics/store/simple-sync/index.js.map +1 -1
- package/schematics/store-action/index.d.ts +2 -3
- package/schematics/store-action/index.d.ts.map +1 -1
- package/schematics/store-action/index.js +11 -9
- package/schematics/store-action/index.js.map +1 -1
- package/store/async/async-entity.adapter.d.ts +8 -8
- package/store/async/async-entity.adapter.d.ts.map +1 -1
- package/store/async/async-entity.adapter.js.map +1 -1
- package/store/async/async.helpers.js.map +1 -1
- package/store/async/async.interfaces.d.ts +2 -2
- package/store/async/async.interfaces.d.ts.map +1 -1
- package/store/async/async.operators.d.ts.map +1 -1
- package/store/async/async.operators.js.map +1 -1
- package/store/async/async.props.d.ts.map +1 -1
- package/store/async/async.serializer.d.ts +1 -1
- package/store/async/async.serializer.d.ts.map +1 -1
- package/store/types.d.ts +5 -5
- package/store/types.d.ts.map +1 -1
- package/utils/deep-fill/deep-fill.js.map +1 -1
- package/utils/rendering/rendering.helpers.js.map +1 -1
- package/schematics/rule-factories/playwright/index.d.ts +0 -11
- package/schematics/rule-factories/playwright/index.d.ts.map +0 -1
- package/schematics/rule-factories/playwright/index.js +0 -66
- package/schematics/rule-factories/playwright/index.js.map +0 -1
- package/schematics/rule-factories/playwright/templates/e2e-playwright/playwright-config.sanity.ts.template +0 -12
- package/schematics/rule-factories/playwright/templates/e2e-playwright/playwright-config.ts.template +0 -34
- package/schematics/rule-factories/playwright/templates/e2e-playwright/sanity/__sanity@dasherize__.e2e.ts +0 -7
- package/schematics/rule-factories/playwright/templates/e2e-playwright/scenarios/__name@dasherize__.e2e-playwright-spec.ts +0 -19
- package/schematics/rule-factories/playwright/templates/e2e-playwright/utils/base-scenario.ts +0 -29
- package/schematics/rule-factories/playwright/templates/e2e-playwright/utils/index.ts +0 -1
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updatePlaywright = void 0;
|
|
4
|
-
const core_1 = require("@angular-devkit/core");
|
|
5
|
-
const schematics_1 = require("@angular-devkit/schematics");
|
|
6
|
-
const schematics_2 = require("@o3r/schematics");
|
|
7
|
-
const dependencies_1 = require("@schematics/angular/utility/dependencies");
|
|
8
|
-
const path = require("node:path");
|
|
9
|
-
/**
|
|
10
|
-
* Add Playwright to Otter application
|
|
11
|
-
*
|
|
12
|
-
* @param options @see RuleFactory.options
|
|
13
|
-
* @param options.projectName
|
|
14
|
-
* @param rootPath @see RuleFactory.rootPath
|
|
15
|
-
*/
|
|
16
|
-
function updatePlaywright(rootPath, options = {}) {
|
|
17
|
-
return (tree, context) => {
|
|
18
|
-
// update gitignore
|
|
19
|
-
if (tree.exists('/.gitignore')) {
|
|
20
|
-
let gitignore = tree.read('/.gitignore').toString();
|
|
21
|
-
if (!gitignore.includes('dist*') && !gitignore.includes('/dist-e2e-playwright') && !gitignore.includes('/playwright-reports')) {
|
|
22
|
-
gitignore +=
|
|
23
|
-
`
|
|
24
|
-
# Playwright
|
|
25
|
-
/dist-e2e-playwright
|
|
26
|
-
/playwright-reports
|
|
27
|
-
`;
|
|
28
|
-
tree.overwrite('/.gitignore', gitignore);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
// register scripts
|
|
32
|
-
if (tree.exists('/package.json')) {
|
|
33
|
-
const packageJson = JSON.parse(tree.read('/package.json').toString());
|
|
34
|
-
packageJson.scripts ||= {};
|
|
35
|
-
packageJson.scripts['test:playwright'] ||= 'playwright test --config=e2e-playwright/playwright-config.ts';
|
|
36
|
-
packageJson.scripts['test:playwright:sanity'] ||= 'playwright test --config=e2e-playwright/playwright-config.sanity.ts';
|
|
37
|
-
tree.overwrite('/package.json', JSON.stringify(packageJson, null, 2));
|
|
38
|
-
}
|
|
39
|
-
const corePackageJsonPath = path.resolve(__dirname, '..', '..', '..', 'package.json');
|
|
40
|
-
const ngAddRules = (0, schematics_2.ngAddPeerDependencyPackages)(['@playwright/test', 'rimraf'], corePackageJsonPath, dependencies_1.NodeDependencyType.Dev, { ...options, skipNgAddSchematicRun: true });
|
|
41
|
-
// generate files
|
|
42
|
-
if (!tree.exists('/e2e-playwright/playwright-config.ts')) {
|
|
43
|
-
const name = 'my-scenario';
|
|
44
|
-
const scenarioName = core_1.strings.capitalize(core_1.strings.camelize(name));
|
|
45
|
-
const sanity = 'my-sanity';
|
|
46
|
-
const sanityName = core_1.strings.capitalize(core_1.strings.camelize(sanity));
|
|
47
|
-
const templateSource = (0, schematics_1.apply)((0, schematics_1.url)((0, schematics_2.getTemplateFolder)(rootPath, __dirname)), [
|
|
48
|
-
(0, schematics_1.template)({
|
|
49
|
-
...core_1.strings,
|
|
50
|
-
name,
|
|
51
|
-
scenarioName,
|
|
52
|
-
sanity,
|
|
53
|
-
sanityName
|
|
54
|
-
}),
|
|
55
|
-
(0, schematics_1.renameTemplateFiles)()
|
|
56
|
-
]);
|
|
57
|
-
return (0, schematics_1.chain)([
|
|
58
|
-
ngAddRules,
|
|
59
|
-
(0, schematics_1.mergeWith)(templateSource, schematics_1.MergeStrategy.Overwrite)
|
|
60
|
-
])(tree, context);
|
|
61
|
-
}
|
|
62
|
-
return ngAddRules(tree, context);
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
exports.updatePlaywright = updatePlaywright;
|
|
66
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../schematics/rule-factories/playwright/index.ts"],"names":[],"mappings":";;;AAAA,+CAA+C;AAC/C,2DAAsJ;AACtJ,gDAAsG;AACtG,2EAA8E;AAC9E,kCAAkC;AAElC;;;;;;GAMG;AACH,SAAgB,gBAAgB,CAAC,QAAgB,EAAE,UAA+B,EAAE;IAClF,OAAO,CAAC,IAAU,EAAE,OAAyB,EAAE,EAAE;QAE/C,mBAAmB;QACnB,IAAI,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE;YAC9B,IAAI,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,CAAE,CAAC,QAAQ,EAAE,CAAC;YACrD,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,sBAAsB,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,qBAAqB,CAAC,EAAE;gBAC7H,SAAS;oBACP;;;;CAIT,CAAC;gBACM,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC;aAC1C;SACF;QAED,mBAAmB;QACnB,IAAI,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE;YAChC,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;YACvE,WAAW,CAAC,OAAO,KAAK,EAAE,CAAC;YAC3B,WAAW,CAAC,OAAO,CAAC,iBAAiB,CAAC,KAAK,8DAA8D,CAAC;YAC1G,WAAW,CAAC,OAAO,CAAC,wBAAwB,CAAC,KAAK,qEAAqE,CAAC;YACxH,IAAI,CAAC,SAAS,CAAC,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;SACvE;QACD,MAAM,mBAAmB,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;QACtF,MAAM,UAAU,GAAG,IAAA,wCAA2B,EAAC,CAAC,kBAAkB,EAAE,QAAQ,CAAC,EAAE,mBAAmB,EAAE,iCAAkB,CAAC,GAAG,EAAE,EAAC,GAAG,OAAO,EAAE,qBAAqB,EAAE,IAAI,EAAC,CAAC,CAAC;QAEvK,iBAAiB;QACjB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,sCAAsC,CAAC,EAAE;YACxD,MAAM,IAAI,GAAG,aAAa,CAAC;YAC3B,MAAM,YAAY,GAAG,cAAO,CAAC,UAAU,CAAC,cAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;YAChE,MAAM,MAAM,GAAG,WAAW,CAAC;YAC3B,MAAM,UAAU,GAAG,cAAO,CAAC,UAAU,CAAC,cAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;YAEhE,MAAM,cAAc,GAAG,IAAA,kBAAK,EAAC,IAAA,gBAAG,EAAC,IAAA,8BAAiB,EAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,EAAE;gBACxE,IAAA,qBAAQ,EAAC;oBACP,GAAG,cAAO;oBACV,IAAI;oBACJ,YAAY;oBACZ,MAAM;oBACN,UAAU;iBACX,CAAC;gBACF,IAAA,gCAAmB,GAAE;aACtB,CAAC,CAAC;YAEH,OAAO,IAAA,kBAAK,EAAC;gBACX,UAAU;gBACV,IAAA,sBAAS,EAAC,cAAc,EAAE,0BAAa,CAAC,SAAS,CAAC;aACnD,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;SACnB;QAED,OAAO,UAAU,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACnC,CAAC,CAAC;AACJ,CAAC;AAtDD,4CAsDC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import {PlaywrightTestConfig} from '@playwright/test';
|
|
2
|
-
import * as path from 'node:path';
|
|
3
|
-
|
|
4
|
-
import {default as defaultConfig} from './playwright-config';
|
|
5
|
-
|
|
6
|
-
const config: PlaywrightTestConfig = {
|
|
7
|
-
...defaultConfig,
|
|
8
|
-
testDir: path.join(__dirname, 'sanity'),
|
|
9
|
-
testMatch: /.*\.e2e\.ts$/
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export default config;
|
package/schematics/rule-factories/playwright/templates/e2e-playwright/playwright-config.ts.template
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { adjustPath } from '@o3r/testing/tools/path-replacement';
|
|
2
|
-
import type { PlaywrightTestConfig } from '@playwright/test';
|
|
3
|
-
import * as path from 'node:path';
|
|
4
|
-
|
|
5
|
-
adjustPath('playwright');
|
|
6
|
-
|
|
7
|
-
const FIVE_MINUTES = 1_000 * 60 * 5;
|
|
8
|
-
|
|
9
|
-
const reportsFolder = path.join(__dirname, '..', 'playwright-reports');
|
|
10
|
-
|
|
11
|
-
const config: PlaywrightTestConfig = {
|
|
12
|
-
testDir: path.join(__dirname, '..', 'e2e-playwright'),
|
|
13
|
-
testMatch: /.*\.e2e-playwright-spec.ts$/,
|
|
14
|
-
reporter: [
|
|
15
|
-
['list'],
|
|
16
|
-
['junit', {outputFile: path.join(reportsFolder, 'junit', 'reporter.xml')}],
|
|
17
|
-
['html', {open: 'never', outputFolder: path.join(reportsFolder, 'html')}]
|
|
18
|
-
],
|
|
19
|
-
retries: process.env.CI ? 3 : 0,
|
|
20
|
-
forbidOnly: !!process.env.CI,
|
|
21
|
-
timeout: FIVE_MINUTES,
|
|
22
|
-
use: {
|
|
23
|
-
ignoreHTTPSErrors: true,
|
|
24
|
-
screenshot: 'only-on-failure',
|
|
25
|
-
trace: 'retain-on-failure'
|
|
26
|
-
},
|
|
27
|
-
projects: [
|
|
28
|
-
{name: 'Chromium', use: {browserName: 'chromium'}},
|
|
29
|
-
{name: 'Webkit', use: {browserName: 'webkit'}},
|
|
30
|
-
{name: 'Firefox', use: {browserName: 'firefox'}}
|
|
31
|
-
]
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export default config;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { expect, test } from '@playwright/test';
|
|
2
|
-
import { BaseScenario } from '../utils';
|
|
3
|
-
|
|
4
|
-
export class <%= classify(scenarioName) %> extends BaseScenario {
|
|
5
|
-
protected <%= camelize(scenarioName) %>() {
|
|
6
|
-
test.describe.serial('Empty <%= classify(scenarioName) %> tests', () => {
|
|
7
|
-
test('Empty test', async ({ page }) => {
|
|
8
|
-
await page.goto(this.targetUrl);
|
|
9
|
-
await expect(page).toHaveTitle('TestApp');
|
|
10
|
-
});
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
public performFlow() {
|
|
15
|
-
this.<%= camelize(scenarioName) %>();
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
new <%= classify(scenarioName) %>().run();
|
package/schematics/rule-factories/playwright/templates/e2e-playwright/utils/base-scenario.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { test } from '@playwright/test';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Interface to define the interface of a flow test
|
|
5
|
-
*/
|
|
6
|
-
export interface Flow {
|
|
7
|
-
/**
|
|
8
|
-
* Run the flow
|
|
9
|
-
*/
|
|
10
|
-
performFlow(): void;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Base scenario for e2e scenarios.
|
|
15
|
-
* Init the fetch manager and call `performFlow` method.
|
|
16
|
-
* E2E Booking flows should inherit from this class.
|
|
17
|
-
*/
|
|
18
|
-
export abstract class BaseScenario implements Flow {
|
|
19
|
-
|
|
20
|
-
public targetUrl = process.env.PLAYWRIGHT_TARGET_URL || 'http://localhost:4200/';
|
|
21
|
-
|
|
22
|
-
public abstract performFlow();
|
|
23
|
-
|
|
24
|
-
public run() {
|
|
25
|
-
test.describe.serial(this.constructor.name, () => {
|
|
26
|
-
this.performFlow();
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './base-scenario';
|