@sap-ux/ui5-test-writer 1.7.1 → 1.7.4

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.
@@ -13,6 +13,7 @@ import { hasVirtualOPA5, addVirtualTestConfig } from './utils/virtualOpaUtils.js
13
13
  import { addJourneysToOpaJourneyTypes } from './utils/opaJourneyTypesUtils.js';
14
14
  import { getPackageScripts } from '@sap-ux/fiori-generator-shared';
15
15
  import { readHashFromFlpSandbox } from './utils/flpSandboxUtils.js';
16
+ import { isALPManifestTarget } from './utils/listReportUtils.js';
16
17
  import { compareUI5VersionGte } from '@sap-ux/ui5-application-writer';
17
18
  const __dirname = dirname(fileURLToPath(import.meta.url));
18
19
  const V4_TEMPLATE_LATEST = 'latest';
@@ -384,7 +385,7 @@ function createPageConfig(manifest, targetKey, forcedAppID) {
384
385
  isStartup: false,
385
386
  fileName: targetKey + '.gen'
386
387
  };
387
- if (target.options?.settings?.views) {
388
+ if (isALPManifestTarget(target)) {
388
389
  pageConfig.template = 'AnalyticalListPage';
389
390
  }
390
391
  if (target.options.settings.contextPath) {
package/dist/types.d.ts CHANGED
@@ -71,6 +71,9 @@ export type FEV4ManifestTarget = {
71
71
  };
72
72
  views?: {
73
73
  paths?: Array<{
74
+ key?: string;
75
+ entitySet?: string;
76
+ template?: string;
74
77
  primary?: unknown[];
75
78
  secondary?: unknown[];
76
79
  defaultPath?: string;
@@ -109,7 +112,8 @@ export type ObjectPageNavigationParent = {
109
112
  };
110
113
  export type ObjectPageNavigationParents = {
111
114
  parentLRName?: string;
112
- parentLRTableIdentifier?: string;
115
+ parentLRViewKey?: string;
116
+ parentLRViewIsDefault?: boolean;
113
117
  parentOPs: ObjectPageNavigationParent[];
114
118
  };
115
119
  export type SectionFormField = {
@@ -117,6 +117,19 @@ export declare function getCustomFilterFieldProperties(manifest: Manifest | unde
117
117
  * @returns array of non-custom tab keys in manifest order, empty for single-table LRs
118
118
  */
119
119
  export declare function getTableIdentifiers(manifest: Manifest | undefined, targetKey: string | undefined): string[];
120
+ /**
121
+ * Returns the non-custom view tabs of a List Report with their optional entity set, in manifest
122
+ * order, used to map an Object Page to the tab that exposes it. Custom tabs (backed by an app
123
+ * fragment via `template`) are skipped as they host no navigable table.
124
+ *
125
+ * @param manifest - the application manifest (may be undefined)
126
+ * @param targetKey - routing target key of the List Report page
127
+ * @returns array of `{ key, entitySet? }` for non-custom tabs, empty when there is no views block
128
+ */
129
+ export declare function getListReportViews(manifest: Manifest | undefined, targetKey: string | undefined): {
130
+ key: string;
131
+ entitySet?: string;
132
+ }[];
120
133
  /**
121
134
  * Retrieves the value of `@com.sap.vocabularies.Common.v1.Label` for a specific property
122
135
  * of the given entity set.
@@ -1,5 +1,5 @@
1
1
  import { getFilterFields, getSelectionFieldItems, getSelectionFieldItemsWithLabels, getTableColumnData, getAggregations } from './modelUtils.js';
2
- import { extractContactCardColumnsFromNode } from './tableUtils.js';
2
+ import { extractContactCardColumnsFromNode, resolvePrimaryTableNode } from './tableUtils.js';
3
3
  import { parse } from '@sap-ux/edmx-parser';
4
4
  import { convert } from '@sap-ux/annotation-converter';
5
5
  import { extractActionMethodName, buildActionButtonState, safeCheckButtonVisibility, safeCheckButtonVisibilityFromMetadata } from './actionUtils.js';
@@ -159,9 +159,11 @@ export function getListReportFeatures(listReportPage, log, metadata, manifest) {
159
159
  * @returns The toolbar actions aggregation object.
160
160
  */
161
161
  export function getToolBarActions(pageModel) {
162
- const table = getAggregations(pageModel.root)['table'];
163
- const tableAggregations = getAggregations(table);
164
- const toolBar = tableAggregations['toolBar'];
162
+ const tableNode = resolvePrimaryTableNode(pageModel.root);
163
+ if (!tableNode) {
164
+ return {};
165
+ }
166
+ const toolBar = getAggregations(tableNode)['toolBar'];
165
167
  const toolBarAggregations = getAggregations(toolBar);
166
168
  const actions = toolBarAggregations['actions'];
167
169
  const actionAggregations = getAggregations(actions);
@@ -280,6 +282,35 @@ export function getTableIdentifiers(manifest, targetKey) {
280
282
  }
281
283
  return identifiers;
282
284
  }
285
+ /**
286
+ * Returns the non-custom view tabs of a List Report with their optional entity set, in manifest
287
+ * order, used to map an Object Page to the tab that exposes it. Custom tabs (backed by an app
288
+ * fragment via `template`) are skipped as they host no navigable table.
289
+ *
290
+ * @param manifest - the application manifest (may be undefined)
291
+ * @param targetKey - routing target key of the List Report page
292
+ * @returns array of `{ key, entitySet? }` for non-custom tabs, empty when there is no views block
293
+ */
294
+ export function getListReportViews(manifest, targetKey) {
295
+ if (!manifest || !targetKey) {
296
+ return [];
297
+ }
298
+ const target = manifest['sap.ui5']?.routing?.targets?.[targetKey];
299
+ const paths = target?.options?.settings?.views?.paths;
300
+ if (!Array.isArray(paths)) {
301
+ return [];
302
+ }
303
+ const views = [];
304
+ for (const path of paths) {
305
+ if (path &&
306
+ typeof path.key === 'string' &&
307
+ path.key.length > 0 &&
308
+ !(typeof path.template === 'string' && path.template.length > 0)) {
309
+ views.push({ key: path.key, entitySet: path.entitySet });
310
+ }
311
+ }
312
+ return views;
313
+ }
283
314
  /**
284
315
  * Retrieves the value of `@com.sap.vocabularies.Common.v1.Label` for a specific property
285
316
  * of the given entity set.
@@ -95,10 +95,9 @@ export declare function getListReportPage(applicationModel: ApplicationModel): P
95
95
  * Retrieves all FPM Custom Page definitions from the given application model.
96
96
  *
97
97
  * @param applicationModel - The application model containing page definitions.
98
- * @param log - optional logger instance
99
98
  * @returns An array of FPM Custom Page definitions.
100
99
  */
101
- export declare function getFPMPage(applicationModel: ApplicationModel, log?: Logger): PageWithModelV4 | null;
100
+ export declare function getFPMPage(applicationModel: ApplicationModel): PageWithModelV4 | null;
102
101
  /**
103
102
  * Gets FPM features from the page model using ux-specification.
104
103
  *
@@ -42,7 +42,7 @@ export async function getAppFeatures(basePath, fs, log, metadata, manifest) {
42
42
  }
43
43
  listReportPage = appModel?.applicationModel ? getListReportPage(appModel.applicationModel) : listReportPage;
44
44
  objectPages = appModel?.applicationModel ? getObjectPages(appModel.applicationModel) : objectPages;
45
- fpmPage = appModel?.applicationModel ? getFPMPage(appModel.applicationModel, log) : fpmPage;
45
+ fpmPage = appModel?.applicationModel ? getFPMPage(appModel.applicationModel) : fpmPage;
46
46
  }
47
47
  catch (error) {
48
48
  log?.warn('Error analyzing project model using specification. No dynamic tests will be generated. Error: ' +
@@ -59,9 +59,7 @@ export async function getAppFeatures(basePath, fs, log, metadata, manifest) {
59
59
  featureData.listReport = getListReportFeatures(listReportPage, log, projectMetadata, manifest);
60
60
  }
61
61
  if (objectPages) {
62
- log?.warn('Extracting Object Page features from application model');
63
- featureData.objectPages = await getObjectPageFeatures(objectPages, listReportPage?.name, log, projectMetadata, manifest);
64
- log?.warn('objectPages features extracted: ' + JSON.stringify(featureData.objectPages));
62
+ featureData.objectPages = await getObjectPageFeatures(objectPages, listReportPage?.name, log, projectMetadata, manifest, listReportPage?.entitySet);
65
63
  }
66
64
  if (fpmPage) {
67
65
  featureData.fpm = getFPMFeatures(fpmPage, log);
@@ -113,13 +111,11 @@ export function getListReportPage(applicationModel) {
113
111
  * Retrieves all FPM Custom Page definitions from the given application model.
114
112
  *
115
113
  * @param applicationModel - The application model containing page definitions.
116
- * @param log - optional logger instance
117
114
  * @returns An array of FPM Custom Page definitions.
118
115
  */
119
- export function getFPMPage(applicationModel, log) {
116
+ export function getFPMPage(applicationModel) {
120
117
  for (const pageKey in applicationModel.pages) {
121
118
  const page = applicationModel.pages[pageKey];
122
- log?.warn('pageType:' + page.pageType);
123
119
  if (page.pageType === PageTypeV4.FPMCustomPage) {
124
120
  page.name = pageKey; // store page key as name for later identification
125
121
  return page;
@@ -11,9 +11,10 @@ import type { PageWithModelV4 } from '@sap/ux-specification/dist/types/src/parse
11
11
  * @param log - optional logger instance
12
12
  * @param metadata - optional metadata for the OPA test generation
13
13
  * @param manifest - optional application manifest, used to resolve the parent List Report's default table tab
14
+ * @param listReportEntitySet
14
15
  * @returns a record of object page feature data
15
16
  */
16
- export declare function getObjectPageFeatures(objectPages: PageWithModelV4[], listReportPageKey?: string, log?: Logger, metadata?: string, manifest?: Manifest): Promise<ObjectPageFeatures[]>;
17
+ export declare function getObjectPageFeatures(objectPages: PageWithModelV4[], listReportPageKey?: string, log?: Logger, metadata?: string, manifest?: Manifest, listReportEntitySet?: string): Promise<ObjectPageFeatures[]>;
17
18
  /**
18
19
  * Retrieves all Object Page definitions from the given application model, as long as the page is reachable via standard navigation routes.
19
20
  *
@@ -21,4 +22,22 @@ export declare function getObjectPageFeatures(objectPages: PageWithModelV4[], li
21
22
  * @returns An array of Object Page definitions.
22
23
  */
23
24
  export declare function getObjectPages(applicationModel: ApplicationModel): PageWithModelV4[];
25
+ type OriginatingView = {
26
+ key: string;
27
+ isDefault: boolean;
28
+ };
29
+ /**
30
+ * Resolves which List Report view/tab exposes a given Object Page. A view inherits the List Report's
31
+ * main entity set when it declares none of its own; the first non-custom view is the default tab.
32
+ *
33
+ * @param views - the parent List Report's non-custom views, in manifest order
34
+ * @param objectPageEntitySet - the Object Page's entity set
35
+ * @param listReportEntitySet - the List Report's main entity set
36
+ * @returns the originating view, or undefined for single-table List Reports
37
+ */
38
+ export declare function resolveOriginatingView(views: {
39
+ key: string;
40
+ entitySet?: string;
41
+ }[], objectPageEntitySet?: string, listReportEntitySet?: string): OriginatingView | undefined;
42
+ export {};
24
43
  //# sourceMappingURL=objectPageUtils.d.ts.map
@@ -4,7 +4,7 @@ import { PageTypeV4 } from '@sap/ux-specification/dist/types/src/common/page.js'
4
4
  import { parse } from '@sap-ux/edmx-parser';
5
5
  import { convert } from '@sap-ux/annotation-converter';
6
6
  import { buildActionStateFromSpecModelKey, safeCheckButtonVisibility, safeCheckEditVisibility } from './actionUtils.js';
7
- import { getTableIdentifiers } from './listReportUtils.js';
7
+ import { getListReportViews } from './listReportUtils.js';
8
8
  /**
9
9
  * Extracts feature data for object pages from the application model.
10
10
  *
@@ -13,9 +13,10 @@ import { getTableIdentifiers } from './listReportUtils.js';
13
13
  * @param log - optional logger instance
14
14
  * @param metadata - optional metadata for the OPA test generation
15
15
  * @param manifest - optional application manifest, used to resolve the parent List Report's default table tab
16
+ * @param listReportEntitySet
16
17
  * @returns a record of object page feature data
17
18
  */
18
- export async function getObjectPageFeatures(objectPages, listReportPageKey, log, metadata, manifest) {
19
+ export async function getObjectPageFeatures(objectPages, listReportPageKey, log, metadata, manifest, listReportEntitySet) {
19
20
  const objectPageFeatures = [];
20
21
  if (!objectPages || objectPages.length === 0) {
21
22
  log?.warn('Object Pages not found in application model. Dynamic tests will not be generated for Object Pages.');
@@ -24,13 +25,13 @@ export async function getObjectPageFeatures(objectPages, listReportPageKey, log,
24
25
  // attempt to get individual feature data for each object page
25
26
  const convertedMetadata = metadata ? convert(parse(metadata)) : undefined;
26
27
  const schemaNamespace = convertedMetadata?.namespace ?? '';
27
- // The parent List Report's default (first) table tab. Empty for single-table LRs;
28
- // used so the OP's "navigate from parent LR" step targets a concrete tab on multi-tab LRs.
29
- const parentLRTableIdentifier = getTableIdentifiers(manifest, listReportPageKey)[0];
28
+ // Non-custom tabs of the parent List Report with their optional entity set. Used to pick the
29
+ // tab a given Object Page is reached from on multi-view LRs; empty for single-table LRs.
30
+ const listReportViews = getListReportViews(manifest, listReportPageKey);
30
31
  for (const objectPage of objectPages) {
31
32
  const pageFeatureData = {};
32
33
  pageFeatureData.name = objectPage.name;
33
- pageFeatureData.navigationParents = getObjectPageNavigationParents(objectPage.name, objectPages, listReportPageKey, parentLRTableIdentifier);
34
+ pageFeatureData.navigationParents = getObjectPageNavigationParents(objectPage.name, objectPages, listReportPageKey, resolveOriginatingView(listReportViews, objectPage.entitySet, listReportEntitySet));
34
35
  // extract header title binding path (for iCheckTitlePath)
35
36
  pageFeatureData.headerTitle = getHeaderTitlePath(objectPage);
36
37
  // extract header sections (facets)
@@ -72,10 +73,10 @@ export function getObjectPages(applicationModel) {
72
73
  * @param targetObjectPageKey - key of the target object page
73
74
  * @param objectPages - the array of object pages extracted from the application model
74
75
  * @param listReportPageKey - the key of the List Report page in the application model, used to find navigation routes to object pages
75
- * @param parentLRTableIdentifier - the parent List Report's default table tab key (empty for single-table LRs)
76
+ * @param originatingView - the parent List Report view/tab this Object Page is reached from (undefined for single-table LRs)
76
77
  * @returns navigation data including the ordered ancestor Object Page chain
77
78
  */
78
- function getObjectPageNavigationParents(targetObjectPageKey, objectPages, listReportPageKey, parentLRTableIdentifier) {
79
+ function getObjectPageNavigationParents(targetObjectPageKey, objectPages, listReportPageKey, originatingView) {
79
80
  const parentOPs = [];
80
81
  const visited = new Set([targetObjectPageKey]); // guard against infinite loop in case of invalid manifest entries
81
82
  let cursor = targetObjectPageKey;
@@ -100,10 +101,31 @@ function getObjectPageNavigationParents(targetObjectPageKey, objectPages, listRe
100
101
  }
101
102
  return {
102
103
  parentLRName: listReportPageKey ?? '', // app is possibly malformed if no LR found
103
- parentLRTableIdentifier,
104
+ parentLRViewKey: originatingView?.key,
105
+ parentLRViewIsDefault: originatingView?.isDefault,
104
106
  parentOPs
105
107
  };
106
108
  }
109
+ /**
110
+ * Resolves which List Report view/tab exposes a given Object Page. A view inherits the List Report's
111
+ * main entity set when it declares none of its own; the first non-custom view is the default tab.
112
+ *
113
+ * @param views - the parent List Report's non-custom views, in manifest order
114
+ * @param objectPageEntitySet - the Object Page's entity set
115
+ * @param listReportEntitySet - the List Report's main entity set
116
+ * @returns the originating view, or undefined for single-table List Reports
117
+ */
118
+ export function resolveOriginatingView(views, objectPageEntitySet, listReportEntitySet) {
119
+ if (views.length === 0) {
120
+ return undefined;
121
+ }
122
+ // No match falls back to the first (default) view, which is where a main-entity OP belongs — this also covers an undefined listReportEntitySet.
123
+ const matchIndex = objectPageEntitySet
124
+ ? views.findIndex((view) => (view.entitySet ?? listReportEntitySet) === objectPageEntitySet)
125
+ : -1;
126
+ const index = matchIndex >= 0 ? matchIndex : 0;
127
+ return { key: views[index].key, isDefault: index === 0 };
128
+ }
107
129
  /**
108
130
  * Returns the OData property path the Object Page header title is bound to, for use with
109
131
  * `iCheckTitlePath`. Returns undefined for static titles that expose no binding path.
@@ -36,6 +36,16 @@ export declare function getColumnIdentifier(column: ColumnModelItem, columnKey?:
36
36
  * @returns a map of column identifiers to column state objects for use with iCheckColumns()
37
37
  */
38
38
  export declare function transformTableColumns(columnAggregations: ColumnAggregations): TableColumnFeatureData;
39
+ /**
40
+ * Resolves the table node that actually carries `columns`/`toolBar` aggregations.
41
+ * Single-table List Reports and Object Page sections expose these directly under `table`.
42
+ * Multi-view List Reports nest one table node per tab under `table.views[key]`; the first
43
+ * non-empty (non-custom) view node is returned, matching the default table tab.
44
+ *
45
+ * @param node - tree aggregation node that exposes a 'table' aggregation
46
+ * @returns the table node holding column/toolbar aggregations, or undefined if none is found
47
+ */
48
+ export declare function resolvePrimaryTableNode(node: TreeAggregation): TreeAggregation | undefined;
39
49
  /**
40
50
  * Extracts table column data from a spec model node that contains a 'table' aggregation.
41
51
  * Covers both page-level nodes (List Report, FPM) via their root and section-level nodes
@@ -45,6 +45,43 @@ export function transformTableColumns(columnAggregations) {
45
45
  });
46
46
  return columns;
47
47
  }
48
+ /**
49
+ * Resolves the table node that actually carries `columns`/`toolBar` aggregations.
50
+ * Single-table List Reports and Object Page sections expose these directly under `table`.
51
+ * Multi-view List Reports nest one table node per tab under `table.views[key]`; the first
52
+ * non-empty (non-custom) view node is returned, matching the default table tab.
53
+ *
54
+ * @param node - tree aggregation node that exposes a 'table' aggregation
55
+ * @returns the table node holding column/toolbar aggregations, or undefined if none is found
56
+ */
57
+ export function resolvePrimaryTableNode(node) {
58
+ const tableAggregation = getAggregations(node)['table'];
59
+ if (!tableAggregation) {
60
+ return undefined;
61
+ }
62
+ // A usable table node exposes `columns` and/or `toolBar` directly.
63
+ const isTableNode = (candidate) => {
64
+ const children = getAggregations(candidate);
65
+ return !!children['columns'] || !!children['toolBar'];
66
+ };
67
+ const tableChildren = getAggregations(tableAggregation);
68
+ if (isTableNode(tableAggregation)) {
69
+ return tableAggregation;
70
+ }
71
+ // Multi-view List Report: per-tab nodes live under `views`; return the first usable one, else undefined.
72
+ const views = tableChildren['views'];
73
+ if (!views) {
74
+ return undefined;
75
+ }
76
+ const viewNodes = getAggregations(views);
77
+ for (const key of Object.keys(viewNodes)) {
78
+ const viewNode = viewNodes[key];
79
+ if (isTableNode(viewNode)) {
80
+ return viewNode;
81
+ }
82
+ }
83
+ return undefined;
84
+ }
48
85
  /**
49
86
  * Extracts table column data from a spec model node that contains a 'table' aggregation.
50
87
  * Covers both page-level nodes (List Report, FPM) via their root and section-level nodes
@@ -54,11 +91,11 @@ export function transformTableColumns(columnAggregations) {
54
91
  * @returns a map of column identifiers to column state objects for use with iCheckColumns()
55
92
  */
56
93
  export function extractTableColumnsFromNode(node) {
57
- const tableAggregation = getAggregations(node)['table'];
58
- if (!tableAggregation) {
94
+ const tableNode = resolvePrimaryTableNode(node);
95
+ if (!tableNode) {
59
96
  return {};
60
97
  }
61
- const columnsAggregation = getAggregations(tableAggregation)['columns'];
98
+ const columnsAggregation = getAggregations(tableNode)['columns'];
62
99
  if (!columnsAggregation) {
63
100
  return {};
64
101
  }
@@ -72,11 +109,11 @@ export function extractTableColumnsFromNode(node) {
72
109
  * @returns array of Contact-card field descriptors for use with iClickLink/iCheckLink
73
110
  */
74
111
  export function extractContactCardColumnsFromNode(node) {
75
- const tableAggregation = getAggregations(node)['table'];
76
- if (!tableAggregation) {
112
+ const tableNode = resolvePrimaryTableNode(node);
113
+ if (!tableNode) {
77
114
  return [];
78
115
  }
79
- const columnsAggregation = getAggregations(tableAggregation)['columns'];
116
+ const columnsAggregation = getAggregations(tableNode)['columns'];
80
117
  if (!columnsAggregation) {
81
118
  return [];
82
119
  }
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.7.1",
4
+ "version": "1.7.4",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/SAP/open-ux-tools.git",
@@ -30,9 +30,9 @@
30
30
  "@sap-ux/annotation-converter": "0.10.22",
31
31
  "@sap-ux/ui5-application-writer": "2.1.3",
32
32
  "@sap-ux/logger": "1.0.3",
33
- "@sap-ux/fiori-generator-shared": "1.2.6",
34
- "@sap-ux/project-access": "2.1.10",
35
- "@sap-ux/preview-middleware": "1.2.1"
33
+ "@sap-ux/fiori-generator-shared": "1.2.7",
34
+ "@sap-ux/project-access": "2.1.11",
35
+ "@sap-ux/preview-middleware": "1.2.2"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@jest/globals": "30.4.1",
@@ -69,6 +69,8 @@ sap.ui.define([
69
69
  // When.onThe<%- startLR%>Generated.onFilterBar().iChangeSearchField("Search Term");
70
70
  // When.onThe<%- startLR%>Generated.onFilterBar().iExecuteSearch();
71
71
  // Then.onThe<%- startLR%>Generated.onTable(defaultTableId).iCheckRows();
72
+ // When.onThe<%- startLR%>Generated.onFilterBar().iChangeSearchField(undefined);
73
+ // Then.onThe<%- startLR%>Generated.onFilterBar().iCheckSearchField(undefined);
72
74
  // });
73
75
 
74
76
  <%_ if ((toolBarActions && toolBarActions.length > 0 ) || (tableColumns && Object.keys(tableColumns).length > 0)) { -%>
@@ -74,6 +74,8 @@ function journey() {
74
74
  // When.onThe<%- startLR%>Generated.onFilterBar().iChangeSearchField("Search Term");
75
75
  // When.onThe<%- startLR%>Generated.onFilterBar().iExecuteSearch();
76
76
  // Then.onThe<%- startLR%>Generated.onTable(defaultTableId).iCheckRows();
77
+ // When.onThe<%- startLR%>Generated.onFilterBar().iChangeSearchField(undefined);
78
+ // Then.onThe<%- startLR%>Generated.onFilterBar().iCheckSearchField(undefined);
77
79
  // });
78
80
 
79
81
  <%_ if ((toolBarActions && toolBarActions.length > 0 ) || (tableColumns && Object.keys(tableColumns).length > 0)) { -%>
@@ -27,11 +27,15 @@ sap.ui.define([
27
27
  opaTest("Navigate to <%- name%>ObjectPage", function (Given, When, Then) {
28
28
  Given.iStartMyApp();
29
29
  <% if(navigationParents.parentLRName) { -%>
30
+ <% const parentTableId = navigationParents.parentLRViewKey ? '"' + navigationParents.parentLRViewKey + '"' : ''; -%>
30
31
  <% if (!hideFilterBar) { -%>
31
32
  When.onThe<%- navigationParents.parentLRName%>Generated.onFilterBar().iExecuteSearch();
32
33
  <% } -%>
33
- Then.onThe<%- navigationParents.parentLRName%>Generated.onTable(<%- navigationParents.parentLRTableIdentifier ? '"' + navigationParents.parentLRTableIdentifier + '"' : '' %>).iCheckRows();
34
- When.onThe<%- navigationParents.parentLRName%>Generated.onTable(<%- navigationParents.parentLRTableIdentifier ? '"' + navigationParents.parentLRTableIdentifier + '"' : '' %>).iPressRow(0);
34
+ <% if (navigationParents.parentLRViewKey && !navigationParents.parentLRViewIsDefault) { -%>
35
+ When.onThe<%- navigationParents.parentLRName%>Generated.iGoToView({ key: "<%- navigationParents.parentLRViewKey %>" });
36
+ <% } -%>
37
+ Then.onThe<%- navigationParents.parentLRName%>Generated.onTable(<%- parentTableId %>).iCheckRows();
38
+ When.onThe<%- navigationParents.parentLRName%>Generated.onTable(<%- parentTableId %>).iPressRow(0);
35
39
  <% } -%>
36
40
  <% navigationParents.parentOPs.forEach(function(parent) { %>
37
41
  Then.onThe<%- parent.name %>Generated.iSeeThisPage();
@@ -46,11 +46,15 @@ function journey() {
46
46
  opaTest("Navigate to <%- name%>ObjectPage", function (Given: Given, When: When, Then: Then) {
47
47
  Given.iStartMyApp();
48
48
  <% if(navigationParents.parentLRName) { -%>
49
+ <% const parentTableId = navigationParents.parentLRViewKey ? '"' + navigationParents.parentLRViewKey + '"' : '""'; -%>
49
50
  <% if (!hideFilterBar) { -%>
50
51
  When.onThe<%- navigationParents.parentLRName%>Generated.onFilterBar().iExecuteSearch();
51
52
  <% } -%>
52
- Then.onThe<%- navigationParents.parentLRName%>Generated.onTable(<%- navigationParents.parentLRTableIdentifier ? '"' + navigationParents.parentLRTableIdentifier + '"' : '""' %>).iCheckRows();
53
- When.onThe<%- navigationParents.parentLRName%>Generated.onTable(<%- navigationParents.parentLRTableIdentifier ? '"' + navigationParents.parentLRTableIdentifier + '"' : '""' %>).iPressRow(0);
53
+ <% if (navigationParents.parentLRViewKey && !navigationParents.parentLRViewIsDefault) { -%>
54
+ When.onThe<%- navigationParents.parentLRName%>Generated.iGoToView({ key: "<%- navigationParents.parentLRViewKey %>" });
55
+ <% } -%>
56
+ Then.onThe<%- navigationParents.parentLRName%>Generated.onTable(<%- parentTableId %>).iCheckRows();
57
+ When.onThe<%- navigationParents.parentLRName%>Generated.onTable(<%- parentTableId %>).iPressRow(0);
54
58
  <% } -%>
55
59
  <% navigationParents.parentOPs.forEach(function(parent) { %>
56
60
  Then.onThe<%- parent.name %>Generated.iSeeThisPage();
@@ -69,6 +69,8 @@ sap.ui.define([
69
69
  // When.onThe<%- startLR%>Generated.onFilterBar().iChangeSearchField("Search Term");
70
70
  // When.onThe<%- startLR%>Generated.onFilterBar().iExecuteSearch();
71
71
  // Then.onThe<%- startLR%>Generated.onTable(defaultTableId).iCheckRows();
72
+ // When.onThe<%- startLR%>Generated.onFilterBar().iChangeSearchField(undefined);
73
+ // Then.onThe<%- startLR%>Generated.onFilterBar().iCheckSearchField(undefined);
72
74
  // });
73
75
 
74
76
  <%_ if ((toolBarActions && toolBarActions.length > 0 ) || (tableColumns && Object.keys(tableColumns).length > 0)) { -%>
@@ -74,6 +74,8 @@ function journey() {
74
74
  // When.onThe<%- startLR%>Generated.onFilterBar().iChangeSearchField("Search Term");
75
75
  // When.onThe<%- startLR%>Generated.onFilterBar().iExecuteSearch();
76
76
  // Then.onThe<%- startLR%>Generated.onTable(defaultTableId).iCheckRows();
77
+ // When.onThe<%- startLR%>Generated.onFilterBar().iChangeSearchField(undefined);
78
+ // Then.onThe<%- startLR%>Generated.onFilterBar().iCheckSearchField(undefined);
77
79
  // });
78
80
 
79
81
  <%_ if ((toolBarActions && toolBarActions.length > 0 ) || (tableColumns && Object.keys(tableColumns).length > 0)) { -%>
@@ -27,11 +27,15 @@ sap.ui.define([
27
27
  opaTest("Navigate to <%- name%>ObjectPage", function (Given, When, Then) {
28
28
  Given.iStartMyApp();
29
29
  <% if(navigationParents.parentLRName) { -%>
30
+ <% const parentTableId = navigationParents.parentLRViewKey ? '"' + navigationParents.parentLRViewKey + '"' : ''; -%>
30
31
  <% if (!hideFilterBar) { -%>
31
32
  When.onThe<%- navigationParents.parentLRName%>Generated.onFilterBar().iExecuteSearch();
32
33
  <% } -%>
33
- Then.onThe<%- navigationParents.parentLRName%>Generated.onTable(<%- navigationParents.parentLRTableIdentifier ? '"' + navigationParents.parentLRTableIdentifier + '"' : '' %>).iCheckRows();
34
- When.onThe<%- navigationParents.parentLRName%>Generated.onTable(<%- navigationParents.parentLRTableIdentifier ? '"' + navigationParents.parentLRTableIdentifier + '"' : '' %>).iPressRow(0);
34
+ <% if (navigationParents.parentLRViewKey && !navigationParents.parentLRViewIsDefault) { -%>
35
+ When.onThe<%- navigationParents.parentLRName%>Generated.iGoToView({ key: "<%- navigationParents.parentLRViewKey %>" });
36
+ <% } -%>
37
+ Then.onThe<%- navigationParents.parentLRName%>Generated.onTable(<%- parentTableId %>).iCheckRows();
38
+ When.onThe<%- navigationParents.parentLRName%>Generated.onTable(<%- parentTableId %>).iPressRow(0);
35
39
  <% } -%>
36
40
  <% navigationParents.parentOPs.forEach(function(parent) { %>
37
41
  Then.onThe<%- parent.name %>Generated.iSeeThisPage();
@@ -46,11 +46,15 @@ function journey() {
46
46
  opaTest("Navigate to <%- name%>ObjectPage", function (Given: Given, When: When, Then: Then) {
47
47
  Given.iStartMyApp();
48
48
  <% if(navigationParents.parentLRName) { -%>
49
+ <% const parentTableId = navigationParents.parentLRViewKey ? '"' + navigationParents.parentLRViewKey + '"' : '""'; -%>
49
50
  <% if (!hideFilterBar) { -%>
50
51
  When.onThe<%- navigationParents.parentLRName%>Generated.onFilterBar().iExecuteSearch();
51
52
  <% } -%>
52
- Then.onThe<%- navigationParents.parentLRName%>Generated.onTable(<%- navigationParents.parentLRTableIdentifier ? '"' + navigationParents.parentLRTableIdentifier + '"' : '""' %>).iCheckRows();
53
- When.onThe<%- navigationParents.parentLRName%>Generated.onTable(<%- navigationParents.parentLRTableIdentifier ? '"' + navigationParents.parentLRTableIdentifier + '"' : '""' %>).iPressRow(0);
53
+ <% if (navigationParents.parentLRViewKey && !navigationParents.parentLRViewIsDefault) { -%>
54
+ When.onThe<%- navigationParents.parentLRName%>Generated.iGoToView({ key: "<%- navigationParents.parentLRViewKey %>" });
55
+ <% } -%>
56
+ Then.onThe<%- navigationParents.parentLRName%>Generated.onTable(<%- parentTableId %>).iCheckRows();
57
+ When.onThe<%- navigationParents.parentLRName%>Generated.onTable(<%- parentTableId %>).iPressRow(0);
54
58
  <% } -%>
55
59
  <% navigationParents.parentOPs.forEach(function(parent) { %>
56
60
  Then.onThe<%- parent.name %>Generated.iSeeThisPage();
@@ -69,6 +69,8 @@ sap.ui.define([
69
69
  // When.onThe<%- startLR%>Generated.onFilterBar().iChangeSearchField("Search Term");
70
70
  // When.onThe<%- startLR%>Generated.onFilterBar().iExecuteSearch();
71
71
  // Then.onThe<%- startLR%>Generated.onTable(defaultTableId).iCheckRows();
72
+ // When.onThe<%- startLR%>Generated.onFilterBar().iChangeSearchField(undefined);
73
+ // Then.onThe<%- startLR%>Generated.onFilterBar().iCheckSearchField(undefined);
72
74
  // });
73
75
 
74
76
  <%_ if ((toolBarActions && toolBarActions.length > 0 ) || (tableColumns && Object.keys(tableColumns).length > 0)) { -%>
@@ -74,6 +74,8 @@ function journey() {
74
74
  // When.onThe<%- startLR%>Generated.onFilterBar().iChangeSearchField("Search Term");
75
75
  // When.onThe<%- startLR%>Generated.onFilterBar().iExecuteSearch();
76
76
  // Then.onThe<%- startLR%>Generated.onTable(defaultTableId).iCheckRows();
77
+ // When.onThe<%- startLR%>Generated.onFilterBar().iChangeSearchField(undefined);
78
+ // Then.onThe<%- startLR%>Generated.onFilterBar().iCheckSearchField(undefined);
77
79
  // });
78
80
 
79
81
  <%_ if ((toolBarActions && toolBarActions.length > 0 ) || (tableColumns && Object.keys(tableColumns).length > 0)) { -%>
@@ -27,11 +27,15 @@ sap.ui.define([
27
27
  opaTest("Navigate to <%- name%>ObjectPage", function (Given, When, Then) {
28
28
  Given.iStartMyApp();
29
29
  <% if(navigationParents.parentLRName) { -%>
30
+ <% const parentTableId = navigationParents.parentLRViewKey ? '"' + navigationParents.parentLRViewKey + '"' : ''; -%>
30
31
  <% if (!hideFilterBar) { -%>
31
32
  When.onThe<%- navigationParents.parentLRName%>Generated.onFilterBar().iExecuteSearch();
32
33
  <% } -%>
33
- Then.onThe<%- navigationParents.parentLRName%>Generated.onTable(<%- navigationParents.parentLRTableIdentifier ? '"' + navigationParents.parentLRTableIdentifier + '"' : '' %>).iCheckRows();
34
- When.onThe<%- navigationParents.parentLRName%>Generated.onTable(<%- navigationParents.parentLRTableIdentifier ? '"' + navigationParents.parentLRTableIdentifier + '"' : '' %>).iPressRow(0);
34
+ <% if (navigationParents.parentLRViewKey && !navigationParents.parentLRViewIsDefault) { -%>
35
+ When.onThe<%- navigationParents.parentLRName%>Generated.iGoToView({ key: "<%- navigationParents.parentLRViewKey %>" });
36
+ <% } -%>
37
+ Then.onThe<%- navigationParents.parentLRName%>Generated.onTable(<%- parentTableId %>).iCheckRows();
38
+ When.onThe<%- navigationParents.parentLRName%>Generated.onTable(<%- parentTableId %>).iPressRow(0);
35
39
  <% } -%>
36
40
  <% navigationParents.parentOPs.forEach(function(parent) { %>
37
41
  Then.onThe<%- parent.name %>Generated.iSeeThisPage();
@@ -49,11 +49,15 @@ function journey() {
49
49
  opaTest("Navigate to <%- name%>ObjectPage", function (Given: Given, When: When, Then: Then) {
50
50
  Given.iStartMyApp();
51
51
  <% if(navigationParents.parentLRName) { -%>
52
+ <% const parentTableId = navigationParents.parentLRViewKey ? '"' + navigationParents.parentLRViewKey + '"' : '""'; -%>
52
53
  <% if (!hideFilterBar) { -%>
53
54
  When.onThe<%- navigationParents.parentLRName%>Generated.onFilterBar().iExecuteSearch();
54
55
  <% } -%>
55
- Then.onThe<%- navigationParents.parentLRName%>Generated.onTable(<%- navigationParents.parentLRTableIdentifier ? '"' + navigationParents.parentLRTableIdentifier + '"' : '""' %>).iCheckRows();
56
- When.onThe<%- navigationParents.parentLRName%>Generated.onTable(<%- navigationParents.parentLRTableIdentifier ? '"' + navigationParents.parentLRTableIdentifier + '"' : '""' %>).iPressRow(0);
56
+ <% if (navigationParents.parentLRViewKey && !navigationParents.parentLRViewIsDefault) { -%>
57
+ When.onThe<%- navigationParents.parentLRName%>Generated.iGoToView({ key: "<%- navigationParents.parentLRViewKey %>" });
58
+ <% } -%>
59
+ Then.onThe<%- navigationParents.parentLRName%>Generated.onTable(<%- parentTableId %>).iCheckRows();
60
+ When.onThe<%- navigationParents.parentLRName%>Generated.onTable(<%- parentTableId %>).iPressRow(0);
57
61
  <% } -%>
58
62
  <% navigationParents.parentOPs.forEach(function(parent) { %>
59
63
  Then.onThe<%- parent.name %>Generated.iSeeThisPage();