@sap-ux/ui5-test-writer 1.2.30 → 1.2.34
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 +1 -1
- package/dist/fiori-elements-opa-writer.js +5 -5
- package/dist/i18n.js +1 -2
- package/dist/translations/ui5-test-writer.i18n.json +2 -2
- package/dist/utils/opaJourneyTypesUtils.js +2 -2
- package/package.json +7 -7
- package/templates/v4/integration/FirstJourney.ts +1 -1
- package/templates/v4/integration/ListReportJourney.ts +1 -1
- package/templates/v4/integration/ObjectPageJourney.ts +1 -1
package/README.md
CHANGED
|
@@ -69,7 +69,7 @@ const fs = await generateOPAFiles(myProjectPath, { enableTypeScript: true });
|
|
|
69
69
|
What changes in the generated output:
|
|
70
70
|
|
|
71
71
|
- Page objects, journeys, and `JourneyRunner` are emitted as `.ts` files.
|
|
72
|
-
- A `webapp/test/integration/types/OpaJourneyTypes.d.ts` file is generated with `Given` / `When` / `Then` definitions tailored to the app's pages.
|
|
72
|
+
- A `webapp/test/integration/types/OpaJourneyTypes.gen.d.ts` file is generated with `Given` / `When` / `Then` definitions tailored to the app's pages.
|
|
73
73
|
- The QUnit bootstrap (`opaTests.qunit.js`) and the HTML harness stay as `.js` / `.html` (they are loaded directly by the browser).
|
|
74
74
|
|
|
75
75
|
When run in standalone mode against an existing project, `enableTypeScript` is auto-detected from the presence of a `tsconfig.json`. An explicit value passed in the options always takes precedence.
|
|
@@ -490,16 +490,16 @@ function writeJourneyRunner(writeContext) {
|
|
|
490
490
|
modifiedFiles.push(`integration/pages/JourneyRunner${dotFileExtension}`);
|
|
491
491
|
}
|
|
492
492
|
/**
|
|
493
|
-
* Writes the OpaJourneyTypes.d.ts type definition file used by generated TypeScript OPA tests.
|
|
493
|
+
* Writes the OpaJourneyTypes.gen.d.ts type definition file used by generated TypeScript OPA tests.
|
|
494
494
|
*
|
|
495
495
|
* @param writeContext - shared write context (config, paths, editor, journey params)
|
|
496
496
|
*/
|
|
497
497
|
function writeOpaJourneyTypes(writeContext) {
|
|
498
498
|
const { config, rootV4TemplateDirPath, testOutDirPath, editor, modifiedFiles } = writeContext;
|
|
499
|
-
editor.copyTpl(join(rootV4TemplateDirPath, 'integration', 'types', 'OpaJourneyTypes.d.ts'), join(testOutDirPath, 'integration', 'types', 'OpaJourneyTypes.d.ts'), config, undefined, {
|
|
499
|
+
editor.copyTpl(join(rootV4TemplateDirPath, 'integration', 'types', 'OpaJourneyTypes.d.ts'), join(testOutDirPath, 'integration', 'types', 'OpaJourneyTypes.gen.d.ts'), config, undefined, {
|
|
500
500
|
globOptions: { dot: true }
|
|
501
501
|
});
|
|
502
|
-
modifiedFiles.push('integration/types/OpaJourneyTypes.d.ts');
|
|
502
|
+
modifiedFiles.push('integration/types/OpaJourneyTypes.gen.d.ts');
|
|
503
503
|
}
|
|
504
504
|
/**
|
|
505
505
|
* Writes journey files for list report, object pages and FPM pages.
|
|
@@ -569,7 +569,7 @@ function writeFallbackJourney(writeContext) {
|
|
|
569
569
|
});
|
|
570
570
|
}
|
|
571
571
|
/**
|
|
572
|
-
* Update the `OpaJourneyTypes.d.ts` type-definition file used by generated TypeScript OPA tests.
|
|
572
|
+
* Update the `OpaJourneyTypes.gen.d.ts` type-definition file used by generated TypeScript OPA tests.
|
|
573
573
|
*
|
|
574
574
|
* @param writeContext - shared write context (config, paths, editor, journey params)
|
|
575
575
|
* @param generatedPages - pages whose journeys should be reflected in the type definitions
|
|
@@ -582,7 +582,7 @@ function handleOPAJourneyTypes(writeContext, generatedPages) {
|
|
|
582
582
|
if (writeContext.hasPreexistingTests) {
|
|
583
583
|
const written = addJourneysToOpaJourneyTypes(generatedPages, writeContext.testOutDirPath, writeContext.editor, writeContext.log);
|
|
584
584
|
if (written) {
|
|
585
|
-
writeContext.modifiedFiles.push('integration/types/OpaJourneyTypes.d.ts');
|
|
585
|
+
writeContext.modifiedFiles.push('integration/types/OpaJourneyTypes.gen.d.ts');
|
|
586
586
|
}
|
|
587
587
|
}
|
|
588
588
|
else {
|
package/dist/i18n.js
CHANGED
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
"warn": {
|
|
11
11
|
"cannotUpdateJourneyRunner": "Could not update `JourneyRunner.js`. The existing file may be missing or unreadable. New pages were not registered.",
|
|
12
12
|
"cannotUpdateOpaTestsQunit": "Could not update `opaTests.qunit.js`. The existing file may be missing or unreadable. New journey paths were not registered.",
|
|
13
|
-
"cannotUpdateOpaJourneyTypes": "Could not update `OpaJourneyTypes.d.ts`. The existing file may be missing or unreadable. New journey type definitions were not registered.",
|
|
13
|
+
"cannotUpdateOpaJourneyTypes": "Could not update `OpaJourneyTypes.gen.d.ts`. The existing file may be missing or unreadable. New journey type definitions were not registered.",
|
|
14
14
|
"noFilterFieldTests": "Unable to extract filter fields from the project model using specification. No filter field tests are generated."
|
|
15
15
|
},
|
|
16
16
|
"info": {
|
|
17
|
-
"opaJourneyTypesNotUpdated": "`OpaJourneyTypes.d.ts` was not updated due to an incompatible existing test setup.",
|
|
17
|
+
"opaJourneyTypesNotUpdated": "`OpaJourneyTypes.gen.d.ts` was not updated due to an incompatible existing test setup.",
|
|
18
18
|
"incompatibleTestSetupSkipped": "`testsuite.qunit` and `opaTests.qunit` files were not updated due to an incompatible existing test setup.",
|
|
19
19
|
"manualIntegrationRequired": "Please ensure the generated journeys and pages are integrated into your existing OPA5 test setup."
|
|
20
20
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { join } from 'node:path';
|
|
2
2
|
import { t } from '../i18n.js';
|
|
3
3
|
import { MAX_FILE_CONTENT_LENGTH, escapeRegex, findBracedBlock, insertAfterLastImport } from './fileWritingUtils.js';
|
|
4
|
-
/** Relative path from the test output directory to OpaJourneyTypes.d.ts */
|
|
5
|
-
const OPA_JOURNEY_TYPES_FILE = join('integration', 'types', 'OpaJourneyTypes.d.ts');
|
|
4
|
+
/** Relative path from the test output directory to OpaJourneyTypes.gen.d.ts */
|
|
5
|
+
const OPA_JOURNEY_TYPES_FILE = join('integration', 'types', 'OpaJourneyTypes.gen.d.ts');
|
|
6
6
|
/** Frameworks the splicer knows how to render entries for. */
|
|
7
7
|
const SUPPORTED_FRAMEWORKS = new Set(['ListReport', 'ObjectPage']);
|
|
8
8
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/ui5-test-writer",
|
|
3
3
|
"description": "SAP UI5 tests writer",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.34",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -22,17 +22,17 @@
|
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"ejs": "3.1.10",
|
|
25
|
-
"i18next": "
|
|
25
|
+
"i18next": "26.3.6",
|
|
26
26
|
"mem-fs": "2.1.0",
|
|
27
27
|
"mem-fs-editor": "9.4.0",
|
|
28
28
|
"@sap/ux-specification": "1.144.5",
|
|
29
29
|
"@sap-ux/edmx-parser": "0.10.0",
|
|
30
30
|
"@sap-ux/annotation-converter": "0.10.21",
|
|
31
|
-
"@sap-ux/ui5-application-writer": "2.1.
|
|
32
|
-
"@sap-ux/fiori-generator-shared": "1.2.2",
|
|
33
|
-
"@sap-ux/project-access": "2.1.8",
|
|
31
|
+
"@sap-ux/ui5-application-writer": "2.1.2",
|
|
34
32
|
"@sap-ux/logger": "1.0.3",
|
|
35
|
-
"@sap-ux/
|
|
33
|
+
"@sap-ux/project-access": "2.1.9",
|
|
34
|
+
"@sap-ux/preview-middleware": "1.0.49",
|
|
35
|
+
"@sap-ux/fiori-generator-shared": "1.2.5"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@jest/globals": "30.4.1",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@types/mem-fs": "1.1.2",
|
|
42
42
|
"@types/mem-fs-editor": "7.0.1",
|
|
43
43
|
"rimraf": "6.1.3",
|
|
44
|
-
"fs-extra": "11.3.
|
|
44
|
+
"fs-extra": "11.3.6",
|
|
45
45
|
"@sap-ux/vocabularies-types": "0.15.0",
|
|
46
46
|
"@sap-ux/jest-file-matchers": "1.0.2"
|
|
47
47
|
},
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
******************************************************************************/
|
|
17
17
|
|
|
18
18
|
import opaTest from "sap/ui/test/opaQunit";
|
|
19
|
-
import type { Given, When, Then } from "./types/OpaJourneyTypes";
|
|
19
|
+
import type { Given, When, Then } from "./types/OpaJourneyTypes.gen";
|
|
20
20
|
<%_
|
|
21
21
|
const usesFilterFieldIdentifier =
|
|
22
22
|
!hideFilterBar && filterBarItems && filterBarItems.some(function(item) { return item.custom; });
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
******************************************************************************/
|
|
17
17
|
|
|
18
18
|
import opaTest from "sap/ui/test/opaQunit";
|
|
19
|
-
import type { Given, When, Then } from "./types/OpaJourneyTypes";
|
|
19
|
+
import type { Given, When, Then } from "./types/OpaJourneyTypes.gen";
|
|
20
20
|
<%_
|
|
21
21
|
const usesFieldIdentifier = (headerSections || []).some(function(section) {
|
|
22
22
|
return section.form && section.fields && section.fields.length > 0;
|