@o3r/testing 11.6.0-prerelease.7 → 11.6.0-prerelease.8
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/core/angular/angular-materials/autocomplete-material.d.ts +0 -1
- package/core/angular/angular-materials/autocomplete-material.d.ts.map +1 -1
- package/core/angular/angular-materials/autocomplete-material.js.map +1 -1
- package/core/angular/angular-materials/select-material.d.ts +0 -1
- package/core/angular/angular-materials/select-material.d.ts.map +1 -1
- package/core/angular/angular-materials/select-material.js +4 -3
- package/core/angular/angular-materials/select-material.js.map +1 -1
- package/core/angular/angular-materials/slider-material.d.ts.map +1 -1
- package/core/angular/angular-materials/slider-material.js.map +1 -1
- package/core/angular/component-fixture.d.ts.map +1 -1
- package/core/angular/component-fixture.js +3 -10
- package/core/angular/component-fixture.js.map +1 -1
- package/core/angular/element.d.ts.map +1 -1
- package/core/angular/element.js +2 -2
- package/core/angular/element.js.map +1 -1
- package/core/angular/elements/checkbox-element.d.ts.map +1 -1
- package/core/angular/elements/checkbox-element.js.map +1 -1
- package/core/angular/elements/radio-element.d.ts.map +1 -1
- package/core/angular/elements/radio-element.js.map +1 -1
- package/core/angular/elements/select-element.d.ts +0 -1
- package/core/angular/elements/select-element.d.ts.map +1 -1
- package/core/angular/elements/select-element.js +2 -2
- package/core/angular/elements/select-element.js.map +1 -1
- package/core/angular/elements/slider-element.d.ts +2 -1
- package/core/angular/elements/slider-element.d.ts.map +1 -1
- package/core/angular/elements/slider-element.js +2 -1
- package/core/angular/elements/slider-element.js.map +1 -1
- package/core/angular/group.d.ts.map +1 -1
- package/core/angular/group.js.map +1 -1
- package/core/angular/groups/radio-group.d.ts.map +1 -1
- package/core/angular/groups/radio-group.js.map +1 -1
- package/core/angular/index.d.ts +3 -2
- package/core/angular/index.d.ts.map +1 -1
- package/core/angular/index.js +2 -2
- package/core/angular/index.js.map +1 -1
- package/core/angular/page-fixture.d.ts.map +1 -1
- package/core/angular/page-fixture.js.map +1 -1
- package/core/angular-materials/autocomplete-material.d.ts.map +1 -1
- package/core/angular-materials/autocomplete-material.js.map +1 -1
- package/core/angular-materials/select-material.d.ts.map +1 -1
- package/core/angular-materials/select-material.js.map +1 -1
- package/core/angular-materials/slider-material.d.ts.map +1 -1
- package/core/angular-materials/slider-material.js.map +1 -1
- package/core/component-fixture.d.ts +18 -36
- package/core/component-fixture.d.ts.map +1 -1
- package/core/component-fixture.js +18 -36
- package/core/component-fixture.js.map +1 -1
- package/core/element.d.ts.map +1 -1
- package/core/element.js.map +1 -1
- package/core/elements/checkbox-element.d.ts.map +1 -1
- package/core/elements/checkbox-element.js.map +1 -1
- package/core/elements/radio-element.d.ts.map +1 -1
- package/core/elements/radio-element.js.map +1 -1
- package/core/elements/select-element.d.ts.map +1 -1
- package/core/elements/select-element.js.map +1 -1
- package/core/elements/slider-element.d.ts.map +1 -1
- package/core/elements/slider-element.js.map +1 -1
- package/core/group.d.ts.map +1 -1
- package/core/group.js.map +1 -1
- package/core/groups/radio-group.d.ts.map +1 -1
- package/core/groups/radio-group.js.map +1 -1
- package/core/helpers.d.ts +1 -1
- package/core/helpers.d.ts.map +1 -1
- package/core/helpers.js.map +1 -1
- package/core/index.d.ts +2 -2
- package/core/index.d.ts.map +1 -1
- package/core/index.js +2 -2
- package/core/index.js.map +1 -1
- package/core/page-fixture.d.ts.map +1 -1
- package/core/page-fixture.js.map +1 -1
- package/core/playwright/angular-materials/autocomplete-material.d.ts +0 -1
- package/core/playwright/angular-materials/autocomplete-material.d.ts.map +1 -1
- package/core/playwright/angular-materials/autocomplete-material.js +1 -1
- package/core/playwright/angular-materials/autocomplete-material.js.map +1 -1
- package/core/playwright/angular-materials/select-material.d.ts +0 -1
- package/core/playwright/angular-materials/select-material.d.ts.map +1 -1
- package/core/playwright/angular-materials/select-material.js +3 -3
- package/core/playwright/angular-materials/select-material.js.map +1 -1
- package/core/playwright/angular-materials/slider-material.d.ts.map +1 -1
- package/core/playwright/angular-materials/slider-material.js.map +1 -1
- package/core/playwright/component-fixture.d.ts.map +1 -1
- package/core/playwright/component-fixture.js +2 -10
- package/core/playwright/component-fixture.js.map +1 -1
- package/core/playwright/element.d.ts.map +1 -1
- package/core/playwright/element.js +11 -10
- package/core/playwright/element.js.map +1 -1
- package/core/playwright/elements/checkbox-element.d.ts +2 -1
- package/core/playwright/elements/checkbox-element.d.ts.map +1 -1
- package/core/playwright/elements/checkbox-element.js +4 -1
- package/core/playwright/elements/checkbox-element.js.map +1 -1
- package/core/playwright/elements/index.d.ts +2 -2
- package/core/playwright/elements/index.d.ts.map +1 -1
- package/core/playwright/elements/index.js +2 -2
- package/core/playwright/elements/index.js.map +1 -1
- package/core/playwright/elements/radio-element.d.ts.map +1 -1
- package/core/playwright/elements/radio-element.js +1 -0
- package/core/playwright/elements/radio-element.js.map +1 -1
- package/core/playwright/elements/select-element.d.ts.map +1 -1
- package/core/playwright/elements/select-element.js.map +1 -1
- package/core/playwright/elements/slider-element.d.ts.map +1 -1
- package/core/playwright/elements/slider-element.js.map +1 -1
- package/core/playwright/group.d.ts.map +1 -1
- package/core/playwright/group.js.map +1 -1
- package/core/playwright/groups/radio-group.d.ts.map +1 -1
- package/core/playwright/groups/radio-group.js.map +1 -1
- package/core/playwright/index.d.ts +3 -2
- package/core/playwright/index.d.ts.map +1 -1
- package/core/playwright/index.js +2 -2
- package/core/playwright/index.js.map +1 -1
- package/core/playwright/page-fixture.d.ts.map +1 -1
- package/core/playwright/page-fixture.js.map +1 -1
- package/core/protractor/angular-materials/autocomplete-material.d.ts +0 -1
- package/core/protractor/angular-materials/autocomplete-material.d.ts.map +1 -1
- package/core/protractor/angular-materials/autocomplete-material.js.map +1 -1
- package/core/protractor/angular-materials/select-material.d.ts +0 -1
- package/core/protractor/angular-materials/select-material.d.ts.map +1 -1
- package/core/protractor/angular-materials/select-material.js +7 -6
- package/core/protractor/angular-materials/select-material.js.map +1 -1
- package/core/protractor/component-fixture.d.ts.map +1 -1
- package/core/protractor/component-fixture.js +6 -11
- package/core/protractor/component-fixture.js.map +1 -1
- package/core/protractor/element.d.ts.map +1 -1
- package/core/protractor/element.js +6 -4
- package/core/protractor/element.js.map +1 -1
- package/core/protractor/elements/checkbox-element.d.ts.map +1 -1
- package/core/protractor/elements/checkbox-element.js.map +1 -1
- package/core/protractor/elements/index.d.ts +1 -1
- package/core/protractor/elements/index.d.ts.map +1 -1
- package/core/protractor/elements/index.js +1 -1
- package/core/protractor/elements/index.js.map +1 -1
- package/core/protractor/elements/radio-element.d.ts.map +1 -1
- package/core/protractor/elements/radio-element.js +1 -0
- package/core/protractor/elements/radio-element.js.map +1 -1
- package/core/protractor/elements/select-element.d.ts +0 -1
- package/core/protractor/elements/select-element.d.ts.map +1 -1
- package/core/protractor/elements/select-element.js.map +1 -1
- package/core/protractor/group.d.ts.map +1 -1
- package/core/protractor/group.js.map +1 -1
- package/core/protractor/groups/radio-group.d.ts.map +1 -1
- package/core/protractor/groups/radio-group.js +1 -0
- package/core/protractor/groups/radio-group.js.map +1 -1
- package/core/protractor/index.d.ts +3 -2
- package/core/protractor/index.d.ts.map +1 -1
- package/core/protractor/index.js +2 -2
- package/core/protractor/index.js.map +1 -1
- package/core/protractor/page-fixture.d.ts.map +1 -1
- package/core/protractor/page-fixture.js.map +1 -1
- package/core/protractor/utils.d.ts.map +1 -1
- package/core/protractor/utils.js.map +1 -1
- package/esm/visual-test/utils.d.ts +2 -2
- package/esm/visual-test/utils.js +3 -3
- package/esm/visual-test/utils.js.map +1 -1
- package/kassette/update-dates-in-mocks.d.ts.map +1 -1
- package/kassette/update-dates-in-mocks.js +3 -3
- package/kassette/update-dates-in-mocks.js.map +1 -1
- package/localization/localization-mock.d.ts.map +1 -1
- package/localization/localization-mock.js.map +1 -1
- package/mocks/mock-component-generator.d.ts +1 -1
- package/mocks/mock-component-generator.d.ts.map +1 -1
- package/mocks/mock-component-generator.js +15 -14
- package/mocks/mock-component-generator.js.map +1 -1
- package/package.json +23 -18
- package/schematics/add-functions-to-fixture/helpers.d.ts +0 -2
- package/schematics/add-functions-to-fixture/helpers.d.ts.map +1 -1
- package/schematics/add-functions-to-fixture/helpers.js +2 -4
- package/schematics/add-functions-to-fixture/helpers.js.map +1 -1
- package/schematics/add-functions-to-fixture/index.d.ts.map +1 -1
- package/schematics/add-functions-to-fixture/index.js +6 -6
- package/schematics/add-functions-to-fixture/index.js.map +1 -1
- package/schematics/add-functions-to-fixture/schema.d.ts.map +1 -1
- package/schematics/fixture-to-component/index.d.ts.map +1 -1
- package/schematics/fixture-to-component/index.js +1 -1
- package/schematics/fixture-to-component/index.js.map +1 -1
- package/schematics/fixture-to-component/schema.d.ts.map +1 -1
- package/schematics/ng-add/fixture/index.d.ts.map +1 -1
- package/schematics/ng-add/fixture/index.js +4 -5
- package/schematics/ng-add/fixture/index.js.map +1 -1
- package/schematics/ng-add/index.d.ts.map +1 -1
- package/schematics/ng-add/index.js +16 -23
- package/schematics/ng-add/index.js.map +1 -1
- package/schematics/ng-add/playwright/index.d.ts.map +1 -1
- package/schematics/ng-add/playwright/index.js +5 -5
- package/schematics/ng-add/playwright/index.js.map +1 -1
- package/schematics/ng-add/schema.d.ts.map +1 -1
- package/schematics/ng-update/v9-0/index.d.ts.map +1 -1
- package/schematics/ng-update/v9-0/index.js +1 -1
- package/schematics/ng-update/v9-0/index.js.map +1 -1
- package/schematics/ng-update/v9-0/localization-imports/localization-imports-map.d.ts.map +1 -1
- package/schematics/ng-update/v9-0/localization-imports/localization-imports-map.js.map +1 -1
- package/schematics/ng-update/v9-0/localization-imports/localization-imports.d.ts.map +1 -1
- package/schematics/ng-update/v9-0/localization-imports/localization-imports.js +1 -2
- package/schematics/ng-update/v9-0/localization-imports/localization-imports.js.map +1 -1
- package/schematics/ng-update/v9-0/throw-on-undefined/throw-on-undefined.d.ts.map +1 -1
- package/schematics/ng-update/v9-0/throw-on-undefined/throw-on-undefined.js +13 -13
- package/schematics/ng-update/v9-0/throw-on-undefined/throw-on-undefined.js.map +1 -1
- package/schematics/playwright/sanity/index.d.ts.map +1 -1
- package/schematics/playwright/sanity/index.js.map +1 -1
- package/schematics/playwright/sanity/schema.d.ts.map +1 -1
- package/schematics/playwright/scenario/index.d.ts.map +1 -1
- package/schematics/playwright/scenario/index.js.map +1 -1
- package/schematics/playwright/scenario/schema.d.ts.map +1 -1
- package/store/testable-select.d.ts +1 -1
- package/store/testable-select.d.ts.map +1 -1
- package/store/testable-select.js +3 -2
- package/store/testable-select.js.map +1 -1
- package/store/typings.d.ts.map +1 -1
- package/store/typings.js.map +1 -1
- package/tools/index.d.ts +1 -1
- package/tools/index.d.ts.map +1 -1
- package/tools/index.js +1 -1
- package/tools/index.js.map +1 -1
- package/tools/path-replacement/path-replacement.d.ts.map +1 -1
- package/tools/path-replacement/path-replacement.js +6 -7
- package/tools/path-replacement/path-replacement.js.map +1 -1
- package/tools/protractor/fetch-manager/utils.d.ts.map +1 -1
- package/tools/protractor/fetch-manager/utils.js.map +1 -1
- package/tools/protractor/post-message-interceptor/post-message-interceptor.d.ts.map +1 -1
- package/tools/protractor/post-message-interceptor/post-message-interceptor.js.map +1 -1
- package/visual-test/utils.d.ts +2 -2
- package/visual-test/utils.js +3 -3
- package/visual-test/utils.js.map +1 -1
- package/visual-test/visual-test.d.ts +1 -1
- package/visual-test/visual-test.d.ts.map +1 -1
- package/visual-test/visual-test.js +6 -6
- package/visual-test/visual-test.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/core/protractor/utils.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/core/protractor/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,IAAI,QAAQ,EACpB,MAAM,YAAY,CAAC;AAEpB;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,cAE7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/core/protractor/utils.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/core/protractor/utils.ts"],"names":[],"mappings":";;AASA,wCAEC;AAPD;;;;GAIG;AACH,SAAgB,cAAc,CAAI,OAA4B;IAC5D,OAAO,IAAI,OAAO,CAAI,UAAC,OAAO,EAAE,MAAM,IAAK,OAAA,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,EAA7B,CAA6B,CAAC,CAAC;AAC5E,CAAC","sourcesContent":["import {\n promise as pPromise,\n} from 'protractor';\n\n/**\n * Converts a webdriver promise to ES6 promise so the rest of the framework handles ES6 promises only\n * @deprecated Will be removed in v13, please use Playwright instead\n * @param promise\n */\nexport function convertPromise<T>(promise: pPromise.Promise<T>) {\n return new Promise<T>((resolve, reject) => promise.then(resolve, reject));\n}\n"]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Prepare css rule to hide specific blocks
|
|
3
3
|
*
|
|
4
4
|
* Should be called only once during the visual test.
|
|
5
|
-
* @note
|
|
5
|
+
* @note this function is evaluated in the context of the page and should not use external variables
|
|
6
6
|
* @param ignoreClass
|
|
7
7
|
*/
|
|
8
8
|
export declare function prepareVisualTesting(ignoreClass?: string): void;
|
|
@@ -12,7 +12,7 @@ export declare function prepareVisualTesting(ignoreClass?: string): void;
|
|
|
12
12
|
export declare function isVisualTestingEnabled(): boolean;
|
|
13
13
|
/**
|
|
14
14
|
* Toggle the visual testing view : if it is active, will hide tagged components as grey blocks.
|
|
15
|
-
* @note
|
|
15
|
+
* @note this function is evaluated in the context of the page and cannot use external code
|
|
16
16
|
* @param enabled
|
|
17
17
|
*/
|
|
18
18
|
export declare function toggleVisualTestingRender(enabled: boolean): void;
|
package/esm/visual-test/utils.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Prepare css rule to hide specific blocks
|
|
3
3
|
*
|
|
4
4
|
* Should be called only once during the visual test.
|
|
5
|
-
* @note
|
|
5
|
+
* @note this function is evaluated in the context of the page and should not use external variables
|
|
6
6
|
* @param ignoreClass
|
|
7
7
|
*/
|
|
8
8
|
export function prepareVisualTesting(ignoreClass = 'e2e-ignore') {
|
|
@@ -21,7 +21,7 @@ export function prepareVisualTesting(ignoreClass = 'e2e-ignore') {
|
|
|
21
21
|
left: 0;
|
|
22
22
|
top: 0;
|
|
23
23
|
}`;
|
|
24
|
-
document.head.
|
|
24
|
+
document.head.append(visualTestingCss);
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
27
|
* Determine if the visual testing is enabled
|
|
@@ -32,7 +32,7 @@ export function isVisualTestingEnabled() {
|
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
34
|
* Toggle the visual testing view : if it is active, will hide tagged components as grey blocks.
|
|
35
|
-
* @note
|
|
35
|
+
* @note this function is evaluated in the context of the page and cannot use external code
|
|
36
36
|
* @param enabled
|
|
37
37
|
*/
|
|
38
38
|
export function toggleVisualTestingRender(enabled) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/visual-test/utils.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,WAAW,GAAG,YAAY;IAC7D,MAAM,gBAAgB,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IACzD,MAAM,kBAAkB,GAAG,uBAAuB,CAAC;IACnD,gBAAgB,CAAC,WAAW,GAAG;OAC1B,kBAAkB,KAAK,WAAW;;OAElC,kBAAkB,KAAK,WAAW;;;;;;;;;IASrC,CAAC;IAEH,QAAQ,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/visual-test/utils.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,WAAW,GAAG,YAAY;IAC7D,MAAM,gBAAgB,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IACzD,MAAM,kBAAkB,GAAG,uBAAuB,CAAC;IACnD,gBAAgB,CAAC,WAAW,GAAG;OAC1B,kBAAkB,KAAK,WAAW;;OAElC,kBAAkB,KAAK,WAAW;;;;;;;;;IASrC,CAAC;IAEH,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;AACzC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB;IACpC,MAAM,kBAAkB,GAAG,uBAAuB,CAAC;IACnD,OAAO,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC;AAC9D,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,yBAAyB,CAAC,OAAgB;IACxD,MAAM,kBAAkB,GAAG,uBAAuB,CAAC;IACnD,IAAI,OAAO,EAAE,CAAC;QACZ,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;IAClD,CAAC;SAAM,CAAC;QACN,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;IACrD,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-dates-in-mocks.d.ts","sourceRoot":"","sources":["../../src/kassette/update-dates-in-mocks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"update-dates-in-mocks.d.ts","sourceRoot":"","sources":["../../src/kassette/update-dates-in-mocks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACN,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,QAAQ,EACT,MAAM,mBAAmB,CAAC;AAE3B;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;;OAIG;IACH,IAAI,EAAE,KAAK,GAAG,YAAY,GAAG,kBAAkB,CAAC;IAChD;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,SAAS,EAAE;QACT;;;WAGG;QACH,QAAQ,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,aAAa,GAAG,QAAQ,CAAC,SAAS,KAAK,MAAM,CAAC;QACzE;;;WAGG;QACH,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,QAAQ,CAAC,aAAa,GAAG,QAAQ,CAAC,SAAS,CAAC;KACxE,CAAC;CACH;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,KAAK,EAAE,YAAY,GAAE,OAAO,CAAC,yBAAyB,CAAM,iBAsE1G"}
|
|
@@ -21,9 +21,9 @@ function updateDatesInMocks(mock_1) {
|
|
|
21
21
|
fromDate: function (date) { return date.toString().substring(0, plainDateLength); },
|
|
22
22
|
toDate: function (input) {
|
|
23
23
|
input = input.replace(/\.\d+/, '').replace(/Z/, '+00:00');
|
|
24
|
-
return input.length > plainDateLength
|
|
25
|
-
temporal_polyfill_1.Temporal.ZonedDateTime.from("".concat(input.replace(/(\.\d+)/, ''), "[").concat(input.replace(/^.*(\+\d{2}:\d{2}).*$/, '$1') || '+00:00', "]"))
|
|
26
|
-
temporal_polyfill_1.Temporal.PlainDate.from(input);
|
|
24
|
+
return input.length > plainDateLength
|
|
25
|
+
? temporal_polyfill_1.Temporal.ZonedDateTime.from("".concat(input.replace(/(\.\d+)/, ''), "[").concat(input.replace(/^.*(\+\d{2}:\d{2}).*$/, '$1') || '+00:00', "]"))
|
|
26
|
+
: temporal_polyfill_1.Temporal.PlainDate.from(input);
|
|
27
27
|
}
|
|
28
28
|
} }, inputOptions);
|
|
29
29
|
todayTime = temporal_polyfill_1.Temporal.Now.plainDateISO();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-dates-in-mocks.js","sourceRoot":"","sources":["../../src/kassette/update-dates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AAM,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,YAAU,CAAC,CAAC,EAA3E,CAA2E,CAAC,CAAC;4BACnI,CAAC;4BACD,KAAK,kBAAkB,CAAC,CAAC,CAAC;gCACxB,OAAO,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,EAAE,UAAC,KAAK,IAAK,OAAA,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,WAAI,IAAI,CAAC,IAAI,CAAC,YAAU,CAAC,IAAI,GAAG,CAAC,CAAC,MAAG,CAAC,CAAC,EAAtG,CAAsG,CAAC,CAAC;4BAC9J,CAAC;wBACH,CAAC;wBACD,OAAO,MAAM,CAAC;oBAChB,CAAC,CAAC;oBACI,cAAc,GAAG,IAAI,CAAC,aAAa,CAAC;wBACxC,IAAI,EAAE,YAAY,CAAC,IAAI;wBACvB,IAAI,EAAE,oBAAoB,CAAC,CAAA,MAAA,YAAY,CAAC,IAAI,0CAAE,QAAQ,EAAE,KAAI,EAAE,CAAC;qBAChE,CAAC,CAAC;oBACH,IAAI,CAAC,uBAAuB,CAAC,cAAc,CAAC,CAAC;oBAC7C,qBAAM,IAAI,CAAC,YAAY,EAAE,EAAA;;oBAAzB,SAAyB,CAAC;;;;;;CAIjC","sourcesContent":["import type {\n IMock,\n} from '@amadeus-it-group/kassette';\nimport {\n Temporal,\n} from 'temporal-polyfill';\n\n/**\n * Options to be passed to `updateDatesInMocks`\n */\nexport interface UpdateDatesInMocksOptions {\n /**\n * 'any': dates in inputs will be ignored when computing checksum, the dates on the output will be updated to keep the same day offset\n * 'day-offset': dates in inputs will be converted to day offsets, the dates on the output will be updated to keep the same day offset\n * 'same-day-of-week': dates in inputs will be converted to day of week, the dates on the output will be updated to keep the same day of week but increment the week\n */\n mode: 'any' | 'day-offset' | 'same-day-of-week';\n /**\n * RegExp used to extract dates from request and response\n */\n extractor: RegExp;\n /**\n * Functions to be used to convert from Temporal objects to strings, and strings to temporal objects\n */\n converter: {\n /**\n * Converter from Temporal to string\n * @param input\n */\n fromDate: (input: Temporal.ZonedDateTime | Temporal.PlainDate) => string;\n /**\n * Converter from string to Temporal\n * @param input\n */\n toDate: (input: string) => Temporal.ZonedDateTime | Temporal.PlainDate;\n };\n}\n\n/**\n * Update mock checksum and response body to keep using the same mocks every day with updated dates\n * @param mock the mock instance provided by the hook method of Kassette\n * @param inputOptions default options will extract ISO strings and use 'day-offset' mode\n */\nexport async function updateDatesInMocks(mock: IMock, inputOptions: Partial<UpdateDatesInMocksOptions> = {}) {\n const plainDateLength = 'YYYY-MM-DDThh:mm:ss'.length;\n const options: UpdateDatesInMocksOptions = {\n mode: 'day-offset',\n extractor: /\\b(\\d{4}-\\d{2}-\\d{2})[^\"]*/g,\n converter: {\n fromDate: (date) => date.toString().substring(0, plainDateLength),\n toDate: (input) => {\n input = input.replace(/\\.\\d+/, '').replace(/Z/, '+00:00');\n return input.length > plainDateLength\n ? Temporal.ZonedDateTime.from(`${input.replace(/(\\.\\d+)/, '')}[${input.replace(/^.*(\\+\\d{2}:\\d{2}).*$/, '$1') || '+00:00'}]`)\n : Temporal.PlainDate.from(input);\n }\n },\n ...inputOptions\n };\n const todayTime = Temporal.Now.plainDateISO();\n\n // Update request\n const replaceDatesInInput = (input: string): string => {\n switch (options.mode) {\n case 'any': {\n return input.replace(options.extractor, '<any>');\n }\n case 'day-offset': {\n return input.replace(options.extractor, (match) => `<t+${Temporal.PlainDate.from(todayTime).until(options.converter.toDate(match)).toString()}>`);\n }\n case 'same-day-of-week': {\n return input.replace(options.extractor, (match) => `<day ${options.converter.toDate(match).dayOfWeek} next week>`);\n }\n }\n return input;\n };\n const checksum = await mock.checksum({\n headers: false,\n body: { filter: (body) => replaceDatesInInput(body.toString()) },\n query: { filter: (params) => Object.fromEntries(Object.entries(params).map(([key, value]) => [key, replaceDatesInInput(value)])) },\n customData: { updateDatesMode: options.mode }\n });\n mock.setLocalPath([mock.localPath, checksum]);\n\n // Update response\n if (/get|post/.test(mock.request.method) && (await mock.hasLocalMock())) {\n const localPayload = (await mock.readLocalPayload())?.payload;\n if (localPayload && localPayload.data.creationDateTime) {\n const referenceTime = Temporal.PlainDate.from(localPayload.data.creationDateTime.toISOString().substring(0, 10));\n const timeOffset = Temporal.PlainDate.from(referenceTime).until(todayTime, { smallestUnit: 'days', largestUnit: 'days' });\n if (timeOffset.days !== 0) {\n mock.setMode('manual');\n const replaceDatesInOutput = (output: string): string => {\n switch (options.mode) {\n case 'any':\n case 'day-offset': {\n return output.replace(options.extractor, (match) => options.converter.fromDate(options.converter.toDate(match).add(timeOffset)));\n }\n case 'same-day-of-week': {\n return output.replace(options.extractor, (match) => options.converter.fromDate(options.converter.toDate(match).add(`P${Math.ceil(timeOffset.days / 7)}W`)));\n }\n }\n return output;\n };\n const wrappedPayload = mock.createPayload({\n data: localPayload.data,\n body: replaceDatesInOutput(localPayload.body?.toString() || '')\n });\n mock.fillResponseFromPayload(wrappedPayload);\n await mock.sendResponse();\n }\n }\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localization-mock.d.ts","sourceRoot":"","sources":["../../src/localization/localization-mock.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"localization-mock.d.ts","sourceRoot":"","sources":["../../src/localization/localization-mock.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EAGnB,aAAa,EACb,QAAQ,EACT,MAAM,eAAe,CAAC;AAKvB,OAAO,EACL,yBAAyB,EACzB,kBAAkB,EAEnB,MAAM,mBAAmB,CAAC;AAY3B,qBACa,iBAAkB,YAAW,aAAa;IAC9C,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,MAAM,GAAG,SAAS;CAGrD;AAED,qBACa,oBAAqB,YAAW,aAAa;IACjD,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,MAAM,GAAG,SAAS;CAGrD;AAED,qBAIa,2BAA2B;WACxB,OAAO,CAAC,cAAc,UAAQ,GAAG,mBAAmB,CAAC,2BAA2B,CAAC;CAMhG;AAED,oDAAoD;AACpD,MAAM,WAAW,gBAAgB;IAC/B,CAAC,IAAI,EAAE,MAAM,GAAG;QACd,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAC;CACH;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,yBAAyB,GAAE,OAAO,CAAC,yBAAyB,CAAoC,EAChG,YAAY,GAAE,gBAAqB,EACnC,2BAA2B,CAAC,EAAE,QAAQ,EACtC,QAAQ,UAAQ,EAChB,cAAc,UAAQ,GACrB,mBAAmB,CAAC,kBAAkB,CAAC,EAAE,CAc3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localization-mock.js","sourceRoot":"","sources":["../../src/localization/localization-mock.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"localization-mock.js","sourceRoot":"","sources":["../../src/localization/localization-mock.ts"],"names":[],"mappings":";;;AAsEA,wDAoBC;;AA1FD,sCAMuB;AACvB,4CAG6B;AAC7B,kDAI2B;AAC3B,6BAEc;AAEd,IAAM,gCAAgC,GAAuC;IAC3E,gBAAgB,EAAE,CAAC,IAAI,CAAC;IACxB,QAAQ,EAAE,IAAI;IACd,WAAW,EAAE,EAAE;IACf,gBAAgB,EAAE,IAAI;CACvB,CAAC;AAGF;IAAA;IAIA,CAAC;IAHQ,qCAAS,GAAhB;QAAiB,cAAc;aAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;YAAd,yBAAc;;QAC7B,OAAO,IAAI,IAAI,IAAI,CAAC,GAAG,CAAC,UAAC,GAAG,IAAK,OAAA,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAf,CAAe,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/D,CAAC;IAHU,iBAAiB;QAD7B,IAAA,W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AA,iBAAmC;IAEnC,yBAAA,EAAA,gBAAgB;IAChB,+BAAA,EAAA,sBAAsB;IAEtB;QACE,iCAAkB,CAAC,OAAO,CAAC,cAAM,OAAA,yBAAyB,EAAzB,CAAyB,CAAC;QAC3D,sBAAe,CAAC,OAAO,CAAC;YACtB,MAAM,EAAE;gBACN,OAAO,EAAE,sBAAe;gBACxB,QAAQ,EAAE;oBACR,cAAc,EAAE,UAAC,IAAY,IAAK,OAAA,IAAA,SAAE,EAAC,YAAY,CAAC,IAAI,CAAC,CAAC,EAAtB,CAAsB;iBACzD;aACF;YACD,QAAQ,EAAE,2BAA2B;SACtC,CAAC;OACC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,2BAA2B,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,QAC1E;AACJ,CAAC","sourcesContent":["import {\n ModuleWithProviders,\n NgModule,\n Pipe,\n PipeTransform,\n Provider,\n} from '@angular/core';\nimport {\n TranslateLoader,\n TranslateModule,\n} from '@ngx-translate/core';\nimport {\n LocalizationConfiguration,\n LocalizationModule,\n LocalizationTranslatePipe,\n} from '@o3r/localization';\nimport {\n of,\n} from 'rxjs';\n\nconst defaultLocalizationConfiguration: Partial<LocalizationConfiguration> = {\n supportedLocales: ['en'],\n language: 'en',\n endPointUrl: '',\n fallbackLanguage: 'en'\n};\n\n@Pipe({ name: 'translate' })\nexport class TranslatePipeMock implements PipeTransform {\n public transform(...args: any[]): string | undefined {\n return args && args.map((arg) => JSON.parse(arg)).join(', ');\n }\n}\n\n@Pipe({ name: 'o3rTranslate' })\nexport class O3rTranslatePipeMock implements PipeTransform {\n public transform(...args: any[]): string | undefined {\n return args && args.map((arg) => JSON.parse(arg)).join(', ');\n }\n}\n\n@NgModule({\n declarations: [TranslatePipeMock, O3rTranslatePipeMock],\n exports: [TranslatePipeMock, O3rTranslatePipeMock]\n})\nexport class LocalizationDependencyMocks {\n public static forTest(pipeWithPrefix = false): ModuleWithProviders<LocalizationDependencyMocks> {\n return {\n ngModule: LocalizationDependencyMocks,\n providers: [{ provide: LocalizationTranslatePipe, useClass: pipeWithPrefix ? O3rTranslatePipeMock : TranslatePipeMock }]\n };\n }\n}\n\n/** Mock to provide to the MockTranslation module */\nexport interface MockTranslations {\n [lang: string]: {\n [key: string]: any;\n };\n}\n\n/**\n * Function to get the list of modules required to test component using Localization module\n * @param localizationConfiguration Localization configuration\n * @param translations Translations to use\n * @param translationCompilerProvider Provider for translations compiler\n * @param mockPipe Enable translation pipe mocking\n * @param pipeWithPrefix Enable pipe with prefix\n * @returns List of modules to import in the TestBed\n */\nexport function mockTranslationModules(\n localizationConfiguration: Partial<LocalizationConfiguration> = defaultLocalizationConfiguration,\n translations: MockTranslations = {},\n translationCompilerProvider?: Provider,\n mockPipe = false,\n pipeWithPrefix = false\n): ModuleWithProviders<LocalizationModule>[] {\n return [\n LocalizationModule.forRoot(() => localizationConfiguration),\n TranslateModule.forRoot({\n loader: {\n provide: TranslateLoader,\n useValue: {\n getTranslation: (lang: string) => of(translations[lang])\n }\n },\n compiler: translationCompilerProvider\n }),\n ...(mockPipe ? [LocalizationDependencyMocks.forTest(pipeWithPrefix)] : [])\n ];\n}\n"]}
|
|
@@ -20,7 +20,7 @@ import { Type } from '@angular/core';
|
|
|
20
20
|
* class MockComponent extends generateMockComponent('hero.component.ts') {}
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
|
-
export declare function generateMockComponent<T
|
|
23
|
+
export declare function generateMockComponent<T = Record<string, unknown>>(componentPath: string, config?: {
|
|
24
24
|
template?: string;
|
|
25
25
|
isControlValueAccessor?: boolean;
|
|
26
26
|
}): Type<T>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock-component-generator.d.ts","sourceRoot":"","sources":["../../src/mocks/mock-component-generator.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"mock-component-generator.d.ts","sourceRoot":"","sources":["../../src/mocks/mock-component-generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,IAAI,EACL,MAAM,eAAe,CAAC;AAyGvB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,sBAAsB,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAAC,CAAC,CAAC,CAyCnK"}
|
|
@@ -11,7 +11,7 @@ var ts = require("typescript");
|
|
|
11
11
|
* @param source Typescript source file
|
|
12
12
|
*/
|
|
13
13
|
function isInputNode(node, source) {
|
|
14
|
-
return ts.isDecorator(node) &&
|
|
14
|
+
return ts.isDecorator(node) && node.getText(source).startsWith('@Input');
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* Determine if the node in an output field
|
|
@@ -19,7 +19,7 @@ function isInputNode(node, source) {
|
|
|
19
19
|
* @param source Typescript source file
|
|
20
20
|
*/
|
|
21
21
|
function isOutputNode(node, source) {
|
|
22
|
-
return ts.isDecorator(node) &&
|
|
22
|
+
return ts.isDecorator(node) && node.getText(source).startsWith('@Output');
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* Get the name of the input / output
|
|
@@ -28,7 +28,7 @@ function isOutputNode(node, source) {
|
|
|
28
28
|
* @param source Typescript source file
|
|
29
29
|
*/
|
|
30
30
|
function getIOName(currentNode, decorator, source) {
|
|
31
|
-
var nameInDecorator = decorator.getText(source).match(/@(
|
|
31
|
+
var nameInDecorator = decorator.getText(source).match(/@(input|output) *\( *(["'](.*)["'])? *\) */i);
|
|
32
32
|
if (nameInDecorator && nameInDecorator[3]) {
|
|
33
33
|
return nameInDecorator[3];
|
|
34
34
|
}
|
|
@@ -92,7 +92,7 @@ function getSelector(parentNode, source, isInDecorator, isInComponentConfig) {
|
|
|
92
92
|
foundSelector = true;
|
|
93
93
|
}
|
|
94
94
|
else if (foundSelector && ts.isStringLiteral(node)) {
|
|
95
|
-
ret = node.getText(source).replace(/['
|
|
95
|
+
ret = node.getText(source).replace(/["']/gi, '');
|
|
96
96
|
}
|
|
97
97
|
else if (isInDecorator && ts.isIdentifier(node) && node.getText(source) === 'Component') {
|
|
98
98
|
foundDecorator = true;
|
|
@@ -127,7 +127,6 @@ function getSelector(parentNode, source, isInDecorator, isInComponentConfig) {
|
|
|
127
127
|
* class MockComponent extends generateMockComponent('hero.component.ts') {}
|
|
128
128
|
* ```
|
|
129
129
|
*/
|
|
130
|
-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-constraint
|
|
131
130
|
function generateMockComponent(componentPath, config) {
|
|
132
131
|
var program = ts.createProgram([componentPath], {});
|
|
133
132
|
var source = program.getSourceFile(componentPath);
|
|
@@ -148,14 +147,16 @@ function generateMockComponent(componentPath, config) {
|
|
|
148
147
|
}
|
|
149
148
|
return class_1;
|
|
150
149
|
}());
|
|
151
|
-
return (0, core_1.Component)(tslib_1.__assign({ template: config
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
150
|
+
return (0, core_1.Component)(tslib_1.__assign({ template: (config === null || config === void 0 ? void 0 : config.template) || '', selector: getSelector(source, source) || '', inputs: inputs, outputs: outputs }, (config && config.isControlValueAccessor)
|
|
151
|
+
? {
|
|
152
|
+
providers: [
|
|
153
|
+
{
|
|
154
|
+
provide: forms_1.NG_VALUE_ACCESSOR,
|
|
155
|
+
useExisting: (0, core_1.forwardRef)(function () { return mock; }),
|
|
156
|
+
multi: true
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
}
|
|
160
|
+
: {}))(mock);
|
|
160
161
|
}
|
|
161
162
|
//# sourceMappingURL=mock-component-generator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock-component-generator.js","sourceRoot":"","sources":["../../src/mocks/mock-component-generator.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"mock-component-generator.js","sourceRoot":"","sources":["../../src/mocks/mock-component-generator.ts"],"names":[],"mappings":";;AAmIA,sDAyCC;;AA5KD,sCAKuB;AACvB,wCAEwB;AACxB,+BAAiC;AAEjC;;;;GAIG;AACH,SAAS,WAAW,CAAC,IAAa,EAAE,MAAqB;IACvD,OAAO,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;AAC3E,CAAC;AAED;;;;GAIG;AACH,SAAS,YAAY,CAAC,IAAa,EAAE,MAAqB;IACxD,OAAO,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;AAC5E,CAAC;AAED;;;;;GAKG;AACH,SAAS,SAAS,CAAC,WAAoB,EAAE,SAAuB,EAAE,MAAqB;IACrF,IAAM,eAAe,GAAG,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,6CAA6C,CAAC,CAAC;IACvG,IAAI,eAAe,IAAI,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;QAC1C,OAAO,eAAe,CAAC,CAAC,CAAC,CAAC;IAC5B,CAAC;SAAM,CAAC;QACN,IAAI,MAAwB,CAAC;QAC7B,WAAW,CAAC,YAAY,CAAC,UAAC,IAAI;YAC5B,IAAI,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC1B,MAAI,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YAC9B,CAAC;QACH,CAAC,CAAC,CAAC;QACH,OAAO,MAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,SAAS,OAAO,CAAC,UAAmB,EAAE,M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port * as ts from 'typescript';\n\n/**\n * Determine if the node in an input field\n * @param node Typescript AST Node\n * @param source Typescript source file\n */\nfunction isInputNode(node: ts.Node, source: ts.SourceFile): node is ts.Decorator {\n return ts.isDecorator(node) && node.getText(source).startsWith('@Input');\n}\n\n/**\n * Determine if the node in an output field\n * @param node Typescript AST Node\n * @param source Typescript source file\n */\nfunction isOutputNode(node: ts.Node, source: ts.SourceFile): node is ts.Decorator {\n return ts.isDecorator(node) && node.getText(source).startsWith('@Output');\n}\n\n/**\n * Get the name of the input / output\n * @param currentNode Typescript AST Node\n * @param decorator Current Input/Output decorator node\n * @param source Typescript source file\n */\nfunction getIOName(currentNode: ts.Node, decorator: ts.Decorator, source: ts.SourceFile): string | undefined {\n const nameInDecorator = decorator.getText(source).match(/@(input|output) *\\( *([\"'](.*)[\"'])? *\\) */i);\n if (nameInDecorator && nameInDecorator[3]) {\n return nameInDecorator[3];\n } else {\n let name: string | undefined;\n currentNode.forEachChild((node) => {\n if (ts.isIdentifier(node)) {\n name = node.getText(source);\n }\n });\n return name;\n }\n}\n\n/**\n * Get the list of Input and Output of a component\n * @param parentNode Typescript AST Node\n * @param source Typescript source file\n */\nfunction parseIO(parentNode: ts.Node, source: ts.SourceFile): { outputs: string[]; inputs: string[] } {\n const outputs: string[] = [];\n const inputs: string[] = [];\n\n parentNode.forEachChild((node) => {\n if (isInputNode(node, source)) {\n const name = getIOName(parentNode, node, source);\n if (name) {\n inputs.push(name);\n }\n } else if (isOutputNode(node, source)) {\n const name = getIOName(parentNode, node, source);\n if (name) {\n outputs.push(name);\n }\n } else {\n const childrenResult = parseIO(node, source);\n inputs.push(...childrenResult.inputs);\n outputs.push(...childrenResult.outputs);\n }\n });\n\n return {\n outputs,\n inputs\n };\n}\n\n/**\n * Get the selector of an angular class\n * @param parentNode Typescript AST Node\n * @param source Typescript source file\n * @param isInDecorator true if the recursive execution is in a decorator\n * @param isInComponentConfig true if the recursive execution is in a component decorator configuration\n */\nfunction getSelector(parentNode: ts.Node, source: ts.SourceFile, isInDecorator = false, isInComponentConfig = false) {\n let foundDecorator = false;\n let foundSelector = false;\n let ret: string | undefined;\n parentNode.forEachChild((node) => {\n if (isInDecorator && isInComponentConfig && ts.isIdentifier(node) && node.getText(source) === 'selector') {\n foundSelector = true;\n } else if (foundSelector && ts.isStringLiteral(node)) {\n ret = node.getText(source).replace(/[\"']/gi, '');\n } else if (isInDecorator && ts.isIdentifier(node) && node.getText(source) === 'Component') {\n foundDecorator = true;\n } else if (isInDecorator && foundDecorator && ts.isObjectLiteralExpression(node)) {\n ret = ret || getSelector(node, source, isInDecorator, true);\n } else {\n ret = ret || getSelector(node, source, isInDecorator || ts.isDecorator(node), isInComponentConfig);\n }\n });\n return ret;\n}\n\n/**\n * Generate a mock class base on a component file\n * @param componentPath Path to the component file to mock\n * @param config Object containing the following configurations:\n * template: should be provided if the template contain `<ng-content></ng-content>`\n * isControlValueAccessor: should be provided if the component extends ControlValueAccessor\n * @param config.template\n * @param config.isControlValueAccessor\n * @example\n * ```typescript\n * // hero.component.ts\n * \\@Component({selector: 'hero'})\n * class HeroComponent {\n * \\@Input() name: string;\n * \\@Output() doSomething: EventEmitter<void>\n * }\n *\n * // mock generation\n * class MockComponent extends generateMockComponent('hero.component.ts') {}\n * ```\n */\nexport function generateMockComponent<T = Record<string, unknown>>(componentPath: string, config?: { template?: string; isControlValueAccessor?: boolean }): Type<T> {\n const program = ts.createProgram([componentPath], {});\n const source = program.getSourceFile(componentPath);\n if (!source) {\n throw new Error('No Source found');\n }\n\n const { outputs, inputs } = parseIO(source, source);\n const mock = class {\n public writeValue: any;\n public registerOnChange: any;\n public registerOnTouched: any;\n\n constructor() {\n Object.keys(outputs)\n .forEach((outputName) => (this as any)[outputName] = new EventEmitter<any>());\n if (config && config.isControlValueAccessor) {\n this.writeValue = () => {};\n this.registerOnChange = () => {};\n this.registerOnTouched = () => {};\n }\n }\n };\n\n return Component({\n template: config?.template || '',\n selector: getSelector(source, source) || '',\n inputs,\n outputs,\n ...(config && config.isControlValueAccessor)\n ? {\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => mock),\n multi: true\n }\n ]\n }\n : {}\n })(mock) as Type<T>;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@o3r/testing",
|
|
3
|
-
"version": "11.6.0-prerelease.
|
|
3
|
+
"version": "11.6.0-prerelease.8",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -108,9 +108,9 @@
|
|
|
108
108
|
"@material/slider": "^14.0.0",
|
|
109
109
|
"@ngrx/store": "~18.0.0",
|
|
110
110
|
"@ngx-translate/core": "~15.0.0",
|
|
111
|
-
"@o3r/core": "^11.6.0-prerelease.
|
|
112
|
-
"@o3r/localization": "^11.6.0-prerelease.
|
|
113
|
-
"@o3r/schematics": "^11.6.0-prerelease.
|
|
111
|
+
"@o3r/core": "^11.6.0-prerelease.8",
|
|
112
|
+
"@o3r/localization": "^11.6.0-prerelease.8",
|
|
113
|
+
"@o3r/schematics": "^11.6.0-prerelease.8",
|
|
114
114
|
"@playwright/test": "~1.49.0",
|
|
115
115
|
"@schematics/angular": "~18.2.0",
|
|
116
116
|
"pixelmatch": "^5.2.1",
|
|
@@ -181,7 +181,6 @@
|
|
|
181
181
|
"@angular-devkit/build-angular": "~18.2.0",
|
|
182
182
|
"@angular-devkit/core": "~18.2.0",
|
|
183
183
|
"@angular-devkit/schematics": "~18.2.0",
|
|
184
|
-
"@angular-eslint/eslint-plugin": "~18.3.0",
|
|
185
184
|
"@angular/cli": "~18.2.0",
|
|
186
185
|
"@angular/common": "~18.2.0",
|
|
187
186
|
"@angular/compiler": "~18.2.0",
|
|
@@ -193,35 +192,40 @@
|
|
|
193
192
|
"@babel/core": "~7.26.0",
|
|
194
193
|
"@babel/preset-typescript": "~7.26.0",
|
|
195
194
|
"@compodoc/compodoc": "^1.1.19",
|
|
195
|
+
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
|
|
196
196
|
"@material/slider": "^14.0.0",
|
|
197
197
|
"@ngrx/store": "~18.0.0",
|
|
198
198
|
"@ngx-translate/core": "~15.0.0",
|
|
199
199
|
"@nx/eslint-plugin": "~19.5.0",
|
|
200
200
|
"@nx/jest": "~19.5.0",
|
|
201
|
-
"@o3r/build-helpers": "^11.6.0-prerelease.
|
|
202
|
-
"@o3r/core": "^11.6.0-prerelease.
|
|
203
|
-
"@o3r/eslint-plugin": "^11.6.0-prerelease.
|
|
204
|
-
"@o3r/localization": "^11.6.0-prerelease.
|
|
205
|
-
"@o3r/schematics": "^11.6.0-prerelease.
|
|
206
|
-
"@o3r/test-helpers": "^11.6.0-prerelease.
|
|
201
|
+
"@o3r/build-helpers": "^11.6.0-prerelease.8",
|
|
202
|
+
"@o3r/core": "^11.6.0-prerelease.8",
|
|
203
|
+
"@o3r/eslint-plugin": "^11.6.0-prerelease.8",
|
|
204
|
+
"@o3r/localization": "^11.6.0-prerelease.8",
|
|
205
|
+
"@o3r/schematics": "^11.6.0-prerelease.8",
|
|
206
|
+
"@o3r/test-helpers": "^11.6.0-prerelease.8",
|
|
207
207
|
"@playwright/test": "~1.49.0",
|
|
208
208
|
"@schematics/angular": "~18.2.0",
|
|
209
|
-
"@stylistic/eslint-plugin
|
|
209
|
+
"@stylistic/eslint-plugin": "~2.7.0",
|
|
210
210
|
"@types/jest": "~29.5.2",
|
|
211
211
|
"@types/node": "^20.0.0",
|
|
212
212
|
"@types/pixelmatch": "^5.2.3",
|
|
213
213
|
"@types/pngjs": "^6.0.0",
|
|
214
|
-
"@typescript-eslint/
|
|
215
|
-
"
|
|
216
|
-
"@typescript-eslint/utils": "^7.14.1",
|
|
214
|
+
"@typescript-eslint/parser": "~8.12.2",
|
|
215
|
+
"angular-eslint": "~18.4.0",
|
|
217
216
|
"concurrently": "^8.0.0",
|
|
218
217
|
"cpy-cli": "^5.0.0",
|
|
219
|
-
"eslint": "
|
|
218
|
+
"eslint": "~9.14.0",
|
|
220
219
|
"eslint-import-resolver-node": "^0.3.9",
|
|
220
|
+
"eslint-import-resolver-typescript": "^3.6.3",
|
|
221
|
+
"eslint-plugin-import": "^2.31.0",
|
|
222
|
+
"eslint-plugin-import-newlines": "^1.4.0",
|
|
221
223
|
"eslint-plugin-jest": "~28.8.0",
|
|
222
|
-
"eslint-plugin-jsdoc": "~
|
|
224
|
+
"eslint-plugin-jsdoc": "~50.2.0",
|
|
223
225
|
"eslint-plugin-prefer-arrow": "~1.2.3",
|
|
224
|
-
"eslint-plugin-unicorn": "^
|
|
226
|
+
"eslint-plugin-unicorn": "^56.0.0",
|
|
227
|
+
"eslint-plugin-unused-imports": "^4.1.4",
|
|
228
|
+
"globals": "^15.9.0",
|
|
225
229
|
"isomorphic-fetch": "~3.0.0",
|
|
226
230
|
"jest": "~29.7.0",
|
|
227
231
|
"jest-environment-jsdom": "~29.7.0",
|
|
@@ -240,6 +244,7 @@
|
|
|
240
244
|
"ts-node": "~10.9.2",
|
|
241
245
|
"type-fest": "^4.10.2",
|
|
242
246
|
"typescript": "~5.5.4",
|
|
247
|
+
"typescript-eslint": "~8.12.2",
|
|
243
248
|
"zone.js": "~0.14.2"
|
|
244
249
|
},
|
|
245
250
|
"schematics": "./collection.json",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { MethodType } from './models';
|
|
2
2
|
/**
|
|
3
3
|
* Get the signature of the function
|
|
4
|
-
*
|
|
5
4
|
* @param methodType the type of the method
|
|
6
5
|
* @param selector query selector
|
|
7
6
|
* @returns the signature of the function
|
|
@@ -9,7 +8,6 @@ import { MethodType } from './models';
|
|
|
9
8
|
export declare const getSignature: (methodType: MethodType, selector: string) => string;
|
|
10
9
|
/**
|
|
11
10
|
* Get the implementation of the function
|
|
12
|
-
*
|
|
13
11
|
* @param methodType the type of the method
|
|
14
12
|
* @param classPropSelector the selector class property
|
|
15
13
|
* @returns the implementation of the function
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../schematics/add-functions-to-fixture/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../schematics/add-functions-to-fixture/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAEX,MAAM,UAAU,CAAC;AAyClB;;;;;GAKG;AACH,eAAO,MAAM,YAAY,eACX,UAAU,YACZ,MAAM,WA6BjB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,eAChB,UAAU,qBACH,MAAM,WAqD1B,CAAC"}
|
|
@@ -6,8 +6,8 @@ const getMethodName = (selector, method) => {
|
|
|
6
6
|
// PascalCase converter
|
|
7
7
|
const formattedSelectedText = selector
|
|
8
8
|
.toLowerCase()
|
|
9
|
-
.replace(new RegExp(/[-
|
|
10
|
-
.replace(new RegExp(/[^\w
|
|
9
|
+
.replace(new RegExp(/[_-]+/, 'g'), ' ')
|
|
10
|
+
.replace(new RegExp(/[^\s\w]/, 'g'), '')
|
|
11
11
|
.replace(new RegExp(/\s+(.)(\w*)/, 'g'), (_$1, $2, $3) => $2.toUpperCase() + $3)
|
|
12
12
|
.replace(new RegExp(/\w/), (s) => s.toUpperCase());
|
|
13
13
|
switch (method) {
|
|
@@ -39,7 +39,6 @@ const getMethodName = (selector, method) => {
|
|
|
39
39
|
};
|
|
40
40
|
/**
|
|
41
41
|
* Get the signature of the function
|
|
42
|
-
*
|
|
43
42
|
* @param methodType the type of the method
|
|
44
43
|
* @param selector query selector
|
|
45
44
|
* @returns the signature of the function
|
|
@@ -76,7 +75,6 @@ const getSignature = (methodType, selector) => {
|
|
|
76
75
|
exports.getSignature = getSignature;
|
|
77
76
|
/**
|
|
78
77
|
* Get the implementation of the function
|
|
79
|
-
*
|
|
80
78
|
* @param methodType the type of the method
|
|
81
79
|
* @param classPropSelector the selector class property
|
|
82
80
|
* @returns the implementation of the function
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../schematics/add-functions-to-fixture/helpers.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../schematics/add-functions-to-fixture/helpers.ts"],"names":[],"mappings":";;;AAAA,qCAGkB;AAElB,MAAM,aAAa,GAAG,CAAC,QAAgB,EAAE,MAAkB,EAAE,EAAE;IAC7D,uBAAuB;IACvB,MAAM,qBAAqB,GAAG,QAAQ;SACnC,WAAW,EAAE;SACb,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC;SACtC,OAAO,CAAC,IAAI,MAAM,CAAC,SAAS,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC;SACvC,OAAO,CACN,IAAI,MAAM,CAAC,aAAa,EAAE,GAAG,CAAC,EAC9B,CAAC,GAAW,EAAE,EAAU,EAAE,EAAU,EAAE,EAAE,CAAC,EAAE,CAAC,WAAW,EAAE,GAAG,EAAE,CAC/D;SACA,OAAO,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;IACrD,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,eAAe,CAAC,CAAC,CAAC;YACrB,OAAO,UAAU,qBAAqB,QAAQ,CAAC;QACjD,CAAC;QACD,KAAK,SAAS,CAAC,CAAC,CAAC;YACf,OAAO,MAAM,qBAAqB,MAAM,CAAC;QAC3C,CAAC;QACD,KAAK,eAAe,CAAC,CAAC,CAAC;YACrB,OAAO,MAAM,qBAAqB,OAAO,CAAC;QAC5C,CAAC;QACD,KAAK,eAAe,CAAC,CAAC,CAAC;YACrB,OAAO,MAAM,qBAAqB,OAAO,CAAC;QAC5C,CAAC;QACD,KAAK,eAAe,CAAC,CAAC,CAAC;YACrB,OAAO,MA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AU,OAAO,mBAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QACtD,CAAC;QACD,OAAO,CAAC,CAAC,CAAC;YACR,OAAO,GAAG,UAAU,IAAI,CAAC;QAC3B,CAAC;IACH,CAAC;AACH,CAAC,CAAC;AA/BW,QAAA,YAAY,gBA+BvB;AAEF;;;;;GAKG;AACI,MAAM,iBAAiB,GAAG,CAC/B,UAAsB,EACtB,iBAAyB,EACzB,EAAE;IACF,QAAQ,UAAU,EAAE,CAAC;QACnB,KAAK,eAAe,CAAC,CAAC,CAAC;YACrB,OAAO;mDACsC,iBAAiB;;IAEhE,CAAC;QACD,CAAC;QACD,KAAK,SAAS,CAAC,CAAC,CAAC;YACf,OAAO;mDACsC,iBAAiB;;IAEhE,CAAC;QACD,CAAC;QACD,KAAK,eAAe,CAAC,CAAC,CAAC;YACrB,OAAO;mDACsC,iBAAiB;;IAEhE,CAAC;QACD,CAAC;QACD,KAAK,eAAe,CAAC,CAAC,CAAC;YACrB,OAAO;mDACsC,iBAAiB;;IAEhE,CAAC;QACD,CAAC;QACD,KAAK,eAAe,CAAC,CAAC,CAAC;YACrB,OAAO;gDACmC,iBAAiB;;;IAG7D,CAAC;QACD,CAAC;QACD,KAAK,mBAAmB,CAAC,CAAC,CAAC;YACzB,OAAO;gDACmC,iBAAiB;;;IAG7D,CAAC;QACD,CAAC;QACD,KAAK,kBAAkB,CAAC,CAAC,CAAC;YACxB,OAAO;gDACmC,iBAAiB;;IAE7D,CAAC;QACD,CAAC;QACD,OAAO,CAAC,CAAC,CAAC;YACR,OAAO;;IAET,CAAC;QACD,CAAC;IACH,CAAC;AACH,CAAC,CAAC;AAvDW,QAAA,iBAAiB,qBAuD5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/add-functions-to-fixture/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/add-functions-to-fixture/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,IAAI,EAEL,MAAM,4BAA4B,CAAC;AAcpC,OAAO,EACL,uCAAuC,EACxC,MAAM,UAAU,CAAC;AA8DlB;;;GAGG;AACH,eAAO,MAAM,uBAAuB,4DAAmE,CAAC"}
|
|
@@ -29,20 +29,20 @@ function ngAddFunctionsToFixtureFn(options) {
|
|
|
29
29
|
const recorder = tree.beginUpdate(path);
|
|
30
30
|
sourceFile.forEachChild((node) => {
|
|
31
31
|
if (ts.isInterfaceDeclaration(node)) {
|
|
32
|
-
const methodSignatures = node.getChildren().filter(ts.isMethodSignature);
|
|
33
|
-
const lastMethodSignature = methodSignatures
|
|
32
|
+
const methodSignatures = node.getChildren().filter((child) => ts.isMethodSignature(child));
|
|
33
|
+
const lastMethodSignature = methodSignatures.at(-1);
|
|
34
34
|
const posForSignature = lastMethodSignature ? lastMethodSignature.end + 1 : node.end - 1;
|
|
35
35
|
recorder.insertLeft(posForSignature, codeForInterface);
|
|
36
36
|
}
|
|
37
37
|
else if (ts.isClassDeclaration(node)) {
|
|
38
38
|
if (index === 0) {
|
|
39
|
-
const propDeclarations = node.members.filter(ts.isPropertyDeclaration);
|
|
40
|
-
const lastPropDecl = propDeclarations
|
|
39
|
+
const propDeclarations = node.members.filter((child) => ts.isPropertyDeclaration(child));
|
|
40
|
+
const lastPropDecl = propDeclarations.at(-1);
|
|
41
41
|
const posForSelectorProp = lastPropDecl ? lastPropDecl.end + 1 : node.end - 1;
|
|
42
42
|
recorder.insertLeft(posForSelectorProp, codeForSelectorProp);
|
|
43
43
|
}
|
|
44
|
-
const methodDeclarations = node.getChildren().filter(ts.isMethodDeclaration);
|
|
45
|
-
const lastMethodDecl = methodDeclarations
|
|
44
|
+
const methodDeclarations = node.getChildren().filter((child) => ts.isMethodDeclaration(child));
|
|
45
|
+
const lastMethodDecl = methodDeclarations.at(-1);
|
|
46
46
|
const posForImplem = lastMethodDecl ? lastMethodDecl.end + 1 : node.end - 1;
|
|
47
47
|
recorder.insertLeft(posForImplem, codeForImplem);
|
|
48
48
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/add-functions-to-fixture/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/add-functions-to-fixture/index.ts"],"names":[],"mappings":";;;AAAA,2DAKoC;AACpC,gDAIyB;AACzB,iCAAiC;AACjC,uCAGmB;AACnB,qCAEkB;AAKlB;;;GAGG;AACH,SAAS,yBAAyB,CAAC,OAAgD;IACjF,OAAO,IAAA,kBAAK,EAAC;QACX,CAAC,IAAU,EAAE,EAAE;YACb,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC;YAC5C,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;gBACvB,MAAM,IAAI,wBAAW,CAAC,wBAAwB,IAAI,EAAE,CAAC,CAAC;YACxD,CAAC;YACD,OAAO,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,KAAK,EAAE,EAAE;gBACpC,MAAM,SAAS,GAAG,IAAA,sBAAY,EAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;gBAErD,MAAM,gBAAgB,GAAG,GAAG,oBAAW,CAAC,UAAU,CAAC,OAAO,SAAS,KAAK,CAAC;gBAEzE,MAAM,iBAAiB,GAAG,YAAY,QAAQ,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC;gBAErG,MAAM,mBAAmB,GAAG,wBAAwB,iBAAiB,OAAO,QAAQ,MAAM,CAAC;gBAE3F,MAAM,aAAa,GAAG;;iBAEb,SAAS,IAAI,IAAA,2BAAiB,EAAC,UAAU,EAAE,iBAAiB,CAAC,IAAI,CAAC;gBAE3E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AC,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC;4BAC9E,QAAQ,CAAC,UAAU,CAAC,kBAAkB,EAAE,mBAAmB,CAAC,CAAC;wBAC/D,CAAC;wBACD,MAAM,kBAAkB,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAC;wBAC/F,MAAM,cAAc,GAAG,kBAAkB,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;wBACjD,MAAM,YAAY,GAAG,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC;wBAC5E,QAAQ,CAAC,UAAU,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC;oBACnD,CAAC;gBACH,CAAC,CAAC,CAAC;gBAEH,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;YAC9B,CAAC,CAAC,CAAC;QACL,CAAC;QAED,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,IAAA,iBAAI,GAAE,CAAC,CAAC,CAAC,IAAA,2BAAc,GAAE;KAC/C,CAAC,CAAC;AACL,CAAC;AAED;;;GAGG;AACU,QAAA,uBAAuB,GAAG,IAAA,kDAAqC,EAAC,yBAAyB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../schematics/add-functions-to-fixture/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../schematics/add-functions-to-fixture/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,UAAU,EACX,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,uCAAwC,SAAQ,qBAAqB;IACpF;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,EAAE,UAAU,EAAE,CAAC;IAEtB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB,8BAA8B;IAC9B,UAAU,EAAE,OAAO,CAAC;CACrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/fixture-to-component/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/fixture-to-component/index.ts"],"names":[],"mappings":"AAKA,OAAO,EASL,IAAI,EAKL,MAAM,4BAA4B,CAAC;AAepC,OAAO,KAAK,EACV,4BAA4B,EAC7B,MAAM,UAAU,CAAC;AAWlB;;;GAGG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,4BAA4B,GAAG,IAAI,CAkG1E;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,iDAAwD,CAAC"}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ngAddFixture = void 0;
|
|
4
4
|
exports.ngAddFixtureFn = ngAddFixtureFn;
|
|
5
|
+
const node_path_1 = require("node:path");
|
|
5
6
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
6
7
|
const schematics_2 = require("@o3r/schematics");
|
|
7
8
|
const change_1 = require("@schematics/angular/utility/change");
|
|
8
|
-
const node_path_1 = require("node:path");
|
|
9
9
|
const ts = require("typescript");
|
|
10
10
|
const checkFixture = (componentPath, tree, baseFileName) => {
|
|
11
11
|
const files = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/fixture-to-component/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/fixture-to-component/index.ts"],"names":[],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AAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../schematics/fixture-to-component/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../schematics/fixture-to-component/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,4BAA6B,SAAQ,qBAAqB;IACzE,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAC;IAEb,yCAAyC;IACzC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAElC,8BAA8B;IAC9B,UAAU,EAAE,OAAO,CAAC;IAEpB,8BAA8B;IAC9B,IAAI,EAAE,OAAO,CAAC;CACf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../schematics/ng-add/fixture/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../schematics/ng-add/fixture/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,IAAI,EAGL,MAAM,4BAA4B,CAAC;AAMpC;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;CAAE,GAAG,IAAI,CAwF5I"}
|