@sap-ux/ui5-test-writer 1.2.26 → 1.2.28
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Editor } from 'mem-fs-editor';
|
|
2
2
|
import type { Manifest } from '@sap-ux/project-access';
|
|
3
|
-
import type { OPAGenerationOptions } from './types.js';
|
|
3
|
+
import type { WriteContext, OPAGenerationOptions } from './types.js';
|
|
4
4
|
import type { Logger } from '@sap-ux/logger';
|
|
5
5
|
/**
|
|
6
6
|
* Generate OPA test files for a Fiori elements for OData V4 application.
|
|
@@ -23,4 +23,13 @@ export declare function generateOPAFiles(basePath: string, options: OPAGeneratio
|
|
|
23
23
|
* @returns the manifest object. An exception is thrown if the manifest cannot be read.
|
|
24
24
|
*/
|
|
25
25
|
export declare function readManifest(fs: Editor, basePath: string): Manifest;
|
|
26
|
+
/**
|
|
27
|
+
* Adds generated journey file names to `AllJourneys.gen.json` without overwriting existing entries.
|
|
28
|
+
* The file contains an array of journey file name strings (e.g. `"ListReportJourney.gen"`).
|
|
29
|
+
* Duplicate entries are not added.
|
|
30
|
+
*
|
|
31
|
+
* @param generatedJourneys - feature names for which a `<name>Journey.gen` file was written
|
|
32
|
+
* @param writeContext - shared write context (config, paths, editor, dotFileExtension)
|
|
33
|
+
*/
|
|
34
|
+
export declare function addJourneysToAllJourneysFile(generatedJourneys: string[], writeContext: WriteContext): void;
|
|
26
35
|
//# sourceMappingURL=fiori-elements-opa-writer.d.ts.map
|
|
@@ -83,6 +83,7 @@ async function generateOPAFilesForExistingApp(writeContext, appFeatures) {
|
|
|
83
83
|
const standaloneWriteContext = await resolveStandaloneWriteContext(writeContext);
|
|
84
84
|
const generatedPages = writePageFiles(standaloneWriteContext);
|
|
85
85
|
const generatedJourneys = writeJourneyFiles(appFeatures, standaloneWriteContext);
|
|
86
|
+
addJourneysToAllJourneysFile(generatedJourneys, standaloneWriteContext);
|
|
86
87
|
handleJourneyRunner(standaloneWriteContext, generatedPages);
|
|
87
88
|
if (virtualOPA5Configured) {
|
|
88
89
|
await addVirtualOpa5Config(standaloneWriteContext);
|
|
@@ -707,4 +708,32 @@ function writePageObject(pageConfig, rootTemplateDirPath, testOutDirPath, fs, do
|
|
|
707
708
|
contextPath: pageConfig.contextPath
|
|
708
709
|
};
|
|
709
710
|
}
|
|
711
|
+
/**
|
|
712
|
+
* Adds generated journey file names to `AllJourneys.gen.json` without overwriting existing entries.
|
|
713
|
+
* The file contains an array of journey file name strings (e.g. `"ListReportJourney.gen"`).
|
|
714
|
+
* Duplicate entries are not added.
|
|
715
|
+
*
|
|
716
|
+
* @param generatedJourneys - feature names for which a `<name>Journey.gen` file was written
|
|
717
|
+
* @param writeContext - shared write context (config, paths, editor, dotFileExtension)
|
|
718
|
+
*/
|
|
719
|
+
export function addJourneysToAllJourneysFile(generatedJourneys, writeContext) {
|
|
720
|
+
if (generatedJourneys.length === 0) {
|
|
721
|
+
return;
|
|
722
|
+
}
|
|
723
|
+
const { testOutDirPath, editor } = writeContext;
|
|
724
|
+
const allJourneysPath = join(testOutDirPath, 'integration', 'AllJourneys.gen.json');
|
|
725
|
+
if (!editor.exists(allJourneysPath)) {
|
|
726
|
+
return;
|
|
727
|
+
}
|
|
728
|
+
const content = editor.readJSON(allJourneysPath);
|
|
729
|
+
const existing = Array.isArray(content) && content.every((entry) => typeof entry === 'string') ? content : [];
|
|
730
|
+
const existingSet = new Set(existing);
|
|
731
|
+
for (const journey of generatedJourneys) {
|
|
732
|
+
const fileName = `${journey}Journey.gen`;
|
|
733
|
+
if (!existingSet.has(fileName)) {
|
|
734
|
+
existing.push(fileName);
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
editor.writeJSON(allJourneysPath, existing);
|
|
738
|
+
}
|
|
710
739
|
//# sourceMappingURL=fiori-elements-opa-writer.js.map
|
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.28",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"@sap-ux/edmx-parser": "0.10.0",
|
|
30
30
|
"@sap-ux/annotation-converter": "0.10.21",
|
|
31
31
|
"@sap-ux/ui5-application-writer": "2.1.0",
|
|
32
|
+
"@sap-ux/fiori-generator-shared": "1.2.2",
|
|
33
|
+
"@sap-ux/preview-middleware": "1.0.45",
|
|
32
34
|
"@sap-ux/logger": "1.0.3",
|
|
33
|
-
"@sap-ux/
|
|
34
|
-
"@sap-ux/preview-middleware": "1.0.44",
|
|
35
|
-
"@sap-ux/project-access": "2.1.7"
|
|
35
|
+
"@sap-ux/project-access": "2.1.8"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@jest/globals": "30.4.1",
|