From 83b39c2be0d464669d6f9048f46946048a6834c8 Mon Sep 17 00:00:00 2001 From: I334706 Date: Wed, 24 Jun 2026 14:04:27 +0200 Subject: [PATCH 01/18] fix(ui5-test-writer): handle ConnectedFields and FieldGroup wrappers Body sub-section form fields previously extracted only the `Value` schema key, which silently dropped `DataFieldForAnnotation` wrappers such as `@UI.ConnectedFields#` and `@UI.FieldGroup#`. Parse the annotation name, drill into the referenced annotation on the entity type, and emit one `iCheckField` per inner DataField with the appropriate qualifier on the FieldIdentifier. --- .../ui5-test-writer-special-form-fields.md | 5 + packages/ui5-test-writer/src/types.ts | 2 + .../ui5-test-writer/src/utils/modelUtils.ts | 24 ++++ .../src/utils/objectPageUtils.ts | 105 ++++++++++++-- .../v4/integration/ObjectPageJourney.js | 4 +- .../v4/integration/ObjectPageJourney.ts | 4 +- .../test/unit/utils/modelUtils.test.ts | 31 +++- .../test/unit/utils/objectPageUtils.test.ts | 135 ++++++++++++++++++ 8 files changed, 294 insertions(+), 16 deletions(-) create mode 100644 .changeset/ui5-test-writer-special-form-fields.md diff --git a/.changeset/ui5-test-writer-special-form-fields.md b/.changeset/ui5-test-writer-special-form-fields.md new file mode 100644 index 00000000000..998c709de04 --- /dev/null +++ b/.changeset/ui5-test-writer-special-form-fields.md @@ -0,0 +1,5 @@ +--- +'@sap-ux/ui5-test-writer': patch +--- + +FIX: Handle `@UI.ConnectedFields` and `@UI.FieldGroup` wrappers in body sub-section form fields and emit one `iCheckField` per inner property with the `connectedFields` / `fieldGroup` qualifier on the `FieldIdentifier`. diff --git a/packages/ui5-test-writer/src/types.ts b/packages/ui5-test-writer/src/types.ts index 5513335e3d2..ebac61a28f8 100644 --- a/packages/ui5-test-writer/src/types.ts +++ b/packages/ui5-test-writer/src/types.ts @@ -125,6 +125,8 @@ export type ObjectPageNavigationParents = { export type SectionFormField = { property: string; + connectedFields?: string; + fieldGroup?: string; }; export type TableColumn = { diff --git a/packages/ui5-test-writer/src/utils/modelUtils.ts b/packages/ui5-test-writer/src/utils/modelUtils.ts index 78729eb8541..125b0b14207 100644 --- a/packages/ui5-test-writer/src/utils/modelUtils.ts +++ b/packages/ui5-test-writer/src/utils/modelUtils.ts @@ -259,3 +259,27 @@ export function getFilterFields(pageModel: TreeModel): TreeAggregations { const selectionFieldsAggregations = getAggregations(selectionFields); return selectionFieldsAggregations; } + +/** + * Parses a `DataFieldForAnnotation::::` style identifier. + * + * @param name - aggregation key or `field.name` from the spec model + * @returns the parsed property and target annotation, or undefined for non-annotation entries + */ +export function parseDataFieldForAnnotationName( + name: string | undefined +): { property: string; targetAnnotation: string } | undefined { + if (!name) { + return undefined; + } + const segments = name.split('::'); + if (segments.length < 3) { + return undefined; + } + const property = segments[1]; + const targetAnnotation = segments[2]; + if (!property || !targetAnnotation) { + return undefined; + } + return { property, targetAnnotation }; +} diff --git a/packages/ui5-test-writer/src/utils/objectPageUtils.ts b/packages/ui5-test-writer/src/utils/objectPageUtils.ts index 32e349b4171..10af1fb1b2d 100644 --- a/packages/ui5-test-writer/src/utils/objectPageUtils.ts +++ b/packages/ui5-test-writer/src/utils/objectPageUtils.ts @@ -17,13 +17,14 @@ import { type FieldItem, type HeaderSectionItem, type SectionItem, - getAggregations + getAggregations, + parseDataFieldForAnnotationName } from './modelUtils.js'; import { extractTableColumnsFromNode } from './tableUtils.js'; import { PageTypeV4 } from '@sap/ux-specification/dist/types/src/common/page.js'; import { parse } from '@sap-ux/edmx-parser'; import { convert } from '@sap-ux/annotation-converter'; -import type { ConvertedMetadata } from '@sap-ux/vocabularies-types'; +import type { ConvertedMetadata, EntityType } from '@sap-ux/vocabularies-types'; import { buildActionStateFromSpecModelKey, safeCheckButtonVisibility, safeCheckEditVisibility } from './actionUtils.js'; /** @@ -191,7 +192,7 @@ function extractObjectPageBodySectionsData( const sections = getAggregations(sectionsAggregation) as Record; Object.entries(sections).forEach(([sectionKey, section]) => { const sectionId = getSectionIdentifier(section) ?? sectionKey; - const subSections = extractBodySubSectionsData(section, sectionId); + const subSections = extractBodySubSectionsData(section, sectionId, convertedMetadata, objectPage.entitySet); const navigationProperty = getNavigationPropertyFromKey(sectionKey); const isTable = isTableSection(section); const sectionData: BodySectionFeatureData = { @@ -200,7 +201,10 @@ function extractObjectPageBodySectionsData( isTable, custom: !!section.custom, order: section?.order ?? -1, - fields: section.custom || isTable ? [] : extractFormFields(section), + fields: + section.custom || isTable + ? [] + : extractFormFields(section, convertedMetadata, objectPage.entitySet), tableColumns: section.custom || !isTable ? {} : extractTableColumnsFromNode(section), subSections, actions: @@ -295,9 +299,16 @@ function extractSectionActions( * * @param section - body section entry from the application model * @param parentSectionId - identifier of the parent section (used as fallback key prefix) + * @param convertedMetadata - optional converted OData metadata for drilling into ConnectedFields / FieldGroup wrappers + * @param entitySetName - the entity set the section is bound to (used to locate the entity type) * @returns array of sub-section feature data */ -function extractBodySubSectionsData(section: SectionItem, parentSectionId: string): BodySubSectionFeatureData[] { +function extractBodySubSectionsData( + section: SectionItem, + parentSectionId: string, + convertedMetadata?: ConvertedMetadata, + entitySetName?: string +): BodySubSectionFeatureData[] { const subSections: BodySubSectionFeatureData[] = []; const subSectionsAggregation = getAggregations(section)['subSections']; const subSectionItems = getAggregations(subSectionsAggregation) as Record; @@ -310,7 +321,10 @@ function extractBodySubSectionsData(section: SectionItem, parentSectionId: strin isTable, custom: !!subSection.custom, order: subSection?.order ?? -1, // put a negative order number to signal that order was not in spec - fields: subSection.custom || isTable ? [] : extractFormFields(subSection), + fields: + subSection.custom || isTable + ? [] + : extractFormFields(subSection, convertedMetadata, entitySetName), tableColumns: subSection.custom || !isTable ? {} : extractTableColumnsFromNode(subSection) }); }); @@ -321,9 +335,15 @@ function extractBodySubSectionsData(section: SectionItem, parentSectionId: strin * Extracts form field property paths from a body sub-section's form aggregation. * * @param subSection - body sub-section entry from the application model + * @param convertedMetadata - optional converted OData metadata for drilling into ConnectedFields / FieldGroup wrappers + * @param entitySetName - the entity set the sub-section is bound to (used to locate the entity type) * @returns array of form field property paths for use with iCheckField({ property }) */ -function extractFormFields(subSection: BodySectionItem): SectionFormField[] { +function extractFormFields( + subSection: BodySectionItem, + convertedMetadata?: ConvertedMetadata, + entitySetName?: string +): SectionFormField[] { const fields: SectionFormField[] = []; const formAggregation = getAggregations(subSection)['form'] as AggregationItem; if (!formAggregation) { @@ -331,15 +351,78 @@ function extractFormFields(subSection: BodySectionItem): SectionFormField[] { } const fieldsAggregation = getAggregations(formAggregation)['fields'] as AggregationItem; const fieldItems = getAggregations(fieldsAggregation) as Record; - Object.values(fieldItems).forEach((field) => { - const property = field.schema?.keys?.find((key) => key.name === 'Value')?.value; - if (property) { - fields.push({ property }); + const entityType = + convertedMetadata && entitySetName ? resolveEntityType(convertedMetadata, entitySetName) : undefined; + Object.values(fieldItems).forEach((fieldItem) => { + const annotationParts = parseDataFieldForAnnotationName(fieldItem.name); + const valueProperty = fieldItem.schema?.keys?.find((key) => key.name === 'Value')?.value; + const baseProperty = valueProperty ?? annotationParts?.property; + if (!baseProperty) { + return; + } + + if (annotationParts) { + const qualifier = annotationParts.targetAnnotation; + if (annotationParts.property === 'ConnectedFields' && entityType) { + resolveConnectedFieldsInnerProperties(entityType, qualifier).forEach((property) => { + fields.push({ property, connectedFields: qualifier }); + }); + } else if (annotationParts.property === 'FieldGroup' && entityType) { + resolveFieldGroupInnerProperties(entityType, qualifier).forEach((property) => { + fields.push({ property, fieldGroup: qualifier }); + }); + } + // Unknown annotation pattern: skip + } else { + fields.push({ property: baseProperty }); } }); return fields; } +/** + * Resolves the inner `Value` paths of a `@UI.ConnectedFields#` annotation. + * + * @param entityType - the entity type carrying the annotation + * @param qualifier - the annotation qualifier + * @returns the inner DataField property paths + */ +function resolveConnectedFieldsInnerProperties(entityType: EntityType, qualifier: string): string[] { + const annotation = entityType.annotations?.UI?.[ + `ConnectedFields#${qualifier}` as keyof typeof entityType.annotations.UI + ] as { Data?: Record } | undefined; + const dictionary = annotation?.Data ?? {}; + return Object.values(dictionary) + .map((dataField) => dataField?.Value?.path) + .filter((path): path is string => Boolean(path)); +} + +/** + * Resolves the inner `Value` paths of a `@UI.FieldGroup#` annotation. + * + * @param entityType - the entity type carrying the annotation + * @param qualifier - the annotation qualifier + * @returns the inner DataField property paths + */ +function resolveFieldGroupInnerProperties(entityType: EntityType, qualifier: string): string[] { + const annotation = entityType.annotations?.UI?.[ + `FieldGroup#${qualifier}` as keyof typeof entityType.annotations.UI + ] as { Data?: { Value?: { path?: string } }[] } | undefined; + const dataFields = annotation?.Data ?? []; + return dataFields.map((dataField) => dataField?.Value?.path).filter((path): path is string => Boolean(path)); +} + +/** + * Looks up the entity type for the given entity set name in the converted metadata. + * + * @param convertedMetadata - the converted OData metadata + * @param entitySetName - the entity set name + * @returns the entity type, or undefined if not found + */ +function resolveEntityType(convertedMetadata: ConvertedMetadata, entitySetName: string): EntityType | undefined { + return convertedMetadata.entitySets.find((es) => es.name === entitySetName)?.entityType; +} + /** * Extracts the OData navigation property from a spec model section key. * Section keys for table sections follow the pattern `_NavProperty::@annotation`, so the diff --git a/packages/ui5-test-writer/templates/v4/integration/ObjectPageJourney.js b/packages/ui5-test-writer/templates/v4/integration/ObjectPageJourney.js index 0a82ffe8c7e..cf812a1fc10 100644 --- a/packages/ui5-test-writer/templates/v4/integration/ObjectPageJourney.js +++ b/packages/ui5-test-writer/templates/v4/integration/ObjectPageJourney.js @@ -127,7 +127,7 @@ sap.ui.define([ Then.onThe<%- name%>Generated.iCheckSubSection({ section: "<%- subSection.id %>" }); <% if (subSection.fields && subSection.fields.length > 0) { -%> <% subSection.fields.forEach(function(field) { -%> - Then.onThe<%- name%>Generated.onForm({ section: "<%- subSection.id %>" }).iCheckField({ property: "<%- field.property %>" }); + Then.onThe<%- name%>Generated.onForm({ section: "<%- subSection.id %>" }).iCheckField({ property: "<%- field.property %>"<% if (field.connectedFields) { %>, connectedFields: "<%- field.connectedFields %>"<% } %><% if (field.fieldGroup) { %>, fieldGroup: "<%- field.fieldGroup %>"<% } %> }); <% }) -%> <% } -%> <% if (subSection.tableColumns && Object.keys(subSection.tableColumns).length > 0 && subSection.navigationProperty) { -%> @@ -137,7 +137,7 @@ sap.ui.define([ <% } else { -%> <% if (section.fields && section.fields.length > 0) { -%> <% section.fields.forEach(function(field) { -%> - Then.onThe<%- name%>Generated.onForm({ section: "<%- section.id %>" }).iCheckField({ property: "<%- field.property %>" }); + Then.onThe<%- name%>Generated.onForm({ section: "<%- section.id %>" }).iCheckField({ property: "<%- field.property %>"<% if (field.connectedFields) { %>, connectedFields: "<%- field.connectedFields %>"<% } %><% if (field.fieldGroup) { %>, fieldGroup: "<%- field.fieldGroup %>"<% } %> }); <% }) -%> <% } -%> <% if (section.tableColumns && Object.keys(section.tableColumns).length > 0 && section.navigationProperty) { -%> diff --git a/packages/ui5-test-writer/templates/v4/integration/ObjectPageJourney.ts b/packages/ui5-test-writer/templates/v4/integration/ObjectPageJourney.ts index 10660ba6963..7b31b16b514 100644 --- a/packages/ui5-test-writer/templates/v4/integration/ObjectPageJourney.ts +++ b/packages/ui5-test-writer/templates/v4/integration/ObjectPageJourney.ts @@ -146,7 +146,7 @@ function journey() { Then.onThe<%- name%>Generated.iCheckSubSection({ section: "<%- subSection.id %>" }); <% if (subSection.fields && subSection.fields.length > 0) { -%> <% subSection.fields.forEach(function(field) { -%> - Then.onThe<%- name%>Generated.onForm({ section: "<%- subSection.id %>" } as unknown as FormIdentifier).iCheckField({ property: "<%- field.property %>" }); + Then.onThe<%- name%>Generated.onForm({ section: "<%- subSection.id %>" } as unknown as FormIdentifier).iCheckField({ property: "<%- field.property %>"<% if (field.connectedFields) { %>, connectedFields: "<%- field.connectedFields %>"<% } %><% if (field.fieldGroup) { %>, fieldGroup: "<%- field.fieldGroup %>"<% } %> }); <% }) -%> <% } -%> <% if (subSection.tableColumns && Object.keys(subSection.tableColumns).length > 0 && subSection.navigationProperty) { -%> @@ -156,7 +156,7 @@ function journey() { <% } else { -%> <% if (section.fields && section.fields.length > 0) { -%> <% section.fields.forEach(function(field) { -%> - Then.onThe<%- name%>Generated.onForm({ section: "<%- section.id %>" } as unknown as FormIdentifier).iCheckField({ property: "<%- field.property %>" }); + Then.onThe<%- name%>Generated.onForm({ section: "<%- section.id %>" } as unknown as FormIdentifier).iCheckField({ property: "<%- field.property %>"<% if (field.connectedFields) { %>, connectedFields: "<%- field.connectedFields %>"<% } %><% if (field.fieldGroup) { %>, fieldGroup: "<%- field.fieldGroup %>"<% } %> }); <% }) -%> <% } -%> <% if (section.tableColumns && Object.keys(section.tableColumns).length > 0 && section.navigationProperty) { -%> diff --git a/packages/ui5-test-writer/test/unit/utils/modelUtils.test.ts b/packages/ui5-test-writer/test/unit/utils/modelUtils.test.ts index f4d7e8e28c7..63b9a3b11b9 100644 --- a/packages/ui5-test-writer/test/unit/utils/modelUtils.test.ts +++ b/packages/ui5-test-writer/test/unit/utils/modelUtils.test.ts @@ -9,7 +9,8 @@ import { getAggregations, getSelectionFieldItems, getFilterFields, - getAppFeatures + getAppFeatures, + parseDataFieldForAnnotationName } from '../../../src/utils/modelUtils.js'; import type { Editor } from 'mem-fs-editor'; import type { Logger } from '@sap-ux/logger'; @@ -369,3 +370,31 @@ describe('Test edge cases for better branch coverage', () => { expect(result).toEqual({}); }); }); + +describe('parseDataFieldForAnnotationName()', () => { + test('parses an annotation-style identifier with property and target annotation', () => { + expect(parseDataFieldForAnnotationName('DataFieldForAnnotation::ConnectedFields::CountryCity')).toEqual({ + property: 'ConnectedFields', + targetAnnotation: 'CountryCity' + }); + expect(parseDataFieldForAnnotationName('DataFieldForAnnotation::FieldGroup::CheckBoxGroup')).toEqual({ + property: 'FieldGroup', + targetAnnotation: 'CheckBoxGroup' + }); + }); + + test('returns undefined for non-annotation entries', () => { + expect(parseDataFieldForAnnotationName('DataField::CompanyCode')).toBeUndefined(); + expect(parseDataFieldForAnnotationName('PlainField')).toBeUndefined(); + }); + + test('returns undefined for falsy input', () => { + expect(parseDataFieldForAnnotationName(undefined)).toBeUndefined(); + expect(parseDataFieldForAnnotationName('')).toBeUndefined(); + }); + + test('returns undefined when property or annotation segment is empty', () => { + expect(parseDataFieldForAnnotationName('DataFieldForAnnotation::::Contact')).toBeUndefined(); + expect(parseDataFieldForAnnotationName('DataFieldForAnnotation::Customer::')).toBeUndefined(); + }); +}); diff --git a/packages/ui5-test-writer/test/unit/utils/objectPageUtils.test.ts b/packages/ui5-test-writer/test/unit/utils/objectPageUtils.test.ts index 534143e03d5..7405d63550c 100644 --- a/packages/ui5-test-writer/test/unit/utils/objectPageUtils.test.ts +++ b/packages/ui5-test-writer/test/unit/utils/objectPageUtils.test.ts @@ -1482,6 +1482,141 @@ describe('Test getObjectPageFeatures()', () => { expect(result[0].bodySections?.[0].subSections?.[0].fields).toEqual([]); }); + test('drills ConnectedFields and FieldGroup wrappers when metadata is supplied', async () => { + const metadata = ` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +`; + const objectPage = { + name: 'objectPage1', + pageType: 'ObjectPage', + entitySet: 'Bookings', + model: { + root: { + aggregations: { + header: { + aggregations: { + sections: { aggregations: {} } as unknown as TreeAggregation + } as unknown as TreeAggregation + } as unknown as TreeAggregation, + sections: { + aggregations: { + section1: { + isTable: false, + custom: false, + schema: { keys: [{ name: 'ID', value: 'GeneralInformation' }] }, + aggregations: { + subSections: { + aggregations: { + subSection1: { + isTable: false, + custom: false, + schema: { keys: [{ name: 'ID', value: 'BookingData' }] }, + aggregations: { + form: { + schema: { keys: [] }, + aggregations: { + fields: { + aggregations: { + connected: { + name: 'DataFieldForAnnotation::ConnectedFields::CountryCity', + schema: { + keys: [ + { + name: 'Target', + value: '@UI.ConnectedFields#CountryCity' + } + ] + } + } as unknown as TreeAggregation, + group: { + name: 'DataFieldForAnnotation::FieldGroup::CheckBoxGroup', + schema: { + keys: [ + { + name: 'Target', + value: '@UI.FieldGroup#CheckBoxGroup' + } + ] + } + } as unknown as TreeAggregation + } + } as unknown as TreeAggregation + } as unknown as TreeAggregation + } as unknown as TreeAggregation + } + } as unknown as TreeAggregation + } + } as unknown as TreeAggregation + } + } as unknown as TreeAggregation + } + } as unknown as TreeAggregation + } + } as unknown as TreeAggregation, + name: 'test', + schema: {} + } + }; + const result = await getObjectPageFeatures([objectPage] as PageWithModelV4[], undefined, mockLogger, metadata); + const subSection = result[0].bodySections?.[0].subSections?.[0]; + expect(subSection?.fields).toEqual([ + { property: 'Country', connectedFields: 'CountryCity' }, + { property: 'CityName', connectedFields: 'CountryCity' }, + { property: 'PostingIsBlocked', fieldGroup: 'CheckBoxGroup' }, + { property: 'BusinessPartnerIsBlocked', fieldGroup: 'CheckBoxGroup' } + ]); + }); + test('should extract table columns from a table sub-section', async () => { const objectPage = { name: 'objectPage1', From b1d7303562f57422a99d477d7e118b9a6e5c38ef Mon Sep 17 00:00:00 2001 From: I334706 Date: Wed, 24 Jun 2026 14:13:15 +0200 Subject: [PATCH 02/18] fix(ui5-test-writer): require DataFieldForAnnotation prefix in name parser Guard parseDataFieldForAnnotationName so it only matches names whose first segment is DataFieldForAnnotation. Without the guard, any other 3-segment :: name would be treated as an annotation wrapper and dropped instead of being emitted as a plain field. --- packages/ui5-test-writer/src/utils/modelUtils.ts | 2 +- packages/ui5-test-writer/test/unit/utils/modelUtils.test.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/ui5-test-writer/src/utils/modelUtils.ts b/packages/ui5-test-writer/src/utils/modelUtils.ts index 125b0b14207..c66a875cb8c 100644 --- a/packages/ui5-test-writer/src/utils/modelUtils.ts +++ b/packages/ui5-test-writer/src/utils/modelUtils.ts @@ -273,7 +273,7 @@ export function parseDataFieldForAnnotationName( return undefined; } const segments = name.split('::'); - if (segments.length < 3) { + if (segments.length < 3 || segments[0] !== 'DataFieldForAnnotation') { return undefined; } const property = segments[1]; diff --git a/packages/ui5-test-writer/test/unit/utils/modelUtils.test.ts b/packages/ui5-test-writer/test/unit/utils/modelUtils.test.ts index 63b9a3b11b9..49ac52e5b35 100644 --- a/packages/ui5-test-writer/test/unit/utils/modelUtils.test.ts +++ b/packages/ui5-test-writer/test/unit/utils/modelUtils.test.ts @@ -388,6 +388,11 @@ describe('parseDataFieldForAnnotationName()', () => { expect(parseDataFieldForAnnotationName('PlainField')).toBeUndefined(); }); + test('returns undefined for 3-segment names whose first segment is not DataFieldForAnnotation', () => { + expect(parseDataFieldForAnnotationName('DataField::CompanyCode::Foo')).toBeUndefined(); + expect(parseDataFieldForAnnotationName('SomethingElse::Prop::Annotation')).toBeUndefined(); + }); + test('returns undefined for falsy input', () => { expect(parseDataFieldForAnnotationName(undefined)).toBeUndefined(); expect(parseDataFieldForAnnotationName('')).toBeUndefined(); From 6c4c3b21693fb4b3858ce71540d87c7452635e45 Mon Sep 17 00:00:00 2001 From: I334706 Date: Thu, 25 Jun 2026 08:21:31 +0200 Subject: [PATCH 03/18] docs(ui5-test-writer): address review comment --- packages/ui5-test-writer/src/utils/objectPageUtils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/ui5-test-writer/src/utils/objectPageUtils.ts b/packages/ui5-test-writer/src/utils/objectPageUtils.ts index 10af1fb1b2d..30de62fdf65 100644 --- a/packages/ui5-test-writer/src/utils/objectPageUtils.ts +++ b/packages/ui5-test-writer/src/utils/objectPageUtils.ts @@ -372,7 +372,8 @@ function extractFormFields( fields.push({ property, fieldGroup: qualifier }); }); } - // Unknown annotation pattern: skip + // ConnectedFields/FieldGroup without metadata: skip + // Unknown annotation wrapper type: skip } else { fields.push({ property: baseProperty }); } From f3d880c645fe26547163f544ea60bb5accb83b6b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 25 Jun 2026 06:42:45 +0000 Subject: [PATCH 04/18] Linting auto fix commit --- packages/ui5-test-writer/src/utils/objectPageUtils.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/ui5-test-writer/src/utils/objectPageUtils.ts b/packages/ui5-test-writer/src/utils/objectPageUtils.ts index 30de62fdf65..3f1736d3eab 100644 --- a/packages/ui5-test-writer/src/utils/objectPageUtils.ts +++ b/packages/ui5-test-writer/src/utils/objectPageUtils.ts @@ -321,10 +321,7 @@ function extractBodySubSectionsData( isTable, custom: !!subSection.custom, order: subSection?.order ?? -1, // put a negative order number to signal that order was not in spec - fields: - subSection.custom || isTable - ? [] - : extractFormFields(subSection, convertedMetadata, entitySetName), + fields: subSection.custom || isTable ? [] : extractFormFields(subSection, convertedMetadata, entitySetName), tableColumns: subSection.custom || !isTable ? {} : extractTableColumnsFromNode(subSection) }); }); From 1d8674f52df02b47e9398c30fb7b7cf2e3f93832 Mon Sep 17 00:00:00 2001 From: I334706 Date: Wed, 17 Jun 2026 15:09:48 +0200 Subject: [PATCH 05/18] feat(ui5-test-writer): Generate tests for Contact Cards - covers both LR and OP as there is a lot of shared code anyway - also contains some minor fixes -- column availability was not evaluated -- commented out test suggestion suggested nonexistent action --- .changeset/ui5-test-writer-contact-cards.md | 5 + packages/ui5-test-writer/src/types.ts | 11 + .../src/utils/listReportUtils.ts | 2 + .../src/utils/objectPageUtils.ts | 71 ++- .../ui5-test-writer/src/utils/tableUtils.ts | 66 +- .../v4/integration/ListReportJourney.js | 12 +- .../v4/integration/ListReportJourney.ts | 12 +- .../v4/integration/ObjectPageJourney.js | 30 +- .../v4/integration/ObjectPageJourney.ts | 34 +- .../v4/integration/pages/ObjectPage.js | 11 +- .../test/test-input/constants.ts | 2 +- .../__snapshots__/fiori-elements.test.ts.snap | 592 ++---------------- .../test/unit/fiori-elements.test.ts | 73 ++- .../test/unit/utils/listReportUtils.test.ts | 85 ++- .../test/unit/utils/modelUtils.test.ts | 31 + .../test/unit/utils/objectPageUtils.test.ts | 243 ++++++- .../test/unit/utils/tableUtils.test.ts | 183 +++++- 17 files changed, 856 insertions(+), 607 deletions(-) create mode 100644 .changeset/ui5-test-writer-contact-cards.md diff --git a/.changeset/ui5-test-writer-contact-cards.md b/.changeset/ui5-test-writer-contact-cards.md new file mode 100644 index 00000000000..79ef47b948f --- /dev/null +++ b/.changeset/ui5-test-writer-contact-cards.md @@ -0,0 +1,5 @@ +--- +"@sap-ux/ui5-test-writer": minor +--- + +FEAT: Generate Contact Card OPA5 tests across Object Page header field groups, body-section forms, body-section tables, and List Report tables. `DataFieldForAnnotation::::Contact` entries are detected in the spec model and emitted as `iClickLink({ property: "/Contact" })` followed by `iCheckContactDialog({ controlType: "sap.ui.mdc.link.Panel" })`. Drops the `iPressSectionIconTabFilterButton` page-object workaround in favor of the public `iGoToSection` API and unconditionally emits `iCheckNumberOfSections` (now valid for any section count). diff --git a/packages/ui5-test-writer/src/types.ts b/packages/ui5-test-writer/src/types.ts index ebac61a28f8..f63563c3b05 100644 --- a/packages/ui5-test-writer/src/types.ts +++ b/packages/ui5-test-writer/src/types.ts @@ -127,6 +127,7 @@ export type SectionFormField = { property: string; connectedFields?: string; fieldGroup?: string; + targetAnnotation?: string; }; export type TableColumn = { @@ -135,6 +136,10 @@ export type TableColumn = { export type TableColumnFeatureData = Record; +export type ContactCardField = { + property: string; +}; + export type BodySubSectionFeatureData = { id: string; navigationProperty?: string; @@ -142,7 +147,9 @@ export type BodySubSectionFeatureData = { custom: boolean; order: number; fields: SectionFormField[]; + contactCardFields: ContactCardField[]; tableColumns: TableColumnFeatureData; + contactCardColumns: ContactCardField[]; }; export type BodySectionFeatureData = { @@ -152,7 +159,9 @@ export type BodySectionFeatureData = { custom: boolean; order: number; fields: SectionFormField[]; + contactCardFields: ContactCardField[]; tableColumns: TableColumnFeatureData; + contactCardColumns: ContactCardField[]; subSections: BodySubSectionFeatureData[]; actions?: ActionButtonState[]; createButton?: ButtonState; @@ -184,6 +193,7 @@ export type ListReportFeatures = { }; filterBarItems?: string[]; tableColumns?: Record>; + contactCardColumns: ContactCardField[]; toolBarActions?: ActionButtonState[]; isALP?: boolean; semanticKey?: { @@ -270,6 +280,7 @@ export type HeaderSectionFeatureData = { form?: boolean; stashed?: boolean | string; fields?: FormField[]; + contactCardFields: ContactCardField[]; }; export interface ButtonState { diff --git a/packages/ui5-test-writer/src/utils/listReportUtils.ts b/packages/ui5-test-writer/src/utils/listReportUtils.ts index c9856918da6..139118b53d9 100644 --- a/packages/ui5-test-writer/src/utils/listReportUtils.ts +++ b/packages/ui5-test-writer/src/utils/listReportUtils.ts @@ -14,6 +14,7 @@ import { type AggregationItem, getAggregations } from './modelUtils.js'; +import { extractContactCardColumnsFromNode } from './tableUtils.js'; import type { ConvertedMetadata, EntitySet } from '@sap-ux/vocabularies-types'; import { parse } from '@sap-ux/edmx-parser'; import { convert } from '@sap-ux/annotation-converter'; @@ -172,6 +173,7 @@ export function getListReportFeatures( deleteButton: buildButtonState(buttonVisibility?.delete), filterBarItems, tableColumns: getTableColumnData(listReportPage.model, log), + contactCardColumns: extractContactCardColumnsFromNode(listReportPage.model.root), toolBarActions, isALP: manifest ? isALPFromManifest(manifest, listReportPage.name) : false, semanticKey: { diff --git a/packages/ui5-test-writer/src/utils/objectPageUtils.ts b/packages/ui5-test-writer/src/utils/objectPageUtils.ts index 3f1736d3eab..7cc0e5dd7f5 100644 --- a/packages/ui5-test-writer/src/utils/objectPageUtils.ts +++ b/packages/ui5-test-writer/src/utils/objectPageUtils.ts @@ -2,6 +2,7 @@ import type { Logger } from '@sap-ux/logger'; import type { ApplicationModel } from '@sap/ux-specification/dist/types/src/parser/index.js'; import type { ActionButtonState, + ContactCardField, FormField, SectionFormField, BodySectionFeatureData, @@ -20,7 +21,7 @@ import { getAggregations, parseDataFieldForAnnotationName } from './modelUtils.js'; -import { extractTableColumnsFromNode } from './tableUtils.js'; +import { extractContactCardColumnsFromNode, extractTableColumnsFromNode } from './tableUtils.js'; import { PageTypeV4 } from '@sap/ux-specification/dist/types/src/common/page.js'; import { parse } from '@sap-ux/edmx-parser'; import { convert } from '@sap-ux/annotation-converter'; @@ -158,10 +159,12 @@ function extractObjectPageHeaderSectionsData(objectPage: PageWithModelV4): Heade microChart: isSectionMicroChart(section), form: isFormSection(section), // collection: false // TODO: find out how to identify collection facets - title: section.title + title: section.title, + contactCardFields: [] }; if (sectionData.form) { sectionData.fields = getHeaderSectionFormFields(section); + sectionData.contactCardFields = pickContactCardFieldsFromHeader(sectionData.fields); } headerSections.push(sectionData); }); @@ -195,17 +198,22 @@ function extractObjectPageBodySectionsData( const subSections = extractBodySubSectionsData(section, sectionId, convertedMetadata, objectPage.entitySet); const navigationProperty = getNavigationPropertyFromKey(sectionKey); const isTable = isTableSection(section); + const fields = + section.custom || isTable + ? [] + : extractFormFields(section, convertedMetadata, objectPage.entitySet); + const tableColumns = section.custom || !isTable ? {} : extractTableColumnsFromNode(section); + const contactCardColumns = section.custom || !isTable ? [] : extractContactCardColumnsFromNode(section); const sectionData: BodySectionFeatureData = { id: sectionId, navigationProperty, isTable, custom: !!section.custom, order: section?.order ?? -1, - fields: - section.custom || isTable - ? [] - : extractFormFields(section, convertedMetadata, objectPage.entitySet), - tableColumns: section.custom || !isTable ? {} : extractTableColumnsFromNode(section), + fields, + contactCardFields: pickContactCardFields(fields), + tableColumns, + contactCardColumns, subSections, actions: !section.custom && convertedMetadata && schemaNamespace @@ -310,24 +318,60 @@ function extractBodySubSectionsData( entitySetName?: string ): BodySubSectionFeatureData[] { const subSections: BodySubSectionFeatureData[] = []; - const subSectionsAggregation = getAggregations(section)['subSections']; + const sectionAggregations = getAggregations(section); + const subSectionsAggregation = sectionAggregations['subSections'] ?? sectionAggregations['subsections']; const subSectionItems = getAggregations(subSectionsAggregation) as Record; Object.entries(subSectionItems).forEach(([subSectionKey, subSection]) => { const subSectionId = getSectionIdentifier(subSection) ?? `${parentSectionId}_${subSectionKey}`; const isTable = isTableSection(subSection); + const fields = + subSection.custom || isTable ? [] : extractFormFields(subSection, convertedMetadata, entitySetName); + const tableColumns = subSection.custom || !isTable ? {} : extractTableColumnsFromNode(subSection); + const contactCardColumns = + subSection.custom || !isTable ? [] : extractContactCardColumnsFromNode(subSection); subSections.push({ id: subSectionId, navigationProperty: getNavigationPropertyFromKey(subSectionKey), isTable, custom: !!subSection.custom, order: subSection?.order ?? -1, // put a negative order number to signal that order was not in spec - fields: subSection.custom || isTable ? [] : extractFormFields(subSection, convertedMetadata, entitySetName), - tableColumns: subSection.custom || !isTable ? {} : extractTableColumnsFromNode(subSection) + fields, + contactCardFields: pickContactCardFields(fields), + tableColumns, + contactCardColumns }); }); return subSections; } +/** + * Filters form fields down to those rendered as Contact-card links (`@Communication.Contact`). + * + * @param fields - all form fields of a (sub-)section + * @returns Contact-card fields, addressed via the qualified `/` form + */ +function pickContactCardFields(fields: SectionFormField[]): ContactCardField[] { + return fields + .filter((field) => field.targetAnnotation === 'Contact') + .map((field) => ({ property: field.property })); +} + +/** + * Filters header field-group fields down to Contact-card entries and projects them to + * the `/Contact` form expected by `onHeader().iClickLink({ property })`. + * + * @param fields - header field-group fields with optional `field` and `targetAnnotation` + * @returns Contact-card descriptors usable as `iClickLink` / `iCheckLink` arguments + */ +function pickContactCardFieldsFromHeader(fields: FormField[] | undefined): ContactCardField[] { + if (!fields) { + return []; + } + return fields + .filter((field) => field.targetAnnotation === 'Contact' && field.field) + .map((field) => ({ property: `${field.field}/${field.targetAnnotation}` })); +} + /** * Extracts form field property paths from a body sub-section's form aggregation. * @@ -360,7 +404,12 @@ function extractFormFields( if (annotationParts) { const qualifier = annotationParts.targetAnnotation; - if (annotationParts.property === 'ConnectedFields' && entityType) { + if (qualifier === 'Contact') { + fields.push({ + property: `${baseProperty}/${qualifier}`, + targetAnnotation: qualifier + }); + } else if (annotationParts.property === 'ConnectedFields' && entityType) { resolveConnectedFieldsInnerProperties(entityType, qualifier).forEach((property) => { fields.push({ property, connectedFields: qualifier }); }); diff --git a/packages/ui5-test-writer/src/utils/tableUtils.ts b/packages/ui5-test-writer/src/utils/tableUtils.ts index 98c0c46a346..4a7c19bc2be 100644 --- a/packages/ui5-test-writer/src/utils/tableUtils.ts +++ b/packages/ui5-test-writer/src/utils/tableUtils.ts @@ -1,11 +1,12 @@ import type { TreeAggregation, TreeAggregations } from '@sap/ux-specification/dist/types/src/parser/index.js'; -import { getAggregations } from './modelUtils.js'; -import type { TableColumn, TableColumnFeatureData } from '../types.js'; +import { getAggregations, parseDataFieldForAnnotationName } from './modelUtils.js'; +import type { ContactCardField, TableColumn, TableColumnFeatureData } from '../types.js'; type ColumnModelItem = { custom?: boolean; description?: string; schema: { keys: { name: string; value: string }[] }; + properties?: { availability?: { value?: string } }; }; export type ColumnAggregations = TreeAggregations & { @@ -13,28 +14,45 @@ export type ColumnAggregations = TreeAggregations & { }; /** - * Gets the identifier of a column for OPA5 tests. - * Custom columns use the 'Key' entry; standard columns use the 'Value' entry from the schema keys. + * Returns true when the column is rendered in the table by default. Columns flagged as `Adaptation` + * (only reachable via end-user table settings) or `Hidden` are excluded from generated assertions. * * @param column - column item from ux specification - * @returns identifier of the column for OPA5 tests; undefined if no matching key entry is found + * @returns true if the column is shown by default; false for Adaptation/Hidden columns */ -export function getColumnIdentifier(column: ColumnModelItem): string | undefined { - const key = column.custom ? 'Key' : 'Value'; - return column.schema.keys.find((k) => k.name === key)?.value; +function isDefaultAvailableColumn(column: ColumnModelItem): boolean { + const availability = column.properties?.availability?.value; + return availability === undefined || availability === 'Default'; +} + +/** + * Gets the identifier of a column for OPA5 tests, matching the rendered MDC column's `propertyKey`. + * Custom columns use the `Key` schema entry; standard columns use the `Value` schema entry; for + * annotation-driven entries that carry no `Value` (e.g. Contact-card columns), the column aggregation + * key is used. + * + * @param column - column item from ux specification + * @param columnKey - aggregation key of the column in its parent `columns` aggregation + * @returns identifier of the column for OPA5 tests; undefined if no identifier can be determined + */ +export function getColumnIdentifier(column: ColumnModelItem, columnKey?: string): string | undefined { + const schemaKeyName = column.custom ? 'Key' : 'Value'; + return column.schema.keys.find((k) => k.name === schemaKeyName)?.value ?? (column.custom ? undefined : columnKey); } /** * Transforms column aggregations from the ux specification model into a map of columns for OPA5 tests. - * Each column entry includes the column header label for display verification. * * @param columnAggregations - column aggregations from the ux specification model * @returns a map of column identifiers to column state objects for use with iCheckColumns() */ export function transformTableColumns(columnAggregations: ColumnAggregations): TableColumnFeatureData { const columns: TableColumnFeatureData = {}; - Object.values(columnAggregations).forEach((column, index) => { - const id = getColumnIdentifier(column) ?? String(index); + Object.entries(columnAggregations).forEach(([columnKey, column], index) => { + if (!isDefaultAvailableColumn(column)) { + return; + } + const id = getColumnIdentifier(column, columnKey) ?? String(index); const state: TableColumn = {}; if (column.description) { state['header'] = column.description; @@ -64,3 +82,29 @@ export function extractTableColumnsFromNode(node: TreeAggregation): TableColumnF const columnItems = getAggregations(columnsAggregation); return transformTableColumns(columnItems as ColumnAggregations); } + +/** + * Extracts Contact-card columns from a spec model node that contains a 'table' aggregation. + * + * @param node - tree aggregation node that exposes a 'table' aggregation + * @returns array of Contact-card field descriptors for use with iClickLink/iCheckLink + */ +export function extractContactCardColumnsFromNode(node: TreeAggregation): ContactCardField[] { + const tableAggregation = getAggregations(node)['table']; + if (!tableAggregation) { + return []; + } + const columnsAggregation = getAggregations(tableAggregation)['columns']; + if (!columnsAggregation) { + return []; + } + const columnItems = getAggregations(columnsAggregation) as ColumnAggregations; + const contactColumns: ContactCardField[] = []; + Object.entries(columnItems).forEach(([columnKey, column]) => { + const parsed = parseDataFieldForAnnotationName(columnKey); + if (parsed?.targetAnnotation === 'Contact' && isDefaultAvailableColumn(column)) { + contactColumns.push({ property: columnKey }); + } + }); + return contactColumns; +} diff --git a/packages/ui5-test-writer/templates/v4/integration/ListReportJourney.js b/packages/ui5-test-writer/templates/v4/integration/ListReportJourney.js index c80692ecb17..f386db06843 100644 --- a/packages/ui5-test-writer/templates/v4/integration/ListReportJourney.js +++ b/packages/ui5-test-writer/templates/v4/integration/ListReportJourney.js @@ -85,7 +85,17 @@ sap.ui.define([ <%_ } -%> <%_ if (tableColumns && Object.keys(tableColumns).length > 0) { -%> Then.onThe<%- startLR %>Generated.onTable().iCheckColumns(undefined, <%- JSON.stringify(tableColumns) %>); - <%_ } %> + <%_ } _%> + }); +<%_ } %> + +<%_ if (contactCardColumns.length > 0) { -%> + opaTest("Check contact card links", function (Given, When, Then) { + <%_ contactCardColumns.forEach(function(column) { _%> + // May fail if the mock data has no row at index 0 or that row does not render the contact link; adjust the row selector if needed. + When.onThe<%- startLR %>Generated.onTable().iClickLink(0, "<%- column.property %>"); + Then.onThe<%- startLR %>Generated.onDialog().iCheckContactDialog({ controlType: "sap.ui.mdc.link.Panel" }); + <%_ }); -%> }); <%_ } %> diff --git a/packages/ui5-test-writer/templates/v4/integration/ListReportJourney.ts b/packages/ui5-test-writer/templates/v4/integration/ListReportJourney.ts index b74d31b757f..da9b165bc3c 100644 --- a/packages/ui5-test-writer/templates/v4/integration/ListReportJourney.ts +++ b/packages/ui5-test-writer/templates/v4/integration/ListReportJourney.ts @@ -91,7 +91,17 @@ function journey() { <%_ } -%> <%_ if (tableColumns && Object.keys(tableColumns).length > 0) { -%> Then.onThe<%- startLR %>Generated.onTable("").iCheckColumns(undefined, <%- JSON.stringify(tableColumns) %>); - <%_ } %> + <%_ } _%> + }); +<%_ } %> + +<%_ if (contactCardColumns.length > 0) { -%> + opaTest("Check contact card links", function (_Given: Given, When: When, Then: Then) { + <%_ contactCardColumns.forEach(function(column) { _%> + // May fail if the mock data has no row at index 0 or that row does not render the contact link; adjust the row selector if needed. + When.onThe<%- startLR %>Generated.onTable("").iClickLink(0, "<%- column.property %>"); + Then.onThe<%- startLR %>Generated.onDialog().iCheckContactDialog({ controlType: "sap.ui.mdc.link.Panel" }); + <%_ }); -%> }); <%_ } %> diff --git a/packages/ui5-test-writer/templates/v4/integration/ObjectPageJourney.js b/packages/ui5-test-writer/templates/v4/integration/ObjectPageJourney.js index cf812a1fc10..ca5097e68b1 100644 --- a/packages/ui5-test-writer/templates/v4/integration/ObjectPageJourney.js +++ b/packages/ui5-test-writer/templates/v4/integration/ObjectPageJourney.js @@ -44,7 +44,7 @@ sap.ui.define([ <% if (editButton?.visible) { -%> // Ensure the opened entity is not in Draft state before uncommenting // Then.onThe<%- name%>Generated.onHeader().iCheckEdit({ visible: true }); - // When.onThe<%- name%>Generated.onHeader().iPressEdit(); + // When.onThe<%- name%>Generated.onHeader().iExecuteEdit(); <% } -%> <% headerActions.forEach(function(action) { -%> <% if (action.visible) { -%> @@ -74,6 +74,10 @@ sap.ui.define([ targetAnnotation: "<%- field.targetAnnotation %>" }); <% }) -%> +<% section.contactCardFields.forEach(function(field) { -%> + When.onThe<%- name%>Generated.onHeader().iClickLink({ property: "<%- field.property %>" }); + Then.onThe<%- name%>Generated.onDialog().iCheckContactDialog({ controlType: "sap.ui.mdc.link.Panel" }); +<% }) -%> <% } -%> <% } -%> <% }) -%> @@ -82,13 +86,9 @@ sap.ui.define([ <% if (bodySections?.length > 0) { -%> opaTest("Check body sections of the Object Page", function (Given, When, Then) { -<% if (bodySections?.length > 1) { -%> Then.onThe<%- name%>Generated.iCheckNumberOfSections(<%- bodySections.length %>); -<% } -%> <% bodySections.forEach(function(section) { -%> -<% if (bodySections.length > 1) { -%> - When.onThe<%- name%>Generated.iPressSectionIconTabFilterButton("<%- section.id %>"); -<% } -%> + When.onThe<%- name%>Generated.iGoToSection({ section: "<%- section.id %>" }); Then.onThe<%- name%>Generated.iCheckSection({ section: "<%- section.id %>" }); <% if (section.actions && section.actions.length > 0) { -%> <% section.actions.forEach(function(action) { -%> @@ -120,19 +120,31 @@ sap.ui.define([ Then.onThe<%- name%>Generated.onTable({ property: "<%- section.navigationProperty %>" }).iCheckDelete({ visible: true }); // When.onThe<%- name%>Generated.onTable({ property: "<%- section.navigationProperty %>" }).iPressDelete(); <% } -%> +<% section.contactCardColumns.forEach(function(column) { -%> + When.onThe<%- name%>Generated.onTable({ property: "<%- section.navigationProperty %>" }).iClickLink(0, "<%- column.property %>"); + Then.onThe<%- name%>Generated.onDialog().iCheckContactDialog({ controlType: "sap.ui.mdc.link.Panel" }); +<% }) -%> <% } -%> <% if (section?.subSections?.length > 0) { -%> <% section.subSections.forEach(function(subSection) { -%> - //When.onThe<%- name%>Generated.iGoToSection({ section: "<%- section.id %>", subSection: "<%- subSection.id %>" }); + When.onThe<%- name%>Generated.iGoToSection({ section: "<%- section.id %>", subSection: "<%- subSection.id %>" }); Then.onThe<%- name%>Generated.iCheckSubSection({ section: "<%- subSection.id %>" }); <% if (subSection.fields && subSection.fields.length > 0) { -%> <% subSection.fields.forEach(function(field) { -%> Then.onThe<%- name%>Generated.onForm({ section: "<%- subSection.id %>" }).iCheckField({ property: "<%- field.property %>"<% if (field.connectedFields) { %>, connectedFields: "<%- field.connectedFields %>"<% } %><% if (field.fieldGroup) { %>, fieldGroup: "<%- field.fieldGroup %>"<% } %> }); <% }) -%> <% } -%> +<% subSection.contactCardFields.forEach(function(field) { -%> + When.onThe<%- name%>Generated.onForm({ section: "<%- subSection.id %>" }).iClickLink({ property: "<%- field.property %>" }); + Then.onThe<%- name%>Generated.onDialog().iCheckContactDialog({ controlType: "sap.ui.mdc.link.Panel" }); +<% }) -%> <% if (subSection.tableColumns && Object.keys(subSection.tableColumns).length > 0 && subSection.navigationProperty) { -%> Then.onThe<%- name%>Generated.onTable({ property: "<%- subSection.navigationProperty %>" }).iCheckColumns(<%- JSON.stringify(subSection.tableColumns) %>); <% } -%> +<% subSection.contactCardColumns.forEach(function(column) { -%> + When.onThe<%- name%>Generated.onTable({ property: "<%- subSection.navigationProperty %>" }).iClickLink(0, "<%- column.property %>"); + Then.onThe<%- name%>Generated.onDialog().iCheckContactDialog({ controlType: "sap.ui.mdc.link.Panel" }); +<% }) -%> <% }) -%> <% } else { -%> <% if (section.fields && section.fields.length > 0) { -%> @@ -140,6 +152,10 @@ sap.ui.define([ Then.onThe<%- name%>Generated.onForm({ section: "<%- section.id %>" }).iCheckField({ property: "<%- field.property %>"<% if (field.connectedFields) { %>, connectedFields: "<%- field.connectedFields %>"<% } %><% if (field.fieldGroup) { %>, fieldGroup: "<%- field.fieldGroup %>"<% } %> }); <% }) -%> <% } -%> +<% section.contactCardFields.forEach(function(field) { -%> + When.onThe<%- name%>Generated.onForm({ section: "<%- section.id %>" }).iClickLink({ property: "<%- field.property %>" }); + Then.onThe<%- name%>Generated.onDialog().iCheckContactDialog({ controlType: "sap.ui.mdc.link.Panel" }); +<% }) -%> <% if (section.tableColumns && Object.keys(section.tableColumns).length > 0 && section.navigationProperty) { -%> Then.onThe<%- name%>Generated.onTable({ property: "<%- section.navigationProperty %>" }).iCheckColumns(<%- JSON.stringify(section.tableColumns) %>); <% } -%> diff --git a/packages/ui5-test-writer/templates/v4/integration/ObjectPageJourney.ts b/packages/ui5-test-writer/templates/v4/integration/ObjectPageJourney.ts index 7b31b16b514..1c7e1db08ef 100644 --- a/packages/ui5-test-writer/templates/v4/integration/ObjectPageJourney.ts +++ b/packages/ui5-test-writer/templates/v4/integration/ObjectPageJourney.ts @@ -63,7 +63,7 @@ function journey() { <% if (editButton?.visible) { -%> // Ensure the opened entity is not in Draft state before uncommenting // Then.onThe<%- name%>Generated.onHeader().iCheckEdit({ visible: true }); - // When.onThe<%- name%>Generated.onHeader().iPressEdit(); + // When.onThe<%- name%>Generated.onHeader().iExecuteEdit(); <% } -%> <% headerActions.forEach(function(action) { -%> <% if (action.visible) { -%> @@ -79,7 +79,7 @@ function journey() { <% } -%> <% if (headerSections?.length > 0) { -%> - opaTest("Check header facets of the Object Page", function (_Given: Given, _When: When, Then: Then) { + opaTest("Check header facets of the Object Page", function (_Given: Given, When: When, Then: Then) { <% headerSections.forEach(function(section) { -%> <% if (section.microChart) { -%> Then.onThe<%- name%>Generated.onHeader().iCheckMicroChart("<%- section.title %>", ""); @@ -93,6 +93,10 @@ function journey() { targetAnnotation: "<%- field.targetAnnotation %>" } as unknown as FieldIdentifier); <% }) -%> +<% section.contactCardFields.forEach(function(field) { -%> + When.onThe<%- name%>Generated.onHeader().iClickLink({ property: "<%- field.property %>" } as unknown as FieldIdentifier); + Then.onThe<%- name%>Generated.onDialog().iCheckContactDialog({ controlType: "sap.ui.mdc.link.Panel" }); +<% }) -%> <% } -%> <% } -%> <% }) -%> @@ -100,14 +104,10 @@ function journey() { <% } -%> <% if (bodySections?.length > 0) { -%> - opaTest("Check body sections of the Object Page", function (_Given: Given, <% if (bodySections?.length > 1) { %>When: When<% } else { %>_When: When<% } %>, Then: Then) { -<% if (bodySections?.length > 1) { -%> + opaTest("Check body sections of the Object Page", function (_Given: Given, When: When, Then: Then) { Then.onThe<%- name%>Generated.iCheckNumberOfSections(<%- bodySections.length %>); -<% } -%> <% bodySections.forEach(function(section) { -%> -<% if (bodySections.length > 1) { -%> - When.onThe<%- name%>Generated.iPressSectionIconTabFilterButton("<%- section.id %>"); -<% } -%> + When.onThe<%- name%>Generated.iGoToSection({ section: "<%- section.id %>" }); Then.onThe<%- name%>Generated.iCheckSection({ section: "<%- section.id %>" }, {}); <% if (section.actions && section.actions.length > 0) { -%> <% section.actions.forEach(function(action) { -%> @@ -139,19 +139,31 @@ function journey() { Then.onThe<%- name%>Generated.onTable({ property: "<%- section.navigationProperty %>" }).iCheckDelete({ visible: true }); // When.onThe<%- name%>Generated.onTable({ property: "<%- section.navigationProperty %>" }).iPressDelete(); <% } -%> +<% section.contactCardColumns.forEach(function(column) { -%> + When.onThe<%- name%>Generated.onTable({ property: "<%- section.navigationProperty %>" }).iClickLink(0, "<%- column.property %>"); + Then.onThe<%- name%>Generated.onDialog().iCheckContactDialog({ controlType: "sap.ui.mdc.link.Panel" }); +<% }) -%> <% } -%> <% if (section?.subSections?.length > 0) { -%> <% section.subSections.forEach(function(subSection) { -%> - //When.onThe<%- name%>Generated.iGoToSection({ section: "<%- section.id %>", subSection: "<%- subSection.id %>" }); + When.onThe<%- name%>Generated.iGoToSection({ section: "<%- section.id %>", subSection: "<%- subSection.id %>" }); Then.onThe<%- name%>Generated.iCheckSubSection({ section: "<%- subSection.id %>" }); <% if (subSection.fields && subSection.fields.length > 0) { -%> <% subSection.fields.forEach(function(field) { -%> Then.onThe<%- name%>Generated.onForm({ section: "<%- subSection.id %>" } as unknown as FormIdentifier).iCheckField({ property: "<%- field.property %>"<% if (field.connectedFields) { %>, connectedFields: "<%- field.connectedFields %>"<% } %><% if (field.fieldGroup) { %>, fieldGroup: "<%- field.fieldGroup %>"<% } %> }); <% }) -%> <% } -%> +<% subSection.contactCardFields.forEach(function(field) { -%> + When.onThe<%- name%>Generated.onForm({ section: "<%- subSection.id %>" } as unknown as FormIdentifier).iClickLink({ property: "<%- field.property %>" }); + Then.onThe<%- name%>Generated.onDialog().iCheckContactDialog({ controlType: "sap.ui.mdc.link.Panel" }); +<% }) -%> <% if (subSection.tableColumns && Object.keys(subSection.tableColumns).length > 0 && subSection.navigationProperty) { -%> Then.onThe<%- name%>Generated.onTable({ property: "<%- subSection.navigationProperty %>" }).iCheckColumns(<%- JSON.stringify(subSection.tableColumns) %>); <% } -%> +<% subSection.contactCardColumns.forEach(function(column) { -%> + When.onThe<%- name%>Generated.onTable({ property: "<%- subSection.navigationProperty %>" }).iClickLink(0, "<%- column.property %>"); + Then.onThe<%- name%>Generated.onDialog().iCheckContactDialog({ controlType: "sap.ui.mdc.link.Panel" }); +<% }) -%> <% }) -%> <% } else { -%> <% if (section.fields && section.fields.length > 0) { -%> @@ -159,6 +171,10 @@ function journey() { Then.onThe<%- name%>Generated.onForm({ section: "<%- section.id %>" } as unknown as FormIdentifier).iCheckField({ property: "<%- field.property %>"<% if (field.connectedFields) { %>, connectedFields: "<%- field.connectedFields %>"<% } %><% if (field.fieldGroup) { %>, fieldGroup: "<%- field.fieldGroup %>"<% } %> }); <% }) -%> <% } -%> +<% section.contactCardFields.forEach(function(field) { -%> + When.onThe<%- name%>Generated.onForm({ section: "<%- section.id %>" } as unknown as FormIdentifier).iClickLink({ property: "<%- field.property %>" }); + Then.onThe<%- name%>Generated.onDialog().iCheckContactDialog({ controlType: "sap.ui.mdc.link.Panel" }); +<% }) -%> <% if (section.tableColumns && Object.keys(section.tableColumns).length > 0 && section.navigationProperty) { -%> Then.onThe<%- name%>Generated.onTable({ property: "<%- section.navigationProperty %>" }).iCheckColumns(<%- JSON.stringify(section.tableColumns) %>); <% } -%> diff --git a/packages/ui5-test-writer/templates/v4/integration/pages/ObjectPage.js b/packages/ui5-test-writer/templates/v4/integration/pages/ObjectPage.js index 07e36a9bcbc..89c6b4757bb 100644 --- a/packages/ui5-test-writer/templates/v4/integration/pages/ObjectPage.js +++ b/packages/ui5-test-writer/templates/v4/integration/pages/ObjectPage.js @@ -15,18 +15,11 @@ * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { +sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { 'use strict'; var CustomPageDefinitions = { - actions: { - iPressSectionIconTabFilterButton: function (section) { - return this.waitFor({ - id: new RegExp(`.*--fe::FacetSection::${section}-anchor$`), - actions: new Press() - }); - } - }, + actions: {}, assertions: {} }; diff --git a/packages/ui5-test-writer/test/test-input/constants.ts b/packages/ui5-test-writer/test/test-input/constants.ts index 0659591c3bf..cf0c99a9335 100644 --- a/packages/ui5-test-writer/test/test-input/constants.ts +++ b/packages/ui5-test-writer/test/test-input/constants.ts @@ -4,4 +4,4 @@ export const V4_MODEL_FILTER_BAR_NO_TRAVEL_ID = '{"applicationModel":{"$schema": export const V4_NO_FILTER_MODEL = '{"applicationModel":{"$schema":"./.schemas/App.json","id":"project1","pages":{"TravelList":{"pageType":"ListReport","entitySet":"Travel","contextPath":"/Travel","entityType":"com.sap.gateway.srvd.dmo.sd_travel_mdsk.v0001.TravelType","variantManagement":"Page","navigation":{"Travel":{"route":"TravelObjectPage"}},"routePattern":":?query:","template":"sap.fe.templates.ListReport","model":{"root":{"path":[],"aggregations":{"header":{"path":["header"],"aggregations":{"actions":{"path":["header","actions"],"aggregations":{},"properties":{},"variants":[],"annotationCreationForms":[],"allowedAnnotationCreationForms":["NativeAction","NativeNavigation"],"schemaCreationForms":[{"name":"CustomAction","kind":"schema","title":"PAGE_EDITOR_OUTLINE_ADD_CUSTOM_ACTIONS_TITLE","disabled":false}],"state":0,"type":"Object","custom":false,"isTable":false,"schema":{"type":"object","additionalProperties":{"$ref":"#/definitions/CustomHeaderAction"},"isViewNode":true,"description":"Actions","properties":{}},"sortableList":true,"sortableCollection":"actions","i18nKey":"ACTIONS","name":"actions","order":0,"description":"Actions","isViewNode":true,"additionalProperties":{"path":[],"aggregations":{"actions":{"path":["header","actions","actions"],"aggregations":{"position":{"path":["header","actions","actions","position"],"aggregations":{},"properties":{"anchor":{"state":0,"schema":{"description":"The key of another action to be used as placement anchor.","artifactType":"Manifest","type":"string","oneOf":[]},"name":"Anchor","freeText":true,"description":"The key of another action to be used as placement anchor.","artifactType":"Manifest"},"placement":{"state":0,"schema":{"enum":["After","Before"],"type":"string","description":"Define the placement, either before or after the anchor action.","artifactType":"Manifest"},"name":"Placement","freeText":false,"description":"Define the placement, either before or after the anchor action.","artifactType":"Manifest","required":true}},"variants":[],"annotationCreationForms":[],"allowedAnnotationCreationForms":[],"schemaCreationForms":[],"state":0,"type":"Object","custom":false,"isTable":false,"schema":{"type":"object","properties":{"anchor":{"description":"The key of another action to be used as placement anchor.","artifactType":"Manifest","type":"string","oneOf":[]},"placement":{"$ref":"#/definitions/ActionPlacement","description":"Define the placement, either before or after the anchor action.","artifactType":"Manifest"}},"additionalProperties":false,"required":["placement"],"description":"Defines the position of the action relative to other actions.","artifactType":"Manifest"},"name":"position","order":0,"description":"Defines the position of the action relative to other actions.","artifactType":"Manifest"}},"properties":{"text":{"state":0,"schema":{"description":"The text that is displayed on the button (typically a binding to an i18n entry).","i18nClassification":"COL: Custom action text","artifactType":"Manifest","type":"string"},"name":"Text","freeText":true,"description":"The text that is displayed on the button (typically a binding to an i18n entry).","i18nClassification":"COL: Custom action text","artifactType":"Manifest","required":true},"press":{"state":0,"schema":{"description":"Relevant for extension actions; allows the definition of a target action handler.","artifactType":"Manifest","type":"string"},"name":"Press","freeText":true,"description":"Relevant for extension actions; allows the definition of a target action handler.","artifactType":"Manifest","required":true},"visible":{"state":0,"schema":{"enum":[false,true]},"name":"Visible","freeText":true,"description":"Defines if the action button is visible.","artifactType":"Manifest"},"enabled":{"state":0,"schema":{"enum":[false,true]},"name":"Enabled","freeText":true,"description":"Defines if the action is enabled. The default value is true.","artifactType":"Manifest"},"group":{"state":0,"schema":{"artifactType":"Manifest","descriptionSrcURL":"https://ui5.sap.com/#/topic/cbf16c599f2d4b8796e3702f7d4aae6c","type":"string"},"name":"Group","freeText":true,"artifactType":"Manifest"}},"variants":[],"annotationCreationForms":[],"allowedAnnotationCreationForms":[],"schemaCreationForms":[],"state":0,"type":"Object","custom":false,"isTable":false,"schema":{"type":"object","properties":{"position":{"$ref":"#/definitions/CustomHeaderActionPosition","description":"Defines the position of the action relative to other actions.","artifactType":"Manifest"},"text":{"description":"The text that is displayed on the button (typically a binding to an i18n entry).","i18nClassification":"COL: Custom action text","artifactType":"Manifest","type":"string"},"press":{"description":"Relevant for extension actions; allows the definition of a target action handler.","artifactType":"Manifest","type":"string"},"visible":{"anyOf":[{"enum":[false,true]},{"type":"string"}],"description":"Defines if the action button is visible.","artifactType":"Manifest"},"enabled":{"anyOf":[{"enum":[false,true]},{"type":"string"}],"description":"Defines if the action is enabled. The default value is true.","artifactType":"Manifest"},"group":{"artifactType":"Manifest","descriptionSrcURL":"https://ui5.sap.com/#/topic/cbf16c599f2d4b8796e3702f7d4aae6c","type":"string"}},"additionalProperties":false,"required":["press","text"],"isViewNode":true,"description":"Custom Action"},"name":"actions","order":0,"description":"Custom Action","isViewNode":true}},"properties":{},"variants":[],"annotationCreationForms":[],"allowedAnnotationCreationForms":["AnalyticalChart"],"schemaCreationForms":[],"state":0,"type":"Object","custom":false,"isTable":false,"name":"root"},"value":{},"locations":[],"formSchema":{"path":["header","actions","actions"],"aggregations":{"position":{"path":["header","actions","actions","position"],"aggregations":{},"properties":{"anchor":{"state":0,"schema":{"description":"The key of another action to be used as placement anchor.","artifactType":"Manifest","type":"string","oneOf":[]},"name":"Anchor","freeText":true,"description":"The key of another action to be used as placement anchor.","artifactType":"Manifest"},"placement":{"state":0,"schema":{"enum":["After","Before"],"type":"string","description":"Define the placement, either before or after the anchor action.","artifactType":"Manifest"},"name":"Placement","freeText":false,"description":"Define the placement, either before or after the anchor action.","artifactType":"Manifest","required":true}},"variants":[],"annotationCreationForms":[],"allowedAnnotationCreationForms":[],"schemaCreationForms":[],"state":0,"type":"Object","custom":false,"isTable":false,"schema":{"type":"object","properties":{"anchor":{"description":"The key of another action to be used as placement anchor.","artifactType":"Manifest","type":"string","oneOf":[]},"placement":{"$ref":"#/definitions/ActionPlacement","description":"Define the placement, either before or after the anchor action.","artifactType":"Manifest"}},"additionalProperties":false,"required":["placement"],"description":"Defines the position of the action relative to other actions.","artifactType":"Manifest"},"name":"position","order":0,"description":"Defines the position of the action relative to other actions.","artifactType":"Manifest"}},"properties":{"text":{"state":0,"schema":{"description":"The text that is displayed on the button (typically a binding to an i18n entry).","i18nClassification":"COL: Custom action text","artifactType":"Manifest","type":"string"},"name":"Text","freeText":true,"description":"The text that is displayed on the button (typically a binding to an i18n entry).","i18nClassification":"COL: Custom action text","artifactType":"Manifest","required":true},"press":{"state":0,"schema":{"description":"Relevant for extension actions; allows the definition of a target action handler.","artifactType":"Manifest","type":"string"},"name":"Press","freeText":true,"description":"Relevant for extension actions; allows the definition of a target action handler.","artifactType":"Manifest","required":true},"visible":{"state":0,"schema":{"enum":[false,true]},"name":"Visible","freeText":true,"description":"Defines if the action button is visible.","artifactType":"Manifest"},"enabled":{"state":0,"schema":{"enum":[false,true]},"name":"Enabled","freeText":true,"description":"Defines if the action is enabled. The default value is true.","artifactType":"Manifest"},"group":{"state":0,"schema":{"artifactType":"Manifest","descriptionSrcURL":"https://ui5.sap.com/#/topic/cbf16c599f2d4b8796e3702f7d4aae6c","type":"string"},"name":"Group","freeText":true,"artifactType":"Manifest"}},"variants":[],"annotationCreationForms":[],"allowedAnnotationCreationForms":[],"schemaCreationForms":[],"state":0,"type":"Object","custom":false,"isTable":false,"schema":{"type":"object","properties":{"position":{"$ref":"#/definitions/CustomHeaderActionPosition","description":"Defines the position of the action relative to other actions.","artifactType":"Manifest"},"text":{"description":"The text that is displayed on the button (typically a binding to an i18n entry).","i18nClassification":"COL: Custom action text","artifactType":"Manifest","type":"string"},"press":{"description":"Relevant for extension actions; allows the definition of a target action handler.","artifactType":"Manifest","type":"string"},"visible":{"anyOf":[{"enum":[false,true]},{"type":"string"}],"description":"Defines if the action button is visible.","artifactType":"Manifest"},"enabled":{"anyOf":[{"enum":[false,true]},{"type":"string"}],"description":"Defines if the action is enabled. The default value is true.","artifactType":"Manifest"},"group":{"artifactType":"Manifest","descriptionSrcURL":"https://ui5.sap.com/#/topic/cbf16c599f2d4b8796e3702f7d4aae6c","type":"string"}},"additionalProperties":false,"required":["press","text"],"isViewNode":true,"description":"Custom Action"},"name":"actions","order":0,"description":"Custom Action","isViewNode":true}}},"properties":{},"variants":[],"annotationCreationForms":[],"allowedAnnotationCreationForms":[],"schemaCreationForms":[],"state":0,"type":"Object","custom":false,"isTable":false,"schema":{"description":"Header","isViewNode":true,"type":"object","properties":{"actions":{"$ref":"#/definitions/HeaderActions"}},"additionalProperties":false,"propertyIndex":0},"name":"header","order":0,"description":"Header","isViewNode":true,"value":{"actions":{}},"locations":[]},"filterBar":{"path":["filterBar"],"aggregations":{"selectionFields":{"path":["filterBar","selectionFields"],"aggregations":{},"properties":{},"variants":[{"aggregations":{},"properties":{}}],"annotationCreationForms":[],"allowedAnnotationCreationForms":["NativeFilterFields"],"schemaCreationForms":[{"name":"CustomFilterField","kind":"schema","title":"PAGE_EDITOR_OUTLINE_ADD_CUSTOM_FILTER_FIELDS_TITLE","disabled":false}],"state":0,"type":"Object","custom":false,"isTable":false,"schema":{"description":"Filter Fields","isViewNode":true,"type":"object","additionalProperties":{"$ref":"#/definitions/CustomFilterField"},"properties":{},"annotationPath":"/com.sap.gateway.srvd.dmo.sd_travel_mdsk.v0001.TravelType/@com.sap.vocabularies.UI.v1.SelectionFields"},"sortableList":true,"i18nKey":"FILTER_FIELDS","name":"selectionFields","order":0,"description":"Filter Fields","isViewNode":true,"additionalProperties":{"path":[],"aggregations":{"selectionFields":{"path":["filterBar","selectionFields","selectionFields"],"aggregations":{"position":{"path":["filterBar","selectionFields","selectionFields","position"],"aggregations":{},"properties":{"anchor":{"state":0,"schema":{"description":"The key of another filter field is to be used as a placement anchor.","type":"string","artifactType":"Manifest","oneOf":[]},"name":"Anchor","freeText":true,"description":"The key of another filter field is to be used as a placement anchor.","artifactType":"Manifest"},"placement":{"state":0,"schema":{"enum":["After","Before"],"type":"string","description":"Define the placement, either before or after the anchor filter field.","artifactType":"Manifest"},"name":"Placement","freeText":false,"description":"Define the placement, either before or after the anchor filter field.","artifactType":"Manifest","required":true}},"variants":[],"annotationCreationForms":[],"allowedAnnotationCreationForms":[],"schemaCreationForms":[],"state":0,"type":"Object","custom":false,"isTable":false,"schema":{"type":"object","properties":{"anchor":{"description":"The key of another filter field is to be used as a placement anchor.","type":"string","artifactType":"Manifest","oneOf":[]},"placement":{"$ref":"#/definitions/FilterFieldPlacement","description":"Define the placement, either before or after the anchor filter field.","artifactType":"Manifest"}},"additionalProperties":false,"required":["placement"],"description":"Defines the position of the filter field relative to another filter field.","artifactType":"Manifest"},"name":"position","order":0,"description":"Defines the position of the filter field relative to another filter field.","artifactType":"Manifest"}},"properties":{"label":{"state":0,"schema":{"description":"A static or i18n binding string.","i18nClassification":"COL: Custom filter field label","type":"string","artifactType":"Manifest"},"name":"Label","freeText":true,"description":"A static or i18n binding string.","i18nClassification":"COL: Custom filter field label","artifactType":"Manifest","required":true},"property":{"state":0,"schema":{"description":"The full path to the property to be filtered.","type":"string","artifactType":"Manifest"},"name":"Property","freeText":true,"description":"The full path to the property to be filtered.","artifactType":"Manifest","required":true},"template":{"state":0,"schema":{"description":"The path to the XML template containing the filter control.","type":"string","artifactType":"Manifest"},"name":"Template","freeText":true,"description":"The path to the XML template containing the filter control.","artifactType":"Manifest","required":true},"required":{"state":0,"schema":{"description":"Determines whether the filter field requires a value.","type":"boolean","artifactType":"Manifest"},"name":"Required","freeText":false,"description":"Determines whether the filter field requires a value.","artifactType":"Manifest"}},"variants":[],"annotationCreationForms":[],"allowedAnnotationCreationForms":[],"schemaCreationForms":[],"state":0,"type":"Object","custom":false,"isTable":false,"schema":{"description":"Custom Filter Field","isViewNode":true,"type":"object","properties":{"label":{"description":"A static or i18n binding string.","i18nClassification":"COL: Custom filter field label","type":"string","artifactType":"Manifest"},"property":{"description":"The full path to the property to be filtered.","type":"string","artifactType":"Manifest"},"template":{"description":"The path to the XML template containing the filter control.","type":"string","artifactType":"Manifest"},"required":{"description":"Determines whether the filter field requires a value.","type":"boolean","artifactType":"Manifest"},"position":{"$ref":"#/definitions/CustomFilterFieldPosition","description":"Defines the position of the filter field relative to another filter field.","artifactType":"Manifest"}},"additionalProperties":false,"required":["label","property","template"]},"name":"selectionFields","order":0,"description":"Custom Filter Field","isViewNode":true}},"properties":{},"variants":[],"annotationCreationForms":[],"allowedAnnotationCreationForms":["AnalyticalChart"],"schemaCreationForms":[],"state":0,"type":"Object","custom":false,"isTable":false,"name":"root"},"locations":[],"formSchema":{"path":["filterBar","selectionFields","selectionFields"],"aggregations":{"position":{"path":["filterBar","selectionFields","selectionFields","position"],"aggregations":{},"properties":{"anchor":{"state":0,"schema":{"description":"The key of another filter field is to be used as a placement anchor.","type":"string","artifactType":"Manifest","oneOf":[]},"name":"Anchor","freeText":true,"description":"The key of another filter field is to be used as a placement anchor.","artifactType":"Manifest"},"placement":{"state":0,"schema":{"enum":["After","Before"],"type":"string","description":"Define the placement, either before or after the anchor filter field.","artifactType":"Manifest"},"name":"Placement","freeText":false,"description":"Define the placement, either before or after the anchor filter field.","artifactType":"Manifest","required":true}},"variants":[],"annotationCreationForms":[],"allowedAnnotationCreationForms":[],"schemaCreationForms":[],"state":0,"type":"Object","custom":false,"isTable":false,"schema":{"type":"object","properties":{"anchor":{"description":"The key of another filter field is to be used as a placement anchor.","type":"string","artifactType":"Manifest","oneOf":[]},"placement":{"$ref":"#/definitions/FilterFieldPlacement","description":"Define the placement, either before or after the anchor filter field.","artifactType":"Manifest"}},"additionalProperties":false,"required":["placement"],"description":"Defines the position of the filter field relative to another filter field.","artifactType":"Manifest"},"name":"position","order":0,"description":"Defines the position of the filter field relative to another filter field.","artifactType":"Manifest"}},"properties":{"label":{"state":0,"schema":{"description":"A static or i18n binding string.","i18nClassification":"COL: Custom filter field label","type":"string","artifactType":"Manifest"},"name":"Label","freeText":true,"description":"A static or i18n binding string.","i18nClassification":"COL: Custom filter field label","artifactType":"Manifest","required":true},"property":{"state":0,"schema":{"description":"The full path to the property to be filtered.","type":"string","artifactType":"Manifest"},"name":"Property","freeText":true,"description":"The full path to the property to be filtered.","artifactType":"Manifest","required":true},"template":{"state":0,"schema":{"description":"The path to the XML template containing the filter control.","type":"string","artifactType":"Manifest"},"name":"Template","freeText":true,"description":"The path to the XML template containing the filter control.","artifactType":"Manifest","required":true},"required":{"state":0,"schema":{"description":"Determines whether the filter field requires a value.","type":"boolean","artifactType":"Manifest"},"name":"Required","freeText":false,"description":"Determines whether the filter field requires a value.","artifactType":"Manifest"}},"variants":[],"annotationCreationForms":[],"allowedAnnotationCreationForms":[],"schemaCreationForms":[],"state":0,"type":"Object","custom":false,"isTable":false,"schema":{"description":"Custom Filter Field","isViewNode":true,"type":"object","properties":{"label":{"description":"A static or i18n binding string.","i18nClassification":"COL: Custom filter field label","type":"string","artifactType":"Manifest"},"property":{"description":"The full path to the property to be filtered.","type":"string","artifactType":"Manifest"},"template":{"description":"The path to the XML template containing the filter control.","type":"string","artifactType":"Manifest"},"required":{"description":"Determines whether the filter field requires a value.","type":"boolean","artifactType":"Manifest"},"position":{"$ref":"#/definitions/CustomFilterFieldPosition","description":"Defines the position of the filter field relative to another filter field.","artifactType":"Manifest"}},"additionalProperties":false,"required":["label","property","template"]},"name":"selectionFields","order":0,"description":"Custom Filter Field","isViewNode":true}}},"properties":{"hideFilterBar":{"state":0,"schema":{"description":"Allows you to hide the filter bar.","artifactType":"Manifest","type":"boolean","descriptionSrcURL":"https://ui5.sap.com/sdk/#/topic/4bd7590569c74c61a0124c6e370030f6"},"name":"Hide Filter Bar","freeText":false,"description":"Allows you to hide the filter bar.","artifactType":"Manifest"}},"variants":[],"annotationCreationForms":[],"allowedAnnotationCreationForms":[],"schemaCreationForms":[],"state":0,"type":"Object","custom":false,"isTable":false,"schema":{"description":"Filter Bar","isViewNode":true,"type":"object","properties":{"hideFilterBar":{"description":"Allows you to hide the filter bar.","artifactType":"Manifest","type":"boolean","descriptionSrcURL":"https://ui5.sap.com/sdk/#/topic/4bd7590569c74c61a0124c6e370030f6"},"selectionFields":{"isViewNode":true,"anyOf":[{"$ref":"#/definitions/SelectionFields"},{"$ref":"#/definitions/CompactFilters"}]},"visualFilters":{"$ref":"#/definitions/VisualFilters"},"initialLayout":{"$ref":"#/definitions/InitialLayoutType","description":"Allows you to specify the default filter mode on the initial load.","artifactType":"Manifest","descriptionSrcURL":"https://ui5.sap.com/sdk/#/topic/33f3d807c10b47d9a8141692d2619dc2","hidden":true},"layout":{"$ref":"#/definitions/LayoutType","description":"Allows you to specify the layout of the filter bar.\\n- Compact: This setting shows filter fields in compact mode.\\n- CompactVisual: This setting shows filter fields in both compact and visual modes.","artifactType":"Manifest","descriptionSrcURL":"https://ui5.sap.com/sdk/#/topic/33f3d807c10b47d9a8141692d2619dc2","hidden":true}},"additionalProperties":false,"propertyIndex":1},"name":"filterBar","order":1,"description":"Filter Bar","isViewNode":true,"value":{},"locations":[]},"table":{"path":["table"],"aggregations":{"columns":{"path":["table","columns"],"aggregations":{"DataField::TravelID":{"path":["table","columns","DataField::TravelID"],"aggregations":{},"properties":{"width":{"state":0,"schema":{"description":"A string type that represents CSS size values.\\nRefer to https://ui5.sap.com/api/sap.ui.core.CSSSize","type":"string","artifactType":"Manifest","descriptionSrcURL":"https://ui5.sap.com/api/sap.ui.core.CSSSize"},"name":"Width","freeText":true,"description":"A string type that represents CSS size values.\\nRefer to https://ui5.sap.com/api/sap.ui.core.CSSSize","artifactType":"Manifest"},"availability":{"state":0,"schema":{"enum":["Adaptation","Default","Hidden"],"type":"string","description":"Defines where the column should be shown.\\nDefault: it will be shown by default in the table.\\nAdaptation: it will initially not be shown in the table but be available via end user adaptation.\\nHidden: the column is neither available in the table nor in adaptation.","artifactType":"Manifest"},"name":"Availability","freeText":false,"description":"Defines where the column should be shown.\\nDefault: it will be shown by default in the table.\\nAdaptation: it will initially not be shown in the table but be available via end user adaptation.\\nHidden: the column is neither available in the table nor in adaptation.","artifactType":"Manifest"},"widthIncludingColumnHeader":{"state":0,"schema":{"description":"By default, the column width is calculated based on the type of the content. You can include the column header in the width calculation using the widthIncludingColumnHeader setting in the manifest.json.","type":"boolean","artifactType":"Manifest","descriptionSrcURL":"https://ui5.sap.com/#/topic/c0f6592a592e47f9bb6d09900de47412"},"name":"Width Including Column Header","freeText":false,"description":"By default, the column width is calculated based on the type of the content. You can include the column header in the width calculation using the widthIncludingColumnHeader setting in the manifest.json.","artifactType":"Manifest"}},"variants":[],"annotationCreationForms":[],"allowedAnnotationCreationForms":[],"schemaCreationForms":[],"state":0,"type":"Object","custom":false,"isTable":false,"schema":{"description":"TravelID","isViewNode":true,"type":"object","properties":{"width":{"description":"A string type that represents CSS size values.\\nRefer to https://ui5.sap.com/api/sap.ui.core.CSSSize","type":"string","artifactType":"Manifest","descriptionSrcURL":"https://ui5.sap.com/api/sap.ui.core.CSSSize"},"availability":{"$ref":"#/definitions/Availability","description":"Defines where the column should be shown.\\nDefault: it will be shown by default in the table.\\nAdaptation: it will initially not be shown in the table but be available via end user adaptation.\\nHidden: the column is neither available in the table nor in adaptation.","artifactType":"Manifest"},"widthIncludingColumnHeader":{"description":"By default, the column width is calculated based on the type of the content. You can include the column header in the width calculation using the widthIncludingColumnHeader setting in the manifest.json.","type":"boolean","artifactType":"Manifest","descriptionSrcURL":"https://ui5.sap.com/#/topic/c0f6592a592e47f9bb6d09900de47412"}},"additionalProperties":false,"annotationType":"com.sap.vocabularies.UI.v1.DataField","annotationPath":"/com.sap.gateway.srvd.dmo.sd_travel_mdsk.v0001.TravelType/@com.sap.vocabularies.UI.v1.LineItem/0","propertyIndex":0,"dataType":"String","keys":[{"name":"Value","value":"TravelID"}]},"isViewNode":true,"actions":[],"sortableItem":"Readonly","name":"DataField::TravelID","order":0,"description":"TravelID","locations":[]},"DataField::AgencyID":{"path":["table","columns","DataField::AgencyID"],"aggregations":{},"properties":{"width":{"state":0,"schema":{"description":"A string type that represents CSS size values.\\nRefer to https://ui5.sap.com/api/sap.ui.core.CSSSize","type":"string","artifactType":"Manifest","descriptionSrcURL":"https://ui5.sap.com/api/sap.ui.core.CSSSize"},"name":"Width","freeText":true,"description":"A string type that represents CSS size values.\\nRefer to https://ui5.sap.com/api/sap.ui.core.CSSSize","artifactType":"Manifest"},"availability":{"state":0,"schema":{"enum":["Adaptation","Default","Hidden"],"type":"string","description":"Defines where the column should be shown.\\nDefault: it will be shown by default in the table.\\nAdaptation: it will initially not be shown in the table but be available via end user adaptation.\\nHidden: the column is neither available in the table nor in adaptation.","artifactType":"Manifest"},"name":"Availability","freeText":false,"description":"Defines where the column should be shown.\\nDefault: it will be shown by default in the table.\\nAdaptation: it will initially not be shown in the table but be available via end user adaptation.\\nHidden: the column is neither available in the table nor in adaptation.","artifactType":"Manifest"},"widthIncludingColumnHeader":{"state":0,"schema":{"description":"By default, the column width is calculated based on the type of the content. You can include the column header in the width calculation using the widthIncludingColumnHeader setting in the manifest.json.","type":"boolean","artifactType":"Manifest","descriptionSrcURL":"https://ui5.sap.com/#/topic/c0f6592a592e47f9bb6d09900de47412"},"name":"Width Including Column Header","freeText":false,"description":"By default, the column width is calculated based on the type of the content. You can include the column header in the width calculation using the widthIncludingColumnHeader setting in the manifest.json.","artifactType":"Manifest"}},"variants":[],"annotationCreationForms":[],"allowedAnnotationCreationForms":[],"schemaCreationForms":[],"state":0,"type":"Object","custom":false,"isTable":false,"schema":{"description":"AgencyID","isViewNode":true,"type":"object","properties":{"width":{"description":"A string type that represents CSS size values.\\nRefer to https://ui5.sap.com/api/sap.ui.core.CSSSize","type":"string","artifactType":"Manifest","descriptionSrcURL":"https://ui5.sap.com/api/sap.ui.core.CSSSize"},"availability":{"$ref":"#/definitions/Availability","description":"Defines where the column should be shown.\\nDefault: it will be shown by default in the table.\\nAdaptation: it will initially not be shown in the table but be available via end user adaptation.\\nHidden: the column is neither available in the table nor in adaptation.","artifactType":"Manifest"},"widthIncludingColumnHeader":{"description":"By default, the column width is calculated based on the type of the content. You can include the column header in the width calculation using the widthIncludingColumnHeader setting in the manifest.json.","type":"boolean","artifactType":"Manifest","descriptionSrcURL":"https://ui5.sap.com/#/topic/c0f6592a592e47f9bb6d09900de47412"}},"additionalProperties":false,"annotationType":"com.sap.vocabularies.UI.v1.DataField","annotationPath":"/com.sap.gateway.srvd.dmo.sd_travel_mdsk.v0001.TravelType/@com.sap.vocabularies.UI.v1.LineItem/1","propertyIndex":1,"dataType":"String","keys":[{"name":"Value","value":"AgencyID"}]},"isViewNode":true,"actions":[],"sortableItem":"Readonly","name":"DataField::AgencyID","order":1,"description":"AgencyID","locations":[]},"DataField::CustomerID":{"path":["table","columns","DataField::CustomerID"],"aggregations":{},"properties":{"width":{"state":0,"schema":{"description":"A string type that represents CSS size values.\\nRefer to https://ui5.sap.com/api/sap.ui.core.CSSSize","type":"string","artifactType":"Manifest","descriptionSrcURL":"https://ui5.sap.com/api/sap.ui.core.CSSSize"},"name":"Width","freeText":true,"description":"A string type that represents CSS size values.\\nRefer to https://ui5.sap.com/api/sap.ui.core.CSSSize","artifactType":"Manifest"},"availability":{"state":0,"schema":{"enum":["Adaptation","Default","Hidden"],"type":"string","description":"Defines where the column should be shown.\\nDefault: it will be shown by default in the table.\\nAdaptation: it will initially not be shown in the table but be available via end user adaptation.\\nHidden: the column is neither available in the table nor in adaptation.","artifactType":"Manifest"},"name":"Availability","freeText":false,"description":"Defines where the column should be shown.\\nDefault: it will be shown by default in the table.\\nAdaptation: it will initially not be shown in the table but be available via end user adaptation.\\nHidden: the column is neither available in the table nor in adaptation.","artifactType":"Manifest"},"widthIncludingColumnHeader":{"state":0,"schema":{"description":"By default, the column width is calculated based on the type of the content. You can include the column header in the width calculation using the widthIncludingColumnHeader setting in the manifest.json.","type":"boolean","artifactType":"Manifest","descriptionSrcURL":"https://ui5.sap.com/#/topic/c0f6592a592e47f9bb6d09900de47412"},"name":"Width Including Column Header","freeText":false,"description":"By default, the column width is calculated based on the type of the content. You can include the column header in the width calculation using the widthIncludingColumnHeader setting in the manifest.json.","artifactType":"Manifest"}},"variants":[],"annotationCreationForms":[],"allowedAnnotationCreationForms":[],"schemaCreationForms":[],"state":0,"type":"Object","custom":false,"isTable":false,"schema":{"description":"Kunden ID","isViewNode":true,"type":"object","properties":{"width":{"description":"A string type that represents CSS size values.\\nRefer to https://ui5.sap.com/api/sap.ui.core.CSSSize","type":"string","artifactType":"Manifest","descriptionSrcURL":"https://ui5.sap.com/api/sap.ui.core.CSSSize"},"availability":{"$ref":"#/definitions/Availability","description":"Defines where the column should be shown.\\nDefault: it will be shown by default in the table.\\nAdaptation: it will initially not be shown in the table but be available via end user adaptation.\\nHidden: the column is neither available in the table nor in adaptation.","artifactType":"Manifest"},"widthIncludingColumnHeader":{"description":"By default, the column width is calculated based on the type of the content. You can include the column header in the width calculation using the widthIncludingColumnHeader setting in the manifest.json.","type":"boolean","artifactType":"Manifest","descriptionSrcURL":"https://ui5.sap.com/#/topic/c0f6592a592e47f9bb6d09900de47412"}},"additionalProperties":false,"annotationType":"com.sap.vocabularies.UI.v1.DataField","annotationPath":"/com.sap.gateway.srvd.dmo.sd_travel_mdsk.v0001.TravelType/@com.sap.vocabularies.UI.v1.LineItem/2","propertyIndex":2,"dataType":"String","keys":[{"name":"Value","value":"CustomerID"}]},"isViewNode":true,"actions":[],"sortableItem":"Readonly","name":"DataField::CustomerID","order":2,"description":"Kunden ID","locations":[]},"DataField::BeginDate":{"path":["table","columns","DataField::BeginDate"],"aggregations":{},"properties":{"width":{"state":0,"schema":{"description":"A string type that represents CSS size values.\\nRefer to https://ui5.sap.com/api/sap.ui.core.CSSSize","type":"string","artifactType":"Manifest","descriptionSrcURL":"https://ui5.sap.com/api/sap.ui.core.CSSSize"},"name":"Width","freeText":true,"description":"A string type that represents CSS size values.\\nRefer to https://ui5.sap.com/api/sap.ui.core.CSSSize","artifactType":"Manifest"},"availability":{"state":0,"schema":{"enum":["Adaptation","Default","Hidden"],"type":"string","description":"Defines where the column should be shown.\\nDefault: it will be shown by default in the table.\\nAdaptation: it will initially not be shown in the table but be available via end user adaptation.\\nHidden: the column is neither available in the table nor in adaptation.","artifactType":"Manifest"},"name":"Availability","freeText":false,"description":"Defines where the column should be shown.\\nDefault: it will be shown by default in the table.\\nAdaptation: it will initially not be shown in the table but be available via end user adaptation.\\nHidden: the column is neither available in the table nor in adaptation.","artifactType":"Manifest"},"widthIncludingColumnHeader":{"state":0,"schema":{"description":"By default, the column width is calculated based on the type of the content. You can include the column header in the width calculation using the widthIncludingColumnHeader setting in the manifest.json.","type":"boolean","artifactType":"Manifest","descriptionSrcURL":"https://ui5.sap.com/#/topic/c0f6592a592e47f9bb6d09900de47412"},"name":"Width Including Column Header","freeText":false,"description":"By default, the column width is calculated based on the type of the content. You can include the column header in the width calculation using the widthIncludingColumnHeader setting in the manifest.json.","artifactType":"Manifest"}},"variants":[],"annotationCreationForms":[],"allowedAnnotationCreationForms":[],"schemaCreationForms":[],"state":0,"type":"Object","custom":false,"isTable":false,"schema":{"description":"BeginDate","isViewNode":true,"type":"object","properties":{"width":{"description":"A string type that represents CSS size values.\\nRefer to https://ui5.sap.com/api/sap.ui.core.CSSSize","type":"string","artifactType":"Manifest","descriptionSrcURL":"https://ui5.sap.com/api/sap.ui.core.CSSSize"},"availability":{"$ref":"#/definitions/Availability","description":"Defines where the column should be shown.\\nDefault: it will be shown by default in the table.\\nAdaptation: it will initially not be shown in the table but be available via end user adaptation.\\nHidden: the column is neither available in the table nor in adaptation.","artifactType":"Manifest"},"widthIncludingColumnHeader":{"description":"By default, the column width is calculated based on the type of the content. You can include the column header in the width calculation using the widthIncludingColumnHeader setting in the manifest.json.","type":"boolean","artifactType":"Manifest","descriptionSrcURL":"https://ui5.sap.com/#/topic/c0f6592a592e47f9bb6d09900de47412"}},"additionalProperties":false,"annotationType":"com.sap.vocabularies.UI.v1.DataField","annotationPath":"/com.sap.gateway.srvd.dmo.sd_travel_mdsk.v0001.TravelType/@com.sap.vocabularies.UI.v1.LineItem/3","propertyIndex":3,"dataType":"Date","keys":[{"name":"Value","value":"BeginDate"}]},"isViewNode":true,"actions":[],"sortableItem":"Readonly","name":"DataField::BeginDate","order":3,"description":"BeginDate","locations":[]},"DataField::EndDate":{"path":["table","columns","DataField::EndDate"],"aggregations":{},"properties":{"width":{"state":0,"schema":{"description":"A string type that represents CSS size values.\\nRefer to https://ui5.sap.com/api/sap.ui.core.CSSSize","type":"string","artifactType":"Manifest","descriptionSrcURL":"https://ui5.sap.com/api/sap.ui.core.CSSSize"},"name":"Width","freeText":true,"description":"A string type that represents CSS size values.\\nRefer to https://ui5.sap.com/api/sap.ui.core.CSSSize","artifactType":"Manifest"},"availability":{"state":0,"schema":{"enum":["Adaptation","Default","Hidden"],"type":"string","description":"Defines where the column should be shown.\\nDefault: it will be shown by default in the table.\\nAdaptation: it will initially not be shown in the table but be available via end user adaptation.\\nHidden: the column is neither available in the table nor in adaptation.","artifactType":"Manifest"},"name":"Availability","freeText":false,"description":"Defines where the column should be shown.\\nDefault: it will be shown by default in the table.\\nAdaptation: it will initially not be shown in the table but be available via end user adaptation.\\nHidden: the column is neither available in the table nor in adaptation.","artifactType":"Manifest"},"widthIncludingColumnHeader":{"state":0,"schema":{"description":"By default, the column width is calculated based on the type of the content. You can include the column header in the width calculation using the widthIncludingColumnHeader setting in the manifest.json.","type":"boolean","artifactType":"Manifest","descriptionSrcURL":"https://ui5.sap.com/#/topic/c0f6592a592e47f9bb6d09900de47412"},"name":"Width Including Column Header","freeText":false,"description":"By default, the column width is calculated based on the type of the content. You can include the column header in the width calculation using the widthIncludingColumnHeader setting in the manifest.json.","artifactType":"Manifest"}},"variants":[],"annotationCreationForms":[],"allowedAnnotationCreationForms":[],"schemaCreationForms":[],"state":0,"type":"Object","custom":false,"isTable":false,"schema":{"description":"EndDate","isViewNode":true,"type":"object","properties":{"width":{"description":"A string type that represents CSS size values.\\nRefer to https://ui5.sap.com/api/sap.ui.core.CSSSize","type":"string","artifactType":"Manifest","descriptionSrcURL":"https://ui5.sap.com/api/sap.ui.core.CSSSize"},"availability":{"$ref":"#/definitions/Availability","description":"Defines where the column should be shown.\\nDefault: it will be shown by default in the table.\\nAdaptation: it will initially not be shown in the table but be available via end user adaptation.\\nHidden: the column is neither available in the table nor in adaptation.","artifactType":"Manifest"},"widthIncludingColumnHeader":{"description":"By default, the column width is calculated based on the type of the content. You can include the column header in the width calculation using the widthIncludingColumnHeader setting in the manifest.json.","type":"boolean","artifactType":"Manifest","descriptionSrcURL":"https://ui5.sap.com/#/topic/c0f6592a592e47f9bb6d09900de47412"}},"additionalProperties":false,"annotationType":"com.sap.vocabularies.UI.v1.DataField","annotationPath":"/com.sap.gateway.srvd.dmo.sd_travel_mdsk.v0001.TravelType/@com.sap.vocabularies.UI.v1.LineItem/4","propertyIndex":4,"dataType":"Date","keys":[{"name":"Value","value":"EndDate"}]},"isViewNode":true,"actions":[],"sortableItem":"Readonly","name":"DataField::EndDate","order":4,"description":"EndDate","locations":[]},"DataField::TotalPrice":{"path":["table","columns","DataField::TotalPrice"],"aggregations":{},"properties":{"width":{"state":0,"schema":{"description":"A string type that represents CSS size values.\\nRefer to https://ui5.sap.com/api/sap.ui.core.CSSSize","type":"string","artifactType":"Manifest","descriptionSrcURL":"https://ui5.sap.com/api/sap.ui.core.CSSSize"},"name":"Width","freeText":true,"description":"A string type that represents CSS size values.\\nRefer to https://ui5.sap.com/api/sap.ui.core.CSSSize","artifactType":"Manifest"},"availability":{"state":0,"schema":{"enum":["Adaptation","Default","Hidden"],"type":"string","description":"Defines where the column should be shown.\\nDefault: it will be shown by default in the table.\\nAdaptation: it will initially not be shown in the table but be available via end user adaptation.\\nHidden: the column is neither available in the table nor in adaptation.","artifactType":"Manifest"},"name":"Availability","freeText":false,"description":"Defines where the column should be shown.\\nDefault: it will be shown by default in the table.\\nAdaptation: it will initially not be shown in the table but be available via end user adaptation.\\nHidden: the column is neither available in the table nor in adaptation.","artifactType":"Manifest"},"widthIncludingColumnHeader":{"state":0,"schema":{"description":"By default, the column width is calculated based on the type of the content. You can include the column header in the width calculation using the widthIncludingColumnHeader setting in the manifest.json.","type":"boolean","artifactType":"Manifest","descriptionSrcURL":"https://ui5.sap.com/#/topic/c0f6592a592e47f9bb6d09900de47412"},"name":"Width Including Column Header","freeText":false,"description":"By default, the column width is calculated based on the type of the content. You can include the column header in the width calculation using the widthIncludingColumnHeader setting in the manifest.json.","artifactType":"Manifest"}},"variants":[],"annotationCreationForms":[],"allowedAnnotationCreationForms":[],"schemaCreationForms":[],"state":0,"type":"Object","custom":false,"isTable":false,"schema":{"description":"TotalPrice","isViewNode":true,"type":"object","properties":{"width":{"description":"A string type that represents CSS size values.\\nRefer to https://ui5.sap.com/api/sap.ui.core.CSSSize","type":"string","artifactType":"Manifest","descriptionSrcURL":"https://ui5.sap.com/api/sap.ui.core.CSSSize"},"availability":{"$ref":"#/definitions/Availability","description":"Defines where the column should be shown.\\nDefault: it will be shown by default in the table.\\nAdaptation: it will initially not be shown in the table but be available via end user adaptation.\\nHidden: the column is neither available in the table nor in adaptation.","artifactType":"Manifest"},"widthIncludingColumnHeader":{"description":"By default, the column width is calculated based on the type of the content. You can include the column header in the width calculation using the widthIncludingColumnHeader setting in the manifest.json.","type":"boolean","artifactType":"Manifest","descriptionSrcURL":"https://ui5.sap.com/#/topic/c0f6592a592e47f9bb6d09900de47412"}},"additionalProperties":false,"annotationType":"com.sap.vocabularies.UI.v1.DataField","annotationPath":"/com.sap.gateway.srvd.dmo.sd_travel_mdsk.v0001.TravelType/@com.sap.vocabularies.UI.v1.LineItem/5","propertyIndex":5,"dataType":"Decimal","keys":[{"name":"Value","value":"TotalPrice"}]},"isViewNode":true,"actions":[],"sortableItem":"Readonly","name":"DataField::TotalPrice","order":5,"description":"TotalPrice","locations":[]},"DataField::Memo":{"path":["table","columns","DataField::Memo"],"aggregations":{},"properties":{"width":{"state":0,"schema":{"description":"A string type that represents CSS size values.\\nRefer to https://ui5.sap.com/api/sap.ui.core.CSSSize","type":"string","artifactType":"Manifest","descriptionSrcURL":"https://ui5.sap.com/api/sap.ui.core.CSSSize"},"name":"Width","freeText":true,"description":"A string type that represents CSS size values.\\nRefer to https://ui5.sap.com/api/sap.ui.core.CSSSize","artifactType":"Manifest"},"availability":{"state":0,"schema":{"enum":["Adaptation","Default","Hidden"],"type":"string","description":"Defines where the column should be shown.\\nDefault: it will be shown by default in the table.\\nAdaptation: it will initially not be shown in the table but be available via end user adaptation.\\nHidden: the column is neither available in the table nor in adaptation.","artifactType":"Manifest"},"name":"Availability","freeText":false,"description":"Defines where the column should be shown.\\nDefault: it will be shown by default in the table.\\nAdaptation: it will initially not be shown in the table but be available via end user adaptation.\\nHidden: the column is neither available in the table nor in adaptation.","artifactType":"Manifest"},"widthIncludingColumnHeader":{"state":0,"schema":{"description":"By default, the column width is calculated based on the type of the content. You can include the column header in the width calculation using the widthIncludingColumnHeader setting in the manifest.json.","type":"boolean","artifactType":"Manifest","descriptionSrcURL":"https://ui5.sap.com/#/topic/c0f6592a592e47f9bb6d09900de47412"},"name":"Width Including Column Header","freeText":false,"description":"By default, the column width is calculated based on the type of the content. You can include the column header in the width calculation using the widthIncludingColumnHeader setting in the manifest.json.","artifactType":"Manifest"}},"variants":[],"annotationCreationForms":[],"allowedAnnotationCreationForms":[],"schemaCreationForms":[],"state":0,"type":"Object","custom":false,"isTable":false,"schema":{"description":"Memo","isViewNode":true,"type":"object","properties":{"width":{"description":"A string type that represents CSS size values.\\nRefer to https://ui5.sap.com/api/sap.ui.core.CSSSize","type":"string","artifactType":"Manifest","descriptionSrcURL":"https://ui5.sap.com/api/sap.ui.core.CSSSize"},"availability":{"$ref":"#/definitions/Availability","description":"Defines where the column should be shown.\\nDefault: it will be shown by default in the table.\\nAdaptation: it will initially not be shown in the table but be available via end user adaptation.\\nHidden: the column is neither available in the table nor in adaptation.","artifactType":"Manifest"},"widthIncludingColumnHeader":{"description":"By default, the column width is calculated based on the type of the content. You can include the column header in the width calculation using the widthIncludingColumnHeader setting in the manifest.json.","type":"boolean","artifactType":"Manifest","descriptionSrcURL":"https://ui5.sap.com/#/topic/c0f6592a592e47f9bb6d09900de47412"}},"additionalProperties":false,"annotationType":"com.sap.vocabularies.UI.v1.DataField","annotationPath":"/com.sap.gateway.srvd.dmo.sd_travel_mdsk.v0001.TravelType/@com.sap.vocabularies.UI.v1.LineItem/6","propertyIndex":6,"dataType":"String","keys":[{"name":"Value","value":"Memo"}]},"isViewNode":true,"actions":[],"sortableItem":"Readonly","name":"DataField::Memo","order":6,"description":"Memo","locations":[]},"DataField::Status":{"path":["table","columns","DataField::Status"],"aggregations":{},"properties":{"width":{"state":0,"schema":{"description":"A string type that represents CSS size values.\\nRefer to https://ui5.sap.com/api/sap.ui.core.CSSSize","type":"string","artifactType":"Manifest","descriptionSrcURL":"https://ui5.sap.com/api/sap.ui.core.CSSSize"},"name":"Width","freeText":true,"description":"A string type that represents CSS size values.\\nRefer to https://ui5.sap.com/api/sap.ui.core.CSSSize","artifactType":"Manifest"},"availability":{"state":0,"schema":{"enum":["Adaptation","Default","Hidden"],"type":"string","description":"Defines where the column should be shown.\\nDefault: it will be shown by default in the table.\\nAdaptation: it will initially not be shown in the table but be available via end user adaptation.\\nHidden: the column is neither available in the table nor in adaptation.","artifactType":"Manifest"},"name":"Availability","freeText":false,"description":"Defines where the column should be shown.\\nDefault: it will be shown by default in the table.\\nAdaptation: it will initially not be shown in the table but be available via end user adaptation.\\nHidden: the column is neither available in the table nor in adaptation.","artifactType":"Manifest"},"widthIncludingColumnHeader":{"state":0,"schema":{"description":"By default, the column width is calculated based on the type of the content. You can include the column header in the width calculation using the widthIncludingColumnHeader setting in the manifest.json.","type":"boolean","artifactType":"Manifest","descriptionSrcURL":"https://ui5.sap.com/#/topic/c0f6592a592e47f9bb6d09900de47412"},"name":"Width Including Column Header","freeText":false,"description":"By default, the column width is calculated based on the type of the content. You can include the column header in the width calculation using the widthIncludingColumnHeader setting in the manifest.json.","artifactType":"Manifest"}},"variants":[],"annotationCreationForms":[],"allowedAnnotationCreationForms":[],"schemaCreationForms":[],"state":0,"type":"Object","custom":false,"isTable":false,"schema":{"description":"Status","isViewNode":true,"type":"object","properties":{"width":{"description":"A string type that represents CSS size values.\\nRefer to https://ui5.sap.com/api/sap.ui.core.CSSSize","type":"string","artifactType":"Manifest","descriptionSrcURL":"https://ui5.sap.com/api/sap.ui.core.CSSSize"},"availability":{"$ref":"#/definitions/Availability","description":"Defines where the column should be shown.\\nDefault: it will be shown by default in the table.\\nAdaptation: it will initially not be shown in the table but be available via end user adaptation.\\nHidden: the column is neither available in the table nor in adaptation.","artifactType":"Manifest"},"widthIncludingColumnHeader":{"description":"By default, the column width is calculated based on the type of the content. You can include the column header in the width calculation using the widthIncludingColumnHeader setting in the manifest.json.","type":"boolean","artifactType":"Manifest","descriptionSrcURL":"https://ui5.sap.com/#/topic/c0f6592a592e47f9bb6d09900de47412"}},"additionalProperties":false,"annotationType":"com.sap.vocabularies.UI.v1.DataField","annotationPath":"/com.sap.gateway.srvd.dmo.sd_travel_mdsk.v0001.TravelType/@com.sap.vocabularies.UI.v1.LineItem/7","propertyIndex":7,"dataType":"String","keys":[{"name":"Value","value":"Status"}]},"isViewNode":true,"actions":[],"sortableItem":"Readonly","name":"DataField::Status","order":7,"description":"Status","locations":[]}},"properties":{},"variants":[],"annotationCreationForms":[],"allowedAnnotationCreationForms":["Basic","Rating","Chart","Progress","NativeAction","Contact","NativeNavigation"],"schemaCreationForms":[{"name":"CustomColumnV4","kind":"schema","title":"PAGE_EDITOR_OUTLINE_ADD_CUSTOM_COLUMNS_TITLE","disabled":false}],"state":0,"type":"Object","custom":false,"isTable":false,"schema":{"type":"object","properties":{"DataField::TravelID":{"description":"TravelID","$ref":"#/definitions/TableColumn","annotationType":"com.sap.vocabularies.UI.v1.DataField","annotationPath":"/com.sap.gateway.srvd.dmo.sd_travel_mdsk.v0001.TravelType/@com.sap.vocabularies.UI.v1.LineItem/0","propertyIndex":0,"dataType":"String","keys":[{"name":"Value","value":"TravelID"}]},"DataField::AgencyID":{"description":"AgencyID","$ref":"#/definitions/TableColumn","annotationType":"com.sap.vocabularies.UI.v1.DataField","annotationPath":"/com.sap.gateway.srvd.dmo.sd_travel_mdsk.v0001.TravelType/@com.sap.vocabularies.UI.v1.LineItem/1","propertyIndex":1,"dataType":"String","keys":[{"name":"Value","value":"AgencyID"}]},"DataField::CustomerID":{"description":"Kunden ID","$ref":"#/definitions/TableColumn","annotationType":"com.sap.vocabularies.UI.v1.DataField","annotationPath":"/com.sap.gateway.srvd.dmo.sd_travel_mdsk.v0001.TravelType/@com.sap.vocabularies.UI.v1.LineItem/2","propertyIndex":2,"dataType":"String","keys":[{"name":"Value","value":"CustomerID"}]},"DataField::BeginDate":{"description":"BeginDate","$ref":"#/definitions/TableColumn","annotationType":"com.sap.vocabularies.UI.v1.DataField","annotationPath":"/com.sap.gateway.srvd.dmo.sd_travel_mdsk.v0001.TravelType/@com.sap.vocabularies.UI.v1.LineItem/3","propertyIndex":3,"dataType":"Date","keys":[{"name":"Value","value":"BeginDate"}]},"DataField::EndDate":{"description":"EndDate","$ref":"#/definitions/TableColumn","annotationType":"com.sap.vocabularies.UI.v1.DataField","annotationPath":"/com.sap.gateway.srvd.dmo.sd_travel_mdsk.v0001.TravelType/@com.sap.vocabularies.UI.v1.LineItem/4","propertyIndex":4,"dataType":"Date","keys":[{"name":"Value","value":"EndDate"}]},"DataField::TotalPrice":{"description":"TotalPrice","$ref":"#/definitions/TableColumn","annotationType":"com.sap.vocabularies.UI.v1.DataField","annotationPath":"/com.sap.gateway.srvd.dmo.sd_travel_mdsk.v0001.TravelType/@com.sap.vocabularies.UI.v1.LineItem/5","propertyIndex":5,"dataType":"Decimal","keys":[{"name":"Value","value":"TotalPrice"}]},"DataField::Memo":{"description":"Memo","$ref":"#/definitions/TableColumn","annotationType":"com.sap.vocabularies.UI.v1.DataField","annotationPath":"/com.sap.gateway.srvd.dmo.sd_travel_mdsk.v0001.TravelType/@com.sap.vocabularies.UI.v1.LineItem/6","propertyIndex":6,"dataType":"String","keys":[{"name":"Value","value":"Memo"}]},"DataField::Status":{"description":"Status","$ref":"#/definitions/TableColumn","annotationType":"com.sap.vocabularies.UI.v1.DataField","annotationPath":"/com.sap.gateway.srvd.dmo.sd_travel_mdsk.v0001.TravelType/@com.sap.vocabularies.UI.v1.LineItem/7","propertyIndex":7,"dataType":"String","keys":[{"name":"Value","value":"Status"}]}},"description":"Columns","isViewNode":true,"additionalProperties":{"$ref":"#/definitions/TableCustomColumn"}},"customColumns":[],"columnKeys":[],"sortableCollection":"actions","isV4":true,"sortableList":true,"i18nKey":"COLUMNS","name":"columns","order":3,"description":"Columns","isViewNode":true,"additionalProperties":{"path":[],"aggregations":{"columns":{"path":["table","columns","columns"],"aggregations":{"position":{"path":["table","columns","columns","position"],"aggregations":{},"properties":{"anchor":{"state":0,"schema":{"description":"The key of another column to be used as placement anchor.","type":"string","artifactType":"Manifest","enum":["DataField::TravelID","DataField::AgencyID","DataField::CustomerID","DataField::BeginDate","DataField::EndDate","DataField::TotalPrice","DataField::Memo","DataField::Status"]},"name":"Anchor","freeText":false,"description":"The key of another column to be used as placement anchor.","artifactType":"Manifest"},"placement":{"state":0,"schema":{"enum":["After","Before"],"type":"string","description":"Define the placement, either before or after the anchor column.","artifactType":"Manifest"},"name":"Placement","freeText":false,"description":"Define the placement, either before or after the anchor column.","artifactType":"Manifest","required":true}},"variants":[],"annotationCreationForms":[],"allowedAnnotationCreationForms":[],"schemaCreationForms":[],"state":0,"type":"Object","custom":false,"isTable":false,"schema":{"type":"object","properties":{"anchor":{"description":"The key of another column to be used as placement anchor.","type":"string","artifactType":"Manifest","enum":["DataField::TravelID","DataField::AgencyID","DataField::CustomerID","DataField::BeginDate","DataField::EndDate","DataField::TotalPrice","DataField::Memo","DataField::Status"]},"placement":{"$ref":"#/definitions/Placement","description":"Define the placement, either before or after the anchor column.","artifactType":"Manifest"}},"additionalProperties":false,"required":["placement"],"description":"Defines the position of the column relative to other columns.","artifactType":"Manifest"},"name":"position","order":0,"description":"Defines the position of the column relative to other columns.","artifactType":"Manifest"},"properties":{"path":["table","columns","columns","properties"],"aggregations":{},"properties":{},"variants":[],"annotationCreationForms":[],"allowedAnnotationCreationForms":[],"schemaCreationForms":[{"name":"Generic","kind":"schema","title":"PAGE_EDITOR_OUTLINE_ADD_GENERIC_TITLE","disabled":false}],"state":0,"type":"Array","custom":false,"isTable":false,"schema":{"description":"If provided and sorting for the table is enabled, the custom column header can be clicked.\\nOnce clicked, a list of properties that can be sorted by are displayed.","artifactType":"Manifest","type":"array","items":{"type":"string","enum":["TravelID","AgencyID","CustomerID","BeginDate","EndDate","TotalPrice","Memo","Status"]}},"name":"properties","order":1,"isAtomic":true,"formSchema":{"path":[],"aggregations":{},"properties":{"":{"state":0,"schema":{"type":"string","enum":["TravelID","AgencyID","CustomerID","BeginDate","EndDate","TotalPrice","Memo","Status"]},"name":"","freeText":false}},"variants":[],"annotationCreationForms":[],"allowedAnnotationCreationForms":["AnalyticalChart"],"schemaCreationForms":[],"state":0,"type":"Object","custom":false,"isTable":false,"name":"root"},"description":"If provided and sorting for the table is enabled, the custom column header can be clicked.\\nOnce clicked, a list of properties that can be sorted by are displayed.","artifactType":"Manifest"}},"properties":{"header":{"state":0,"schema":{"description":"The header is shown on the table as header, as well as in the add/remove dialog.","i18nClassification":"COL: Custom column header text","artifactType":"Manifest","type":"string"},"name":"Header","freeText":true,"description":"The header is shown on the table as header, as well as in the add/remove dialog.","i18nClassification":"COL: Custom column header text","artifactType":"Manifest","required":true},"width":{"state":0,"schema":{"description":"A string type that represents CSS size values.\\nRefer to https://ui5.sap.com/api/sap.ui.core.CSSSize","artifactType":"Manifest","type":"string","descriptionSrcURL":"https://ui5.sap.com/api/sap.ui.core.CSSSize"},"name":"Width","freeText":true,"description":"A string type that represents CSS size values.\\nRefer to https://ui5.sap.com/api/sap.ui.core.CSSSize","artifactType":"Manifest"},"template":{"state":0,"schema":{"description":"Defines a target fragment.","artifactType":"Manifest","type":"string"},"name":"Template","freeText":true,"description":"Defines a target fragment.","artifactType":"Manifest","required":true},"horizontalAlign":{"state":0,"schema":{"enum":["Begin","Center","End"],"type":"string","description":"Aligns the header as well as the content horizontally.","artifactType":"Manifest"},"name":"Horizontal Align","freeText":false,"description":"Aligns the header as well as the content horizontally.","artifactType":"Manifest"},"availability":{"state":0,"schema":{"enum":["Adaptation","Default","Hidden"],"type":"string","description":"Defines where the column should be shown.\\n- Default: it will be shown by default in the table.\\n- Adaptation: it will initially not be shown in the table but be available via end user adaptation\\n- Hidden: the column is neither available in the table nor in adaptation","artifactType":"Manifest"},"name":"Availability","freeText":false,"description":"Defines where the column should be shown.\\n- Default: it will be shown by default in the table.\\n- Adaptation: it will initially not be shown in the table but be available via end user adaptation\\n- Hidden: the column is neither available in the table nor in adaptation","artifactType":"Manifest"}},"variants":[],"annotationCreationForms":[],"allowedAnnotationCreationForms":[],"schemaCreationForms":[],"state":0,"type":"Object","custom":false,"isTable":false,"schema":{"description":"Custom Column","isViewNode":true,"type":"object","properties":{"position":{"$ref":"#/definitions/Position","description":"Defines the position of the column relative to other columns.","artifactType":"Manifest"},"header":{"description":"The header is shown on the table as header, as well as in the add/remove dialog.","i18nClassification":"COL: Custom column header text","artifactType":"Manifest","type":"string"},"width":{"description":"A string type that represents CSS size values.\\nRefer to https://ui5.sap.com/api/sap.ui.core.CSSSize","artifactType":"Manifest","type":"string","descriptionSrcURL":"https://ui5.sap.com/api/sap.ui.core.CSSSize"},"template":{"description":"Defines a target fragment.","artifactType":"Manifest","type":"string"},"horizontalAlign":{"$ref":"#/definitions/HorizontalAlign","description":"Aligns the header as well as the content horizontally.","artifactType":"Manifest"},"availability":{"$ref":"#/definitions/Availability","description":"Defines where the column should be shown.\\n- Default: it will be shown by default in the table.\\n- Adaptation: it will initially not be shown in the table but be available via end user adaptation\\n- Hidden: the column is neither available in the table nor in adaptation","artifactType":"Manifest"},"properties":{"description":"If provided and sorting for the table is enabled, the custom column header can be clicked.\\nOnce clicked, a list of properties that can be sorted by are displayed.","artifactType":"Manifest","type":"array","items":{"type":"string","enum":["TravelID","AgencyID","CustomerID","BeginDate","EndDate","TotalPrice","Memo","Status"]}}},"additionalProperties":false,"required":["header","template"]},"name":"columns","order":0,"description":"Custom Column","isViewNode":true}},"properties":{},"variants":[],"annotationCreationForms":[],"allowedAnnotationCreationForms":["AnalyticalChart"],"schemaCreationForms":[],"state":0,"type":"Object","custom":false,"isTable":false,"name":"root"},"locations":[],"tableColumnExtensionType":"ResponsiveTableColumnsExtension","formSchema":{"path":["table","columns","columns"],"aggregations":{"position":{"path":["table","columns","columns","position"],"aggregations":{},"properties":{"anchor":{"state":0,"schema":{"description":"The key of another column to be used as placement anchor.","type":"string","artifactType":"Manifest","enum":["DataField::TravelID","DataField::AgencyID","DataField::CustomerID","DataField::BeginDate","DataField::EndDate","DataField::TotalPrice","DataField::Memo","DataField::Status"]},"name":"Anchor","freeText":false,"description":"The key of another column to be used as placement anchor.","artifactType":"Manifest"},"placement":{"state":0,"schema":{"enum":["After","Before"],"type":"string","description":"Define the placement, either before or after the anchor column.","artifactType":"Manifest"},"name":"Placement","freeText":false,"description":"Define the placement, either before or after the anchor column.","artifactType":"Manifest","required":true}},"variants":[],"annotationCreationForms":[],"allowedAnnotationCreationForms":[],"schemaCreationForms":[],"state":0,"type":"Object","custom":false,"isTable":false,"schema":{"type":"object","properties":{"anchor":{"description":"The key of another column to be used as placement anchor.","type":"string","artifactType":"Manifest","enum":["DataField::TravelID","DataField::AgencyID","DataField::CustomerID","DataField::BeginDate","DataField::EndDate","DataField::TotalPrice","DataField::Memo","DataField::Status"]},"placement":{"$ref":"#/definitions/Placement","description":"Define the placement, either before or after the anchor column.","artifactType":"Manifest"}},"additionalProperties":false,"required":["placement"],"description":"Defines the position of the column relative to other columns.","artifactType":"Manifest"},"name":"position","order":0,"description":"Defines the position of the column relative to other columns.","artifactType":"Manifest"},"properties":{"path":["table","columns","columns","properties"],"aggregations":{},"properties":{},"variants":[],"annotationCreationForms":[],"allowedAnnotationCreationForms":[],"schemaCreationForms":[{"name":"Generic","kind":"schema","title":"PAGE_EDITOR_OUTLINE_ADD_GENERIC_TITLE","disabled":false}],"state":0,"type":"Array","custom":false,"isTable":false,"schema":{"description":"If provided and sorting for the table is enabled, the custom column header can be clicked.\\nOnce clicked, a list of properties that can be sorted by are displayed.","artifactType":"Manifest","type":"array","items":{"type":"string","enum":["TravelID","AgencyID","CustomerID","BeginDate","EndDate","TotalPrice","Memo","Status"]}},"name":"properties","order":1,"isAtomic":true,"formSchema":{"path":[],"aggregations":{},"properties":{"":{"state":0,"schema":{"type":"string","enum":["TravelID","AgencyID","CustomerID","BeginDate","EndDate","TotalPrice","Memo","Status"]},"name":"","freeText":false}},"variants":[],"annotationCreationForms":[],"allowedAnnotationCreationForms":["AnalyticalChart"],"schemaCreationForms":[],"state":0,"type":"Object","custom":false,"isTable":false,"name":"root"},"description":"If provided and sorting for the table is enabled, the custom column header can be clicked.\\nOnce clicked, a list of properties that can be sorted by are displayed.","artifactType":"Manifest"}},"properties":{"header":{"state":0,"schema":{"description":"The header is shown on the table as header, as well as in the add/remove dialog.","i18nClassification":"COL: Custom column header text","artifactType":"Manifest","type":"string"},"name":"Header","freeText":true,"description":"The header is shown on the table as header, as well as in the add/remove dialog.","i18nClassification":"COL: Custom column header text","artifactType":"Manifest","required":true},"width":{"state":0,"schema":{"description":"A string type that represents CSS size values.\\nRefer to https://ui5.sap.com/api/sap.ui.core.CSSSize","artifactType":"Manifest","type":"string","descriptionSrcURL":"https://ui5.sap.com/api/sap.ui.core.CSSSize"},"name":"Width","freeText":true,"description":"A string type that represents CSS size values.\\nRefer to https://ui5.sap.com/api/sap.ui.core.CSSSize","artifactType":"Manifest"},"template":{"state":0,"schema":{"description":"Defines a target fragment.","artifactType":"Manifest","type":"string"},"name":"Template","freeText":true,"description":"Defines a target fragment.","artifactType":"Manifest","required":true},"horizontalAlign":{"state":0,"schema":{"enum":["Begin","Center","End"],"type":"string","description":"Aligns the header as well as the content horizontally.","artifactType":"Manifest"},"name":"Horizontal Align","freeText":false,"description":"Aligns the header as well as the content horizontally.","artifactType":"Manifest"},"availability":{"state":0,"schema":{"enum":["Adaptation","Default","Hidden"],"type":"string","description":"Defines where the column should be shown.\\n- Default: it will be shown by default in the table.\\n- Adaptation: it will initially not be shown in the table but be available via end user adaptation\\n- Hidden: the column is neither available in the table nor in adaptation","artifactType":"Manifest"},"name":"Availability","freeText":false,"description":"Defines where the column should be shown.\\n- Default: it will be shown by default in the table.\\n- Adaptation: it will initially not be shown in the table but be available via end user adaptation\\n- Hidden: the column is neither available in the table nor in adaptation","artifactType":"Manifest"}},"variants":[],"annotationCreationForms":[],"allowedAnnotationCreationForms":[],"schemaCreationForms":[],"state":0,"type":"Object","custom":false,"isTable":false,"schema":{"description":"Custom Column","isViewNode":true,"type":"object","properties":{"position":{"$ref":"#/definitions/Position","description":"Defines the position of the column relative to other columns.","artifactType":"Manifest"},"header":{"description":"The header is shown on the table as header, as well as in the add/remove dialog.","i18nClassification":"COL: Custom column header text","artifactType":"Manifest","type":"string"},"width":{"description":"A string type that represents CSS size values.\\nRefer to https://ui5.sap.com/api/sap.ui.core.CSSSize","artifactType":"Manifest","type":"string","descriptionSrcURL":"https://ui5.sap.com/api/sap.ui.core.CSSSize"},"template":{"description":"Defines a target fragment.","artifactType":"Manifest","type":"string"},"horizontalAlign":{"$ref":"#/definitions/HorizontalAlign","description":"Aligns the header as well as the content horizontally.","artifactType":"Manifest"},"availability":{"$ref":"#/definitions/Availability","description":"Defines where the column should be shown.\\n- Default: it will be shown by default in the table.\\n- Adaptation: it will initially not be shown in the table but be available via end user adaptation\\n- Hidden: the column is neither available in the table nor in adaptation","artifactType":"Manifest"},"properties":{"description":"If provided and sorting for the table is enabled, the custom column header can be clicked.\\nOnce clicked, a list of properties that can be sorted by are displayed.","artifactType":"Manifest","type":"array","items":{"type":"string","enum":["TravelID","AgencyID","CustomerID","BeginDate","EndDate","TotalPrice","Memo","Status"]}}},"additionalProperties":false,"required":["header","template"]},"name":"columns","order":0,"description":"Custom Column","isViewNode":true}}}}}}}}}}}' -export const V4_WITH_SUB_OBJECT_PAGE = '{"applicationModel":{"pages":{"TravelList":{"contextPath":"/Travel","template":"sap.fe.templates.ListReport","entitySet":"Travel","pageType":"ListReport","model":{"root":{"aggregations":{}}},"navigation":{"Travel":{"route":"TravelObjectPage"}}},"TravelObjectPage":{"template":"sap.fe.templates.ObjectPage","model":{"root":{"aggregations":{"header":{"aggregations":{"sections":{"aggregations":{}}}}}}},"entitySet":"Travel","contextPath":"/Travel","pageType":"ObjectPage","navigation":{"_Booking":{"route":"BookingObjectPage"}}},"BookingObjectPage":{"template":"sap.fe.templates.ObjectPage","model":{"root":{"aggregations":{"header":{"aggregations":{"sections":{"aggregations":{"FlightDateDP":{"name":"FlightDateDP","properties":{"stashed":{"freeText":false}},"schema":{"type":"object","keys":[{"name":"Target","value":"com.sap.vocabularies.UI.v1.DataPoint#FlightDate"},{"name":"ID","value":"DataPoint::FlightDate"},{"name":"Value","value":"Flight Date"}]},"aggregations":{}},"BookingDateDP":{"name":"BookingDateDP","properties":{"stashed":{"freeText":false}},"schema":{"type":"object","keys":[{"name":"Target","value":"com.sap.vocabularies.UI.v1.DataPoint#BookingDate"},{"name":"ID","value":"DataPoint::BookingDate"},{"name":"Value","value":"Booking Date"}]},"aggregations":{}},"FieldGroupNames":{"name":"FieldGroupNames","properties":{"stashed":{"freeText":false}},"schema":{"type":"object","keys":[{"name":"Target","value":"com.sap.vocabularies.UI.v1.FieldGroup#Names"},{"name":"ID","value":"FieldGroup::Names"},{"name":"Value","value":"Names"}]},"aggregations":{"form":{"schema":{"keys":[{"name":"Target","value":"com.sap.vocabularies.UI.v1.FieldGroup#Names"}]},"aggregations":{"fields":{"aggregations":{"AirlineNameField":{"name":"AirlineNameField","properties":{},"schema":{"keys":[{"name":"Target","value":"#/Names/AirlineName"},{"name":"Value","value":"AirlineName"}]}},"CustomerNameField":{"name":"CustomerNameField","properties":{},"schema":{"keys":[{"name":"Target","value":"#/Names/CustomerName"},{"name":"Value","value":"CustomerName"}]}},"DataFieldForAnnotation::carrier::Contact":{"name":"DataFieldForAnnotation::carrier::Contact","properties":{},"schema":{"keys":[{"name":"Target","value":"carrier/@Communication.Contact"}]}}}}},"properties":{}}},"fields":[]},"RevenueChart":{"name":"RevenueChart","title":"Supplement Price","properties":{"stashed":{"freeText":false}},"schema":{"dataType":"ChartDefinition","keys":[{"name":"Target","value":"com.sap.vocabularies.UI.v1.Chart#SupplementPrice"},{"name":"ID","value":"Chart::SupplementPrice"},{"name":"Value","value":"Revenue"}]},"aggregations":{}}}},"actions":{"path":[],"aggregations":{"DataFieldForAction::com.sap.gateway.srvd.dmo.sd_travel_mdsk.v0001.Activate::com.sap.gateway.srvd.dmo.sd_travel_mdsk.v0001.BookingType":{"description":"Activate","path":[],"aggregations":{}}}}}},"sections":{"aggregations":{"BookingDetailsSection":{"schema":{"keys":[{"name":"ID","value":"BookingDetails"}]},"aggregations":{"subSections":{"aggregations":{"BookingDataSubSection":{"schema":{"keys":[{"name":"ID","value":"BookingData"}]},"aggregations":{"form":{"aggregations":{"fields":{"aggregations":{"BookingIdField":{"schema":{"keys":[{"name":"Value","value":"BookingId"}]}},"FlightDateField":{"schema":{"keys":[{"name":"Value","value":"FlightDate"}]}}}}}}}},"_Supplements::@UI.LineItem":{"schema":{"keys":[{"name":"ID","value":"AdministrativeData"}]},"aggregations":{"table":{"aggregations":{"columns":{"aggregations":{"ConnectionIdCol":{"schema":{"keys":[{"name":"Value","value":"ConnectionId"}]},"description":"Connection"},"AirportCodeCol":{"schema":{"keys":[{"name":"Value","value":"AirportCode"}]},"description":"Airport"}}}}}},"isTable":true}}}}},"FlightDataSection":{"schema":{"keys":[{"name":"ID","value":"FlightData"}]},"aggregations":{"form":{"aggregations":{"actions":{"aggregations":{"DataFieldForAction::com.sap.gateway.srvd.dmo.sd_travel_mdsk.v0001.deductDiscount::com.sap.gateway.srvd.dmo.sd_travel_mdsk.v0001.BookingType":{"description":"Deduct Discount","path":[],"aggregations":{}}}}}}}},"_BookSupplement::@com.sap.vocabularies.UI.v1.LineItem":{"schema":{"keys":[{"name":"ID","value":"PriceData"}]},"aggregations":{"table":{"aggregations":{"toolBar":{"aggregations":{"actions":{"aggregations":{"DataFieldForAction::com.sap.gateway.srvd.dmo.sd_travel_mdsk.v0001.createActiveTemplate::com.sap.gateway.srvd.dmo.sd_travel_mdsk.v0001.BookingType":{"description":"Create Template","path":[],"aggregations":{}}}}}}}}},"isTable":true}}}}}},"entitySet":"Booking","contextPath":"/Travel/_Booking","pageType":"ObjectPage"}}}}'; +export const V4_WITH_SUB_OBJECT_PAGE = '{"applicationModel":{"pages":{"TravelList":{"contextPath":"/Travel","template":"sap.fe.templates.ListReport","entitySet":"Travel","pageType":"ListReport","model":{"root":{"aggregations":{"table":{"aggregations":{"columns":{"aggregations":{"TravelIDCol":{"schema":{"keys":[{"name":"Value","value":"TravelID"}]},"description":"Travel"},"DataFieldForAnnotation::_Agency::Contact":{"schema":{"keys":[{"name":"Target","value":"_Agency/@Communication.Contact"}]},"description":"Agency"}}}}}}}},"navigation":{"Travel":{"route":"TravelObjectPage"}}},"TravelObjectPage":{"template":"sap.fe.templates.ObjectPage","model":{"root":{"aggregations":{"header":{"aggregations":{"sections":{"aggregations":{}}}}}}},"entitySet":"Travel","contextPath":"/Travel","pageType":"ObjectPage","navigation":{"_Booking":{"route":"BookingObjectPage"}}},"BookingObjectPage":{"template":"sap.fe.templates.ObjectPage","model":{"root":{"aggregations":{"header":{"aggregations":{"sections":{"aggregations":{"FlightDateDP":{"name":"FlightDateDP","properties":{"stashed":{"freeText":false}},"schema":{"type":"object","keys":[{"name":"Target","value":"com.sap.vocabularies.UI.v1.DataPoint#FlightDate"},{"name":"ID","value":"DataPoint::FlightDate"},{"name":"Value","value":"Flight Date"}]},"aggregations":{}},"BookingDateDP":{"name":"BookingDateDP","properties":{"stashed":{"freeText":false}},"schema":{"type":"object","keys":[{"name":"Target","value":"com.sap.vocabularies.UI.v1.DataPoint#BookingDate"},{"name":"ID","value":"DataPoint::BookingDate"},{"name":"Value","value":"Booking Date"}]},"aggregations":{}},"FieldGroupNames":{"name":"FieldGroupNames","properties":{"stashed":{"freeText":false}},"schema":{"type":"object","keys":[{"name":"Target","value":"com.sap.vocabularies.UI.v1.FieldGroup#Names"},{"name":"ID","value":"FieldGroup::Names"},{"name":"Value","value":"Names"}]},"aggregations":{"form":{"schema":{"keys":[{"name":"Target","value":"com.sap.vocabularies.UI.v1.FieldGroup#Names"}]},"aggregations":{"fields":{"aggregations":{"AirlineNameField":{"name":"AirlineNameField","properties":{},"schema":{"keys":[{"name":"Target","value":"#/Names/AirlineName"},{"name":"Value","value":"AirlineName"}]}},"CustomerNameField":{"name":"CustomerNameField","properties":{},"schema":{"keys":[{"name":"Target","value":"#/Names/CustomerName"},{"name":"Value","value":"CustomerName"}]}},"DataFieldForAnnotation::carrier::Contact":{"name":"DataFieldForAnnotation::carrier::Contact","properties":{},"schema":{"keys":[{"name":"Target","value":"carrier/@Communication.Contact"}]}}}}},"properties":{}}},"fields":[]},"RevenueChart":{"name":"RevenueChart","title":"Supplement Price","properties":{"stashed":{"freeText":false}},"schema":{"dataType":"ChartDefinition","keys":[{"name":"Target","value":"com.sap.vocabularies.UI.v1.Chart#SupplementPrice"},{"name":"ID","value":"Chart::SupplementPrice"},{"name":"Value","value":"Revenue"}]},"aggregations":{}}}},"actions":{"path":[],"aggregations":{"DataFieldForAction::com.sap.gateway.srvd.dmo.sd_travel_mdsk.v0001.Activate::com.sap.gateway.srvd.dmo.sd_travel_mdsk.v0001.BookingType":{"description":"Activate","path":[],"aggregations":{}}}}}},"sections":{"aggregations":{"BookingDetailsSection":{"schema":{"keys":[{"name":"ID","value":"BookingDetails"}]},"aggregations":{"subSections":{"aggregations":{"BookingDataSubSection":{"schema":{"keys":[{"name":"ID","value":"BookingData"}]},"aggregations":{"form":{"aggregations":{"fields":{"aggregations":{"BookingIdField":{"schema":{"keys":[{"name":"Value","value":"BookingId"}]}},"FlightDateField":{"schema":{"keys":[{"name":"Value","value":"FlightDate"}]}},"DataFieldForAnnotation::_Customer::Contact":{"name":"DataFieldForAnnotation::_Customer::Contact","schema":{"keys":[{"name":"Target","value":"_Customer/@Communication.Contact"}]}}}}}}}},"_Supplements::@UI.LineItem":{"schema":{"keys":[{"name":"ID","value":"AdministrativeData"}]},"aggregations":{"table":{"aggregations":{"columns":{"aggregations":{"ConnectionIdCol":{"schema":{"keys":[{"name":"Value","value":"ConnectionId"}]},"description":"Connection"},"AirportCodeCol":{"schema":{"keys":[{"name":"Value","value":"AirportCode"}]},"description":"Airport"},"DataFieldForAnnotation::_Carrier::Contact":{"schema":{"keys":[{"name":"Target","value":"_Carrier/@Communication.Contact"}]},"description":"Carrier"}}}}}},"isTable":true}}}}},"FlightDataSection":{"schema":{"keys":[{"name":"ID","value":"FlightData"}]},"aggregations":{"form":{"aggregations":{"actions":{"aggregations":{"DataFieldForAction::com.sap.gateway.srvd.dmo.sd_travel_mdsk.v0001.deductDiscount::com.sap.gateway.srvd.dmo.sd_travel_mdsk.v0001.BookingType":{"description":"Deduct Discount","path":[],"aggregations":{}}}}}}}},"_BookSupplement::@com.sap.vocabularies.UI.v1.LineItem":{"schema":{"keys":[{"name":"ID","value":"PriceData"}]},"aggregations":{"table":{"aggregations":{"toolBar":{"aggregations":{"actions":{"aggregations":{"DataFieldForAction::com.sap.gateway.srvd.dmo.sd_travel_mdsk.v0001.createActiveTemplate::com.sap.gateway.srvd.dmo.sd_travel_mdsk.v0001.BookingType":{"description":"Create Template","path":[],"aggregations":{}}}}}}}}},"isTable":true}}}}}},"entitySet":"Booking","contextPath":"/Travel/_Booking","pageType":"ObjectPage"}}}}'; diff --git a/packages/ui5-test-writer/test/unit/__snapshots__/fiori-elements.test.ts.snap b/packages/ui5-test-writer/test/unit/__snapshots__/fiori-elements.test.ts.snap index cb406d8d866..70a4271bd15 100644 --- a/packages/ui5-test-writer/test/unit/__snapshots__/fiori-elements.test.ts.snap +++ b/packages/ui5-test-writer/test/unit/__snapshots__/fiori-elements.test.ts.snap @@ -354,18 +354,11 @@ sap.ui.define(['sap/fe/test/ListReport'], function(ListReport) { * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { +sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { 'use strict'; var CustomPageDefinitions = { - actions: { - iPressSectionIconTabFilterButton: function (section) { - return this.waitFor({ - id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), - actions: new Press() - }); - } - }, + actions: {}, assertions: {} }; @@ -787,18 +780,11 @@ sap.ui.define(['sap/fe/test/ListReport'], function(ListReport) { * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { +sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { 'use strict'; var CustomPageDefinitions = { - actions: { - iPressSectionIconTabFilterButton: function (section) { - return this.waitFor({ - id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), - actions: new Press() - }); - } - }, + actions: {}, assertions: {} }; @@ -1197,18 +1183,11 @@ sap.ui.define(['sap/fe/test/ListReport'], function(ListReport) { * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { +sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { 'use strict'; var CustomPageDefinitions = { - actions: { - iPressSectionIconTabFilterButton: function (section) { - return this.waitFor({ - id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), - actions: new Press() - }); - } - }, + actions: {}, assertions: {} }; @@ -1607,18 +1586,11 @@ sap.ui.define(['sap/fe/test/ListReport'], function(ListReport) { * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { +sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { 'use strict'; var CustomPageDefinitions = { - actions: { - iPressSectionIconTabFilterButton: function (section) { - return this.waitFor({ - id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), - actions: new Press() - }); - } - }, + actions: {}, assertions: {} }; @@ -2283,18 +2255,11 @@ sap.ui.require( * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { +sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { 'use strict'; var CustomPageDefinitions = { - actions: { - iPressSectionIconTabFilterButton: function (section) { - return this.waitFor({ - id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), - actions: new Press() - }); - } - }, + actions: {}, assertions: {} }; @@ -2624,18 +2589,11 @@ sap.ui.require( * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { +sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { 'use strict'; var CustomPageDefinitions = { - actions: { - iPressSectionIconTabFilterButton: function (section) { - return this.waitFor({ - id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), - actions: new Press() - }); - } - }, + actions: {}, assertions: {} }; @@ -3075,18 +3033,11 @@ sap.ui.define(['sap/fe/test/ListReport'], function(ListReport) { * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { +sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { 'use strict'; var CustomPageDefinitions = { - actions: { - iPressSectionIconTabFilterButton: function (section) { - return this.waitFor({ - id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), - actions: new Press() - }); - } - }, + actions: {}, assertions: {} }; @@ -3146,18 +3097,11 @@ sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function( * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { +sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { 'use strict'; var CustomPageDefinitions = { - actions: { - iPressSectionIconTabFilterButton: function (section) { - return this.waitFor({ - id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), - actions: new Press() - }); - } - }, + actions: {}, assertions: {} }; @@ -3190,18 +3134,11 @@ sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function( * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { +sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { 'use strict'; var CustomPageDefinitions = { - actions: { - iPressSectionIconTabFilterButton: function (section) { - return this.waitFor({ - id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), - actions: new Press() - }); - } - }, + actions: {}, assertions: {} }; @@ -3620,18 +3557,11 @@ sap.ui.define(['sap/fe/test/ListReport'], function(ListReport) { * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { +sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { 'use strict'; var CustomPageDefinitions = { - actions: { - iPressSectionIconTabFilterButton: function (section) { - return this.waitFor({ - id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), - actions: new Press() - }); - } - }, + actions: {}, assertions: {} }; @@ -3691,18 +3621,11 @@ sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function( * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { +sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { 'use strict'; var CustomPageDefinitions = { - actions: { - iPressSectionIconTabFilterButton: function (section) { - return this.waitFor({ - id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), - actions: new Press() - }); - } - }, + actions: {}, assertions: {} }; @@ -3735,18 +3658,11 @@ sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function( * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { +sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { 'use strict'; var CustomPageDefinitions = { - actions: { - iPressSectionIconTabFilterButton: function (section) { - return this.waitFor({ - id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), - actions: new Press() - }); - } - }, + actions: {}, assertions: {} }; @@ -4177,18 +4093,11 @@ sap.ui.define(['sap/fe/test/ListReport'], function(ListReport) { * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { +sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { 'use strict'; var CustomPageDefinitions = { - actions: { - iPressSectionIconTabFilterButton: function (section) { - return this.waitFor({ - id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), - actions: new Press() - }); - } - }, + actions: {}, assertions: {} }; @@ -6037,18 +5946,11 @@ sap.ui.define(['sap/fe/test/ListReport'], function(ListReport) { * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { +sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { 'use strict'; var CustomPageDefinitions = { - actions: { - iPressSectionIconTabFilterButton: function (section) { - return this.waitFor({ - id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), - actions: new Press() - }); - } - }, + actions: {}, assertions: {} }; @@ -7738,18 +7640,11 @@ sap.ui.define(['sap/fe/test/ListReport'], function(ListReport) { * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { +sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { 'use strict'; var CustomPageDefinitions = { - actions: { - iPressSectionIconTabFilterButton: function (section) { - return this.waitFor({ - id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), - actions: new Press() - }); - } - }, + actions: {}, assertions: {} }; @@ -9566,18 +9461,11 @@ sap.ui.define(['sap/fe/test/ListReport'], function(ListReport) { * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { +sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { 'use strict'; var CustomPageDefinitions = { - actions: { - iPressSectionIconTabFilterButton: function (section) { - return this.waitFor({ - id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), - actions: new Press() - }); - } - }, + actions: {}, assertions: {} }; @@ -11400,18 +11288,11 @@ sap.ui.define(['sap/fe/test/ListReport'], function(ListReport) { * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { +sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { 'use strict'; var CustomPageDefinitions = { - actions: { - iPressSectionIconTabFilterButton: function (section) { - return this.waitFor({ - id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), - actions: new Press() - }); - } - }, + actions: {}, assertions: {} }; @@ -11719,18 +11600,11 @@ sap.ui.require( * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { +sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { 'use strict'; var CustomPageDefinitions = { - actions: { - iPressSectionIconTabFilterButton: function (section) { - return this.waitFor({ - id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), - actions: new Press() - }); - } - }, + actions: {}, assertions: {} }; @@ -12093,24 +11967,7 @@ sap.ui.require( "state": "modified", }, "webapp/test/integration/pages/EmployeesList.gen.ts": Object { - "contents": "/****************************************************************************** - * ╔═══════════════════════════════════════════════════════════════════════╗ * - * ║ ║ * - * ║ WARNING: AUTO-GENERATED FILE ║ * - * ║ ║ * - * ║ This file is automatically generated by SAP Fiori tools and is ║ * - * ║ overwritten when you run the OPA test generator again. ║ * - * ║ ║ * - * ║ To add your own custom pages: ║ * - * ║ - Create a new page file in this directory. ║ * - * ║ - Follow the same pattern as this file. ║ * - * ║ - Add the new file to the JourneyRunner. ║ * - * ║ - Custom page files are not overwritten. ║ * - * ║ ║ * - * ╚═══════════════════════════════════════════════════════════════════════╝ * - ******************************************************************************/ - -export const actions = {}; + "contents": "export const actions = {}; export const assertions = {}; @@ -12122,34 +11979,7 @@ export default class ListReport { "state": "modified", }, "webapp/test/integration/pages/EmployeesObjectPage.gen.ts": Object { - "contents": "/****************************************************************************** - * ╔═══════════════════════════════════════════════════════════════════════╗ * - * ║ ║ * - * ║ WARNING: AUTO-GENERATED FILE ║ * - * ║ ║ * - * ║ This file is automatically generated by SAP Fiori tools and is ║ * - * ║ overwritten when you run the OPA test generator again. ║ * - * ║ ║ * - * ║ To add your own custom pages: ║ * - * ║ - Create a new page file in this directory. ║ * - * ║ - Follow the same pattern as this file. ║ * - * ║ - Add the new file to the JourneyRunner. ║ * - * ║ - Custom page files are not overwritten. ║ * - * ║ ║ * - * ╚═══════════════════════════════════════════════════════════════════════╝ * - ******************************************************************************/ - -import type Opa5 from \\"sap/ui/test/Opa5\\"; -import Press from \\"sap/ui/test/actions/Press\\"; - -export const actions = { - iPressSectionIconTabFilterButton(this: Opa5, section: string) { - return this.waitFor({ - id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), - actions: new Press() - }); - } -}; + "contents": "export const actions = {}; export const assertions = {}; @@ -12195,20 +12025,7 @@ export default runner; "state": "modified", }, "webapp/test/integration/types/OpaJourneyTypes.d.ts": Object { - "contents": "/****************************************************************************** - * ╔═══════════════════════════════════════════════════════════════════════╗ * - * ║ ║ * - * ║ WARNING: AUTO-GENERATED FILE ║ * - * ║ ║ * - * ║ This file is automatically generated by SAP Fiori tools and is ║ * - * ║ overwritten when you run the OPA test generator again. ║ * - * ║ ║ * - * ║ Do not edit this file directly. Any changes will be lost. ║ * - * ║ ║ * - * ╚═══════════════════════════════════════════════════════════════════════╝ * - ******************************************************************************/ - -import type Opa5 from \\"sap/ui/test/Opa5\\"; + "contents": "import type Opa5 from \\"sap/ui/test/Opa5\\"; import type { actions as ListReportActions, assertions as ListReportAssertions } from \\"sap/fe/test/ListReport\\"; import type { actions as ObjectPageActions, assertions as ObjectPageAssertions } from \\"sap/fe/test/ObjectPage\\"; import type { actions as TemplatePageActions, assertions as TemplatePageAssertions } from \\"sap/fe/test/TemplatePage\\"; @@ -12542,24 +12359,7 @@ sap.ui.require( "state": "modified", }, "webapp/test/integration/pages/EmployeesList.gen.ts": Object { - "contents": "/****************************************************************************** - * ╔═══════════════════════════════════════════════════════════════════════╗ * - * ║ ║ * - * ║ WARNING: AUTO-GENERATED FILE ║ * - * ║ ║ * - * ║ This file is automatically generated by SAP Fiori tools and is ║ * - * ║ overwritten when you run the OPA test generator again. ║ * - * ║ ║ * - * ║ To add your own custom pages: ║ * - * ║ - Create a new page file in this directory. ║ * - * ║ - Follow the same pattern as this file. ║ * - * ║ - Add the new file to the JourneyRunner. ║ * - * ║ - Custom page files are not overwritten. ║ * - * ║ ║ * - * ╚═══════════════════════════════════════════════════════════════════════╝ * - ******************************************************************************/ - -export const actions = {}; + "contents": "export const actions = {}; export const assertions = {}; @@ -12571,34 +12371,7 @@ export default class ListReport { "state": "modified", }, "webapp/test/integration/pages/EmployeesObjectPage.gen.ts": Object { - "contents": "/****************************************************************************** - * ╔═══════════════════════════════════════════════════════════════════════╗ * - * ║ ║ * - * ║ WARNING: AUTO-GENERATED FILE ║ * - * ║ ║ * - * ║ This file is automatically generated by SAP Fiori tools and is ║ * - * ║ overwritten when you run the OPA test generator again. ║ * - * ║ ║ * - * ║ To add your own custom pages: ║ * - * ║ - Create a new page file in this directory. ║ * - * ║ - Follow the same pattern as this file. ║ * - * ║ - Add the new file to the JourneyRunner. ║ * - * ║ - Custom page files are not overwritten. ║ * - * ║ ║ * - * ╚═══════════════════════════════════════════════════════════════════════╝ * - ******************************************************************************/ - -import type Opa5 from \\"sap/ui/test/Opa5\\"; -import Press from \\"sap/ui/test/actions/Press\\"; - -export const actions = { - iPressSectionIconTabFilterButton(this: Opa5, section: string) { - return this.waitFor({ - id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), - actions: new Press() - }); - } -}; + "contents": "export const actions = {}; export const assertions = {}; @@ -12644,20 +12417,7 @@ export default runner; "state": "modified", }, "webapp/test/integration/types/OpaJourneyTypes.d.ts": Object { - "contents": "/****************************************************************************** - * ╔═══════════════════════════════════════════════════════════════════════╗ * - * ║ ║ * - * ║ WARNING: AUTO-GENERATED FILE ║ * - * ║ ║ * - * ║ This file is automatically generated by SAP Fiori tools and is ║ * - * ║ overwritten when you run the OPA test generator again. ║ * - * ║ ║ * - * ║ Do not edit this file directly. Any changes will be lost. ║ * - * ║ ║ * - * ╚═══════════════════════════════════════════════════════════════════════╝ * - ******************************************************************************/ - -import type Opa5 from \\"sap/ui/test/Opa5\\"; + "contents": "import type Opa5 from \\"sap/ui/test/Opa5\\"; import type { actions as ListReportActions, assertions as ListReportAssertions } from \\"sap/fe/test/ListReport\\"; import type { actions as ObjectPageActions, assertions as ObjectPageAssertions } from \\"sap/fe/test/ObjectPage\\"; import type { actions as TemplatePageActions, assertions as TemplatePageAssertions } from \\"sap/fe/test/TemplatePage\\"; @@ -12991,24 +12751,7 @@ sap.ui.require( "state": "modified", }, "webapp/test/integration/pages/EmployeesList.gen.ts": Object { - "contents": "/****************************************************************************** - * ╔═══════════════════════════════════════════════════════════════════════╗ * - * ║ ║ * - * ║ WARNING: AUTO-GENERATED FILE ║ * - * ║ ║ * - * ║ This file is automatically generated by SAP Fiori tools and is ║ * - * ║ overwritten when you run the OPA test generator again. ║ * - * ║ ║ * - * ║ To add your own custom pages: ║ * - * ║ - Create a new page file in this directory. ║ * - * ║ - Follow the same pattern as this file. ║ * - * ║ - Add the new file to the JourneyRunner. ║ * - * ║ - Custom page files are not overwritten. ║ * - * ║ ║ * - * ╚═══════════════════════════════════════════════════════════════════════╝ * - ******************************************************************************/ - -export const actions = {}; + "contents": "export const actions = {}; export const assertions = {}; @@ -13020,34 +12763,7 @@ export default class ListReport { "state": "modified", }, "webapp/test/integration/pages/EmployeesObjectPage.gen.ts": Object { - "contents": "/****************************************************************************** - * ╔═══════════════════════════════════════════════════════════════════════╗ * - * ║ ║ * - * ║ WARNING: AUTO-GENERATED FILE ║ * - * ║ ║ * - * ║ This file is automatically generated by SAP Fiori tools and is ║ * - * ║ overwritten when you run the OPA test generator again. ║ * - * ║ ║ * - * ║ To add your own custom pages: ║ * - * ║ - Create a new page file in this directory. ║ * - * ║ - Follow the same pattern as this file. ║ * - * ║ - Add the new file to the JourneyRunner. ║ * - * ║ - Custom page files are not overwritten. ║ * - * ║ ║ * - * ╚═══════════════════════════════════════════════════════════════════════╝ * - ******************************************************************************/ - -import type Opa5 from \\"sap/ui/test/Opa5\\"; -import Press from \\"sap/ui/test/actions/Press\\"; - -export const actions = { - iPressSectionIconTabFilterButton(this: Opa5, section: string) { - return this.waitFor({ - id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), - actions: new Press() - }); - } -}; + "contents": "export const actions = {}; export const assertions = {}; @@ -13093,20 +12809,7 @@ export default runner; "state": "modified", }, "webapp/test/integration/types/OpaJourneyTypes.d.ts": Object { - "contents": "/****************************************************************************** - * ╔═══════════════════════════════════════════════════════════════════════╗ * - * ║ ║ * - * ║ WARNING: AUTO-GENERATED FILE ║ * - * ║ ║ * - * ║ This file is automatically generated by SAP Fiori tools and is ║ * - * ║ overwritten when you run the OPA test generator again. ║ * - * ║ ║ * - * ║ Do not edit this file directly. Any changes will be lost. ║ * - * ║ ║ * - * ╚═══════════════════════════════════════════════════════════════════════╝ * - ******************************************************************************/ - -import type Opa5 from \\"sap/ui/test/Opa5\\"; + "contents": "import type Opa5 from \\"sap/ui/test/Opa5\\"; import type { actions as ListReportActions, assertions as ListReportAssertions } from \\"sap/fe/test/ListReport\\"; import type { actions as ObjectPageActions, assertions as ObjectPageAssertions } from \\"sap/fe/test/ObjectPage\\"; import type { actions as TemplatePageActions, assertions as TemplatePageAssertions } from \\"sap/fe/test/TemplatePage\\"; @@ -13414,24 +13117,7 @@ sap.ui.require( "state": "modified", }, "webapp/test/integration/pages/EmployeesList.gen.ts": Object { - "contents": "/****************************************************************************** - * ╔═══════════════════════════════════════════════════════════════════════╗ * - * ║ ║ * - * ║ WARNING: AUTO-GENERATED FILE ║ * - * ║ ║ * - * ║ This file is automatically generated by SAP Fiori tools and is ║ * - * ║ overwritten when you run the OPA test generator again. ║ * - * ║ ║ * - * ║ To add your own custom pages: ║ * - * ║ - Create a new page file in this directory. ║ * - * ║ - Follow the same pattern as this file. ║ * - * ║ - Add the new file to the JourneyRunner. ║ * - * ║ - Custom page files are not overwritten. ║ * - * ║ ║ * - * ╚═══════════════════════════════════════════════════════════════════════╝ * - ******************************************************************************/ - -export const actions = {}; + "contents": "export const actions = {}; export const assertions = {}; @@ -13467,20 +13153,7 @@ export default runner; "state": "modified", }, "webapp/test/integration/types/OpaJourneyTypes.d.ts": Object { - "contents": "/****************************************************************************** - * ╔═══════════════════════════════════════════════════════════════════════╗ * - * ║ ║ * - * ║ WARNING: AUTO-GENERATED FILE ║ * - * ║ ║ * - * ║ This file is automatically generated by SAP Fiori tools and is ║ * - * ║ overwritten when you run the OPA test generator again. ║ * - * ║ ║ * - * ║ Do not edit this file directly. Any changes will be lost. ║ * - * ║ ║ * - * ╚═══════════════════════════════════════════════════════════════════════╝ * - ******************************************************************************/ - -import type Opa5 from \\"sap/ui/test/Opa5\\"; + "contents": "import type Opa5 from \\"sap/ui/test/Opa5\\"; import type { actions as ListReportActions, assertions as ListReportAssertions } from \\"sap/fe/test/ListReport\\"; import type { actions as TemplatePageActions, assertions as TemplatePageAssertions } from \\"sap/fe/test/TemplatePage\\"; import type Shell from \\"sap/fe/test/Shell\\"; @@ -13853,24 +13526,7 @@ sap.ui.require( "state": "modified", }, "webapp/test/integration/pages/EmployeesList.gen.ts": Object { - "contents": "/****************************************************************************** - * ╔═══════════════════════════════════════════════════════════════════════╗ * - * ║ ║ * - * ║ WARNING: AUTO-GENERATED FILE ║ * - * ║ ║ * - * ║ This file is automatically generated by SAP Fiori tools and is ║ * - * ║ overwritten when you run the OPA test generator again. ║ * - * ║ ║ * - * ║ To add your own custom pages: ║ * - * ║ - Create a new page file in this directory. ║ * - * ║ - Follow the same pattern as this file. ║ * - * ║ - Add the new file to the JourneyRunner. ║ * - * ║ - Custom page files are not overwritten. ║ * - * ║ ║ * - * ╚═══════════════════════════════════════════════════════════════════════╝ * - ******************************************************************************/ - -export const actions = {}; + "contents": "export const actions = {}; export const assertions = {}; @@ -13882,34 +13538,7 @@ export default class ListReport { "state": "modified", }, "webapp/test/integration/pages/EmployeesObjectPage.gen.ts": Object { - "contents": "/****************************************************************************** - * ╔═══════════════════════════════════════════════════════════════════════╗ * - * ║ ║ * - * ║ WARNING: AUTO-GENERATED FILE ║ * - * ║ ║ * - * ║ This file is automatically generated by SAP Fiori tools and is ║ * - * ║ overwritten when you run the OPA test generator again. ║ * - * ║ ║ * - * ║ To add your own custom pages: ║ * - * ║ - Create a new page file in this directory. ║ * - * ║ - Follow the same pattern as this file. ║ * - * ║ - Add the new file to the JourneyRunner. ║ * - * ║ - Custom page files are not overwritten. ║ * - * ║ ║ * - * ╚═══════════════════════════════════════════════════════════════════════╝ * - ******************************************************************************/ - -import type Opa5 from \\"sap/ui/test/Opa5\\"; -import Press from \\"sap/ui/test/actions/Press\\"; - -export const actions = { - iPressSectionIconTabFilterButton(this: Opa5, section: string) { - return this.waitFor({ - id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), - actions: new Press() - }); - } -}; + "contents": "export const actions = {}; export const assertions = {}; @@ -13973,34 +13602,7 @@ export default runner; "state": "modified", }, "webapp/test/integration/pages/PositionsObjectPage.gen.ts": Object { - "contents": "/****************************************************************************** - * ╔═══════════════════════════════════════════════════════════════════════╗ * - * ║ ║ * - * ║ WARNING: AUTO-GENERATED FILE ║ * - * ║ ║ * - * ║ This file is automatically generated by SAP Fiori tools and is ║ * - * ║ overwritten when you run the OPA test generator again. ║ * - * ║ ║ * - * ║ To add your own custom pages: ║ * - * ║ - Create a new page file in this directory. ║ * - * ║ - Follow the same pattern as this file. ║ * - * ║ - Add the new file to the JourneyRunner. ║ * - * ║ - Custom page files are not overwritten. ║ * - * ║ ║ * - * ╚═══════════════════════════════════════════════════════════════════════╝ * - ******************************************************************************/ - -import type Opa5 from \\"sap/ui/test/Opa5\\"; -import Press from \\"sap/ui/test/actions/Press\\"; - -export const actions = { - iPressSectionIconTabFilterButton(this: Opa5, section: string) { - return this.waitFor({ - id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), - actions: new Press() - }); - } -}; + "contents": "export const actions = {}; export const assertions = {}; @@ -14012,34 +13614,7 @@ export default class ObjectPage { "state": "modified", }, "webapp/test/integration/pages/TrainingsObjectPage.gen.ts": Object { - "contents": "/****************************************************************************** - * ╔═══════════════════════════════════════════════════════════════════════╗ * - * ║ ║ * - * ║ WARNING: AUTO-GENERATED FILE ║ * - * ║ ║ * - * ║ This file is automatically generated by SAP Fiori tools and is ║ * - * ║ overwritten when you run the OPA test generator again. ║ * - * ║ ║ * - * ║ To add your own custom pages: ║ * - * ║ - Create a new page file in this directory. ║ * - * ║ - Follow the same pattern as this file. ║ * - * ║ - Add the new file to the JourneyRunner. ║ * - * ║ - Custom page files are not overwritten. ║ * - * ║ ║ * - * ╚═══════════════════════════════════════════════════════════════════════╝ * - ******************************************************************************/ - -import type Opa5 from \\"sap/ui/test/Opa5\\"; -import Press from \\"sap/ui/test/actions/Press\\"; - -export const actions = { - iPressSectionIconTabFilterButton(this: Opa5, section: string) { - return this.waitFor({ - id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), - actions: new Press() - }); - } -}; + "contents": "export const actions = {}; export const assertions = {}; @@ -14051,20 +13626,7 @@ export default class ObjectPage { "state": "modified", }, "webapp/test/integration/types/OpaJourneyTypes.d.ts": Object { - "contents": "/****************************************************************************** - * ╔═══════════════════════════════════════════════════════════════════════╗ * - * ║ ║ * - * ║ WARNING: AUTO-GENERATED FILE ║ * - * ║ ║ * - * ║ This file is automatically generated by SAP Fiori tools and is ║ * - * ║ overwritten when you run the OPA test generator again. ║ * - * ║ ║ * - * ║ Do not edit this file directly. Any changes will be lost. ║ * - * ║ ║ * - * ╚═══════════════════════════════════════════════════════════════════════╝ * - ******************************************************************************/ - -import type Opa5 from \\"sap/ui/test/Opa5\\"; + "contents": "import type Opa5 from \\"sap/ui/test/Opa5\\"; import type { actions as ListReportActions, assertions as ListReportAssertions } from \\"sap/fe/test/ListReport\\"; import type { actions as ObjectPageActions, assertions as ObjectPageAssertions } from \\"sap/fe/test/ObjectPage\\"; import type { actions as TemplatePageActions, assertions as TemplatePageAssertions } from \\"sap/fe/test/TemplatePage\\"; @@ -15788,6 +15350,8 @@ sap.ui.define([ + + opaTest(\\"Navigate to ObjectPage\\", function (Given, When, Then) { // Note: this test will fail if the ListReport page doesn't show any data @@ -15952,18 +15516,11 @@ sap.ui.define(['sap/fe/test/ListReport'], function(ListReport) { * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { +sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { 'use strict'; var CustomPageDefinitions = { - actions: { - iPressSectionIconTabFilterButton: function (section) { - return this.waitFor({ - id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), - actions: new Press() - }); - } - }, + actions: {}, assertions: {} }; @@ -17656,6 +17213,8 @@ sap.ui.define([ + + opaTest(\\"Navigate to ObjectPage\\", function (Given, When, Then) { // Note: this test will fail if the ListReport page doesn't show any data @@ -17820,18 +17379,11 @@ sap.ui.define(['sap/fe/test/ListReport'], function(ListReport) { * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { +sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { 'use strict'; var CustomPageDefinitions = { - actions: { - iPressSectionIconTabFilterButton: function (section) { - return this.waitFor({ - id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), - actions: new Press() - }); - } - }, + actions: {}, assertions: {} }; @@ -19520,6 +19072,8 @@ sap.ui.define([ + + opaTest(\\"Navigate to ObjectPage\\", function (Given, When, Then) { // Note: this test will fail if the ListReport page doesn't show any data @@ -19682,18 +19236,11 @@ sap.ui.define(['sap/fe/test/ListReport'], function(ListReport) { * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { +sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { 'use strict'; var CustomPageDefinitions = { - actions: { - iPressSectionIconTabFilterButton: function (section) { - return this.waitFor({ - id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), - actions: new Press() - }); - } - }, + actions: {}, assertions: {} }; @@ -21810,18 +21357,11 @@ sap.ui.define(['sap/fe/test/ListReport'], function(ListReport) { * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { +sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { 'use strict'; var CustomPageDefinitions = { - actions: { - iPressSectionIconTabFilterButton: function (section) { - return this.waitFor({ - id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), - actions: new Press() - }); - } - }, + actions: {}, assertions: {} }; diff --git a/packages/ui5-test-writer/test/unit/fiori-elements.test.ts b/packages/ui5-test-writer/test/unit/fiori-elements.test.ts index 86945baf511..fa212a0d49d 100644 --- a/packages/ui5-test-writer/test/unit/fiori-elements.test.ts +++ b/packages/ui5-test-writer/test/unit/fiori-elements.test.ts @@ -753,19 +753,27 @@ export type Then = Opa5 & BaseArrangements & { expect(bookingObjPageJourneyContent).toContain('field: "CustomerName"'); expect(bookingObjPageJourneyContent).toContain('field: "carrier"'); expect(bookingObjPageJourneyContent).toContain('targetAnnotation: "Contact"'); + expect(bookingObjPageJourneyContent).toContain('onHeader().iClickLink({ property: "carrier/Contact" })'); + expect(bookingObjPageJourneyContent).toContain( + 'onDialog().iCheckContactDialog({ controlType: "sap.ui.mdc.link.Panel" })' + ); expect(bookingObjPageJourneyContent).toContain('iCheckMicroChart("Supplement Price")'); expect(bookingObjPageJourneyContent).toContain('onHeader().iCheckAction("Activate", { enabled: false })'); expect(bookingObjPageJourneyContent).toContain('iCheckNumberOfSections(3)'); - expect(bookingObjPageJourneyContent).toContain('iPressSectionIconTabFilterButton("BookingDetails")'); + expect(bookingObjPageJourneyContent).not.toContain('iPressSectionIconTabFilterButton'); + expect(bookingObjPageJourneyContent).toContain('iGoToSection({ section: "BookingDetails" })'); expect(bookingObjPageJourneyContent).toContain('iCheckSection({ section: "BookingDetails" })'); + expect(bookingObjPageJourneyContent).toContain( + 'iGoToSection({ section: "BookingDetails", subSection: "BookingData" })' + ); expect(bookingObjPageJourneyContent).toContain('iCheckSubSection({ section: "BookingData" })'); expect(bookingObjPageJourneyContent).toContain('iCheckSubSection({ section: "AdministrativeData" })'); - expect(bookingObjPageJourneyContent).toContain('iPressSectionIconTabFilterButton("FlightData")'); + expect(bookingObjPageJourneyContent).toContain('iGoToSection({ section: "FlightData" })'); expect(bookingObjPageJourneyContent).toContain('iCheckSection({ section: "FlightData" })'); expect(bookingObjPageJourneyContent).toContain( '.iCheckAction("Deduct Discount" /* , { enabled: true } */)' ); - expect(bookingObjPageJourneyContent).toContain('iPressSectionIconTabFilterButton("PriceData")'); + expect(bookingObjPageJourneyContent).toContain('iGoToSection({ section: "PriceData" })'); expect(bookingObjPageJourneyContent).toContain('iCheckSection({ section: "PriceData" })'); expect(bookingObjPageJourneyContent).toContain( 'onTable({ property: "_BookSupplement" }).iCheckAction("Create Template", { enabled: true })' @@ -776,9 +784,31 @@ export type Then = Opa5 & BaseArrangements & { expect(bookingObjPageJourneyContent).toContain( 'onForm({ section: "BookingData" }).iCheckField({ property: "FlightDate" })' ); + // OP-7: body-section form Contact Card + expect(bookingObjPageJourneyContent).toContain( + 'onForm({ section: "BookingData" }).iClickLink({ property: "_Customer/Contact" })' + ); expect(bookingObjPageJourneyContent).toContain('onTable({ property: "_Supplements" }).iCheckColumns('); expect(bookingObjPageJourneyContent).toContain('"ConnectionId":{"header":"Connection"}'); expect(bookingObjPageJourneyContent).toContain('"AirportCode":{"header":"Airport"}'); + // Contact-card column included in iCheckColumns map keyed by aggregation key (matches MDC propertyKey) + expect(bookingObjPageJourneyContent).toContain( + '"DataFieldForAnnotation::_Carrier::Contact":{"header":"Carrier"}' + ); + // OP table Contact Card + expect(bookingObjPageJourneyContent).toContain( + 'onTable({ property: "_Supplements" }).iClickLink(0, "DataFieldForAnnotation::_Carrier::Contact")' + ); + + // LR-10: list-report table Contact Card + const travelListJourneyContent = + fs.dump()['test/test-output/LROPv4/webapp/test/integration/TravelListJourney.gen.js'].contents; + expect(travelListJourneyContent).toContain( + 'onTable().iClickLink(0, "DataFieldForAnnotation::_Agency::Contact")' + ); + expect(travelListJourneyContent).toContain( + 'onDialog().iCheckContactDialog({ controlType: "sap.ui.mdc.link.Panel" })' + ); }); }); @@ -913,13 +943,11 @@ export type Then = Opa5 & BaseArrangements & { expect(opPagePath).toBeDefined(); const opContent = dumped[opPagePath!].contents as string; - expect(opContent).toContain('import type Opa5 from "sap/ui/test/Opa5"'); - expect(opContent).toContain('import Press from "sap/ui/test/actions/Press"'); expect(opContent).toContain('export const actions'); expect(opContent).toContain('export const assertions'); expect(opContent).toContain('export default class ObjectPage'); - expect(opContent).toContain('iPressSectionIconTabFilterButton'); - expect(opContent).toContain('this: Opa5'); + expect(opContent).not.toContain('iPressSectionIconTabFilterButton'); + expect(opContent).not.toContain('sap/ui/test/actions/Press'); expect(opContent).not.toContain('sap/fe/test/ObjectPage'); }); @@ -1136,15 +1164,23 @@ export type Then = Opa5 & BaseArrangements & { // ─── Section navigation ─── expect(content).toContain('iCheckNumberOfSections(3)'); - expect(content).toContain('iPressSectionIconTabFilterButton("BookingDetails")'); + expect(content).not.toContain('iPressSectionIconTabFilterButton'); + expect(content).toContain('iGoToSection({ section: "BookingDetails" })'); expect(content).toContain('iCheckSection({ section: "BookingDetails" }, {})'); + expect(content).toContain('iGoToSection({ section: "BookingDetails", subSection: "BookingData" })'); expect(content).toContain('iCheckSubSection({ section: "BookingData" })'); expect(content).toContain('iCheckSubSection({ section: "AdministrativeData" })'); - expect(content).toContain('iPressSectionIconTabFilterButton("FlightData")'); + expect(content).toContain('iGoToSection({ section: "FlightData" })'); expect(content).toContain('iCheckSection({ section: "FlightData" }, {})'); - expect(content).toContain('iPressSectionIconTabFilterButton("PriceData")'); + expect(content).toContain('iGoToSection({ section: "PriceData" })'); expect(content).toContain('iCheckSection({ section: "PriceData" }, {})'); + // ─── Header Contact Card (OP-8) ─── + expect(content).toContain( + 'onHeader().iClickLink({ property: "carrier/Contact" } as unknown as FieldIdentifier)' + ); + expect(content).toContain('onDialog().iCheckContactDialog({ controlType: "sap.ui.mdc.link.Panel" })'); + // ─── Section actions (table action with dynamic enabled) ─── expect(content).toContain('.iCheckAction("Deduct Discount" /* , { enabled: true } */)'); expect(content).toContain( @@ -1158,11 +1194,28 @@ export type Then = Opa5 & BaseArrangements & { expect(content).toContain( 'onForm({ section: "BookingData" } as unknown as FormIdentifier).iCheckField({ property: "FlightDate" })' ); + // OP-7: body-section form Contact Card + expect(content).toContain( + 'onForm({ section: "BookingData" } as unknown as FormIdentifier).iClickLink({ property: "_Customer/Contact" })' + ); // ─── Sub-section table columns ─── expect(content).toContain('onTable({ property: "_Supplements" }).iCheckColumns('); expect(content).toContain('"ConnectionId":{"header":"Connection"}'); expect(content).toContain('"AirportCode":{"header":"Airport"}'); + // Contact-card column included in iCheckColumns map keyed by aggregation key (matches MDC propertyKey) + expect(content).toContain('"DataFieldForAnnotation::_Carrier::Contact":{"header":"Carrier"}'); + // OP table Contact Card + expect(content).toContain( + 'onTable({ property: "_Supplements" }).iClickLink(0, "DataFieldForAnnotation::_Carrier::Contact")' + ); + + // ─── LR-10: list-report table Contact Card ─── + const lrJourneyPath = Object.keys(dumped).find((p) => p.includes('TravelListJourney.gen.ts')); + expect(lrJourneyPath).toBeDefined(); + const lrContent = dumped[lrJourneyPath!].contents as string; + expect(lrContent).toContain('onTable("").iClickLink(0, "DataFieldForAnnotation::_Agency::Contact")'); + expect(lrContent).toContain('onDialog().iCheckContactDialog({ controlType: "sap.ui.mdc.link.Panel" })'); // ─── No JS leakage ─── expect(content).not.toContain('sap.ui.define'); diff --git a/packages/ui5-test-writer/test/unit/utils/listReportUtils.test.ts b/packages/ui5-test-writer/test/unit/utils/listReportUtils.test.ts index 19c69bea607..e781e1f6f92 100644 --- a/packages/ui5-test-writer/test/unit/utils/listReportUtils.test.ts +++ b/packages/ui5-test-writer/test/unit/utils/listReportUtils.test.ts @@ -1485,14 +1485,14 @@ describe('Test getListReportFeatures()', () => { aggregations: { columns: { aggregations: { - col1: { + 'DataField::IDColumn': { description: 'ID', custom: false, schema: { keys: [{ name: 'Value', value: 'IDColumn' }] } } as unknown as TreeAggregation, - col2: { + 'DataField::NameColumn': { description: 'Name', custom: false, schema: { @@ -2081,3 +2081,84 @@ describe('Test safeGetSemanticKeyProperties()', () => { expect(loggedMessage).toMatch(/Failed to get semantic key properties: .+/); }); }); + +describe('getListReportFeatures() — contactCardColumns extraction', () => { + let mockLogger: Logger; + + beforeEach(() => { + mockLogger = { + warn: jest.fn(), + debug: jest.fn(), + info: jest.fn(), + error: jest.fn() + } as unknown as Logger; + }); + + test('exposes Contact-annotated table columns as contactCardColumns', () => { + const pageModel: PageWithModelV4 = { + model: { + root: { + aggregations: { + table: { + aggregations: { + columns: { + aggregations: { + TravelIDCol: { + schema: { keys: [{ name: 'Value', value: 'TravelID' }] }, + description: 'Travel' + } as unknown as TreeAggregation, + 'DataFieldForAnnotation::_Agency::Contact': { + schema: { + keys: [ + { + name: 'Target', + value: '_Agency/@Communication.Contact' + } + ] + }, + description: 'Agency' + } as unknown as TreeAggregation + } + } as unknown as TreeAggregation + } + } as unknown as TreeAggregation + } + } as unknown as TreeAggregation, + name: 'test', + schema: {} + }, + pageType: 'ListReport' + } as unknown as PageWithModelV4; + + const result = getListReportFeatures(pageModel, mockLogger); + expect(result.contactCardColumns).toEqual([{ property: 'DataFieldForAnnotation::_Agency::Contact' }]); + }); + + test('returns an empty contactCardColumns array when no Contact columns exist', () => { + const pageModel: PageWithModelV4 = { + model: { + root: { + aggregations: { + table: { + aggregations: { + columns: { + aggregations: { + TravelIDCol: { + schema: { keys: [{ name: 'Value', value: 'TravelID' }] } + } as unknown as TreeAggregation + } + } as unknown as TreeAggregation + } + } as unknown as TreeAggregation + } + } as unknown as TreeAggregation, + name: 'test', + schema: {} + }, + pageType: 'ListReport' + } as unknown as PageWithModelV4; + + const result = getListReportFeatures(pageModel, mockLogger); + expect(result.contactCardColumns).toEqual([]); + }); +}); diff --git a/packages/ui5-test-writer/test/unit/utils/modelUtils.test.ts b/packages/ui5-test-writer/test/unit/utils/modelUtils.test.ts index 49ac52e5b35..d8f9298861a 100644 --- a/packages/ui5-test-writer/test/unit/utils/modelUtils.test.ts +++ b/packages/ui5-test-writer/test/unit/utils/modelUtils.test.ts @@ -254,6 +254,37 @@ describe('Test getFeatureData()', () => { }); }); +describe('parseDataFieldForAnnotationName()', () => { + test('parses a Contact-annotated field name', () => { + expect(parseDataFieldForAnnotationName('DataFieldForAnnotation::_Customer::Contact')).toEqual({ + property: '_Customer', + targetAnnotation: 'Contact' + }); + }); + + test('parses a non-Contact annotation field name', () => { + expect(parseDataFieldForAnnotationName('DataFieldForAnnotation::Status::DataPoint')).toEqual({ + property: 'Status', + targetAnnotation: 'DataPoint' + }); + }); + + test('returns undefined for plain field names', () => { + expect(parseDataFieldForAnnotationName('DataField::CompanyCode')).toBeUndefined(); + expect(parseDataFieldForAnnotationName('PlainField')).toBeUndefined(); + }); + + test('returns undefined for undefined or empty input', () => { + expect(parseDataFieldForAnnotationName(undefined)).toBeUndefined(); + expect(parseDataFieldForAnnotationName('')).toBeUndefined(); + }); + + test('returns undefined when property or annotation segment is empty', () => { + expect(parseDataFieldForAnnotationName('DataFieldForAnnotation::::Contact')).toBeUndefined(); + expect(parseDataFieldForAnnotationName('DataFieldForAnnotation::Customer::')).toBeUndefined(); + }); +}); + describe('Test edge cases for better branch coverage', () => { test('getAggregations should handle node with empty aggregations', () => { const node = { aggregations: {} } as TreeAggregation; diff --git a/packages/ui5-test-writer/test/unit/utils/objectPageUtils.test.ts b/packages/ui5-test-writer/test/unit/utils/objectPageUtils.test.ts index 7405d63550c..a177825396f 100644 --- a/packages/ui5-test-writer/test/unit/utils/objectPageUtils.test.ts +++ b/packages/ui5-test-writer/test/unit/utils/objectPageUtils.test.ts @@ -1650,7 +1650,7 @@ describe('Test getObjectPageFeatures()', () => { aggregations: { columns: { aggregations: { - col1: { + 'DataField::Product': { custom: false, description: 'Product', schema: { @@ -1659,7 +1659,7 @@ describe('Test getObjectPageFeatures()', () => { ] } } as unknown as TreeAggregation, - col2: { + 'DataField::Quantity': { custom: false, description: 'Quantity', schema: { @@ -1688,7 +1688,10 @@ describe('Test getObjectPageFeatures()', () => { }; const result = await getObjectPageFeatures([objectPage] as PageWithModelV4[], undefined, mockLogger); const subSection = result[0].bodySections?.[0].subSections?.[0]; - expect(subSection?.tableColumns).toEqual({ Product: { header: 'Product' }, Quantity: { header: 'Quantity' } }); + expect(subSection?.tableColumns).toEqual({ + Product: { header: 'Product' }, + Quantity: { header: 'Quantity' } + }); }); test('should use Key for custom table columns', async () => { @@ -1955,12 +1958,12 @@ describe('Test getObjectPageFeatures()', () => { aggregations: { columns: { aggregations: { - col1: { + 'DataField::Product': { custom: false, description: 'Product', schema: { keys: [{ name: 'Value', value: 'Product' }] } } as unknown as TreeAggregation, - col2: { + 'DataField::Quantity': { custom: false, description: 'Quantity', schema: { keys: [{ name: 'Value', value: 'Quantity' }] } @@ -2393,3 +2396,233 @@ describe('Test getObjectPageFeatures()', () => { expect(result[0].headerActions).toEqual([]); }); }); + +describe('Contact Card extraction', () => { + let mockLogger: Logger; + + beforeEach(() => { + mockLogger = { + warn: jest.fn(), + debug: jest.fn(), + info: jest.fn(), + error: jest.fn() + } as unknown as Logger; + }); + + test('extracts Contact-annotated body sub-section form fields and exposes them as contactCardFields', async () => { + const objectPage = { + name: 'objectPage1', + pageType: 'ObjectPage', + model: { + root: { + aggregations: { + header: { + aggregations: { + sections: { aggregations: {} } as unknown as TreeAggregation + } as unknown as TreeAggregation + } as unknown as TreeAggregation, + sections: { + aggregations: { + section1: { + isTable: false, + custom: false, + schema: { keys: [{ name: 'ID', value: 'GeneralInformation' }] }, + aggregations: { + subSections: { + aggregations: { + subSection1: { + isTable: false, + custom: false, + schema: { keys: [{ name: 'ID', value: 'BookingData' }] }, + aggregations: { + form: { + schema: { keys: [] }, + aggregations: { + fields: { + aggregations: { + bookingId: { + name: 'DataField::BookingId', + schema: { + keys: [ + { + name: 'Value', + value: 'BookingId' + } + ] + } + } as unknown as TreeAggregation, + contactField: { + name: 'DataFieldForAnnotation::_Customer::Contact', + schema: { + keys: [ + { + name: 'Target', + value: '_Customer/@Communication.Contact' + } + ] + } + } as unknown as TreeAggregation + } + } as unknown as TreeAggregation + } as unknown as TreeAggregation + } as unknown as TreeAggregation + } + } as unknown as TreeAggregation + } + } as unknown as TreeAggregation + } + } as unknown as TreeAggregation + } + } as unknown as TreeAggregation + } + } as unknown as TreeAggregation, + name: 'test', + schema: {} + } + }; + const result = await getObjectPageFeatures([objectPage] as PageWithModelV4[], undefined, mockLogger); + const subSection = result[0].bodySections?.[0].subSections?.[0]; + expect(subSection?.fields).toEqual([ + { property: 'BookingId' }, + { property: '_Customer/Contact', targetAnnotation: 'Contact' } + ]); + expect(subSection?.contactCardFields).toEqual([{ property: '_Customer/Contact' }]); + }); + + test('exposes Contact-annotated body-section table columns as contactCardColumns', async () => { + const objectPage = { + name: 'objectPage1', + pageType: 'ObjectPage', + model: { + root: { + aggregations: { + header: { + aggregations: { + sections: { aggregations: {} } as unknown as TreeAggregation + } as unknown as TreeAggregation + } as unknown as TreeAggregation, + sections: { + aggregations: { + '_Supplements::@UI.LineItem': { + isTable: true, + custom: false, + schema: { keys: [{ name: 'ID', value: 'PriceData' }] }, + aggregations: { + table: { + aggregations: { + columns: { + aggregations: { + ConnectionIdCol: { + schema: { + keys: [{ name: 'Value', value: 'ConnectionId' }] + } + } as unknown as TreeAggregation, + 'DataFieldForAnnotation::_Carrier::Contact': { + schema: { + keys: [ + { + name: 'Target', + value: '_Carrier/@Communication.Contact' + } + ] + } + } as unknown as TreeAggregation + } + } as unknown as TreeAggregation + } as unknown as TreeAggregation + } as unknown as TreeAggregation + } + } as unknown as TreeAggregation + } + } as unknown as TreeAggregation + } + } as unknown as TreeAggregation, + name: 'test', + schema: {} + } + }; + const result = await getObjectPageFeatures([objectPage] as PageWithModelV4[], undefined, mockLogger); + const section = result[0].bodySections?.[0]; + expect(section?.isTable).toBe(true); + expect(section?.contactCardColumns).toEqual([{ property: 'DataFieldForAnnotation::_Carrier::Contact' }]); + expect(section?.tableColumns).toHaveProperty('ConnectionId'); + }); + + test('exposes Contact-annotated header field-group fields as contactCardFields with qualified property', async () => { + const objectPage = { + name: 'objectPage1', + pageType: 'ObjectPage', + model: { + root: { + aggregations: { + header: { + aggregations: { + sections: { + aggregations: { + FieldGroupNames: { + schema: { + keys: [ + { + name: 'Target', + value: 'com.sap.vocabularies.UI.v1.FieldGroup#Names' + }, + { name: 'ID', value: 'FieldGroup::Names' } + ] + }, + aggregations: { + form: { + schema: { + keys: [ + { + name: 'Target', + value: 'com.sap.vocabularies.UI.v1.FieldGroup#Names' + } + ] + }, + aggregations: { + fields: { + aggregations: { + airlineName: { + name: 'AirlineNameField', + schema: { + keys: [ + { + name: 'Value', + value: 'AirlineName' + } + ] + } + } as unknown as TreeAggregation, + contactCarrier: { + name: 'DataFieldForAnnotation::carrier::Contact', + schema: { + keys: [ + { + name: 'Target', + value: 'carrier/@Communication.Contact' + } + ] + } + } as unknown as TreeAggregation + } + } as unknown as TreeAggregation + } as unknown as TreeAggregation + } as unknown as TreeAggregation + } + } as unknown as TreeAggregation + } + } as unknown as TreeAggregation + } as unknown as TreeAggregation + } as unknown as TreeAggregation, + sections: { aggregations: {} } as unknown as TreeAggregation + } + } as unknown as TreeAggregation, + name: 'test', + schema: {} + } + }; + const result = await getObjectPageFeatures([objectPage] as PageWithModelV4[], undefined, mockLogger); + const headerSection = result[0].headerSections?.[0]; + expect(headerSection?.contactCardFields).toEqual([{ property: 'carrier/Contact' }]); + }); +}); diff --git a/packages/ui5-test-writer/test/unit/utils/tableUtils.test.ts b/packages/ui5-test-writer/test/unit/utils/tableUtils.test.ts index 9083262ad44..56f0eb00aa4 100644 --- a/packages/ui5-test-writer/test/unit/utils/tableUtils.test.ts +++ b/packages/ui5-test-writer/test/unit/utils/tableUtils.test.ts @@ -1,17 +1,18 @@ import { getColumnIdentifier, transformTableColumns, - extractTableColumnsFromNode + extractTableColumnsFromNode, + extractContactCardColumnsFromNode } from '../../../src/utils/tableUtils.js'; import type { ColumnAggregations } from '../../../src/utils/tableUtils.js'; import type { TreeAggregation } from '@sap/ux-specification/dist/types/src/parser'; describe('getColumnIdentifier()', () => { - test('returns Value key for a standard column', () => { + test('returns the bound property path for a plain DataField column', () => { const column = { schema: { keys: [{ name: 'Value', value: 'ProductID' }] } }; - expect(getColumnIdentifier(column)).toBe('ProductID'); + expect(getColumnIdentifier(column, 'DataField::ProductID')).toBe('ProductID'); }); test('returns Key entry for a custom column', () => { @@ -19,10 +20,10 @@ describe('getColumnIdentifier()', () => { custom: true, schema: { keys: [{ name: 'Key', value: 'myCustomCol' }] } }; - expect(getColumnIdentifier(column)).toBe('myCustomCol'); + expect(getColumnIdentifier(column, 'someAggregationKey')).toBe('myCustomCol'); }); - test('returns undefined when standard column has no Value key', () => { + test('returns undefined when standard column has no Value schema entry and no columnKey', () => { const column = { schema: { keys: [{ name: 'Label', value: 'Something' }] } }; @@ -34,20 +35,38 @@ describe('getColumnIdentifier()', () => { custom: true, schema: { keys: [{ name: 'Value', value: 'ProductID' }] } }; - expect(getColumnIdentifier(column)).toBeUndefined(); + expect(getColumnIdentifier(column, 'someAggregationKey')).toBeUndefined(); + }); + + test('returns the full aggregation key for DataFieldForAnnotation Contact-card columns', () => { + const column = { + schema: { keys: [{ name: 'Target', value: '_UserContactCard/Communication.Contact' }] } + }; + expect(getColumnIdentifier(column, 'DataFieldForAnnotation::_UserContactCard::Contact')).toBe( + 'DataFieldForAnnotation::_UserContactCard::Contact' + ); + }); + + test('returns the full aggregation key for non-Contact DataFieldForAnnotation columns', () => { + const column = { + schema: { keys: [{ name: 'Target', value: 'FieldGroup#PostalCodeCity' }] } + }; + expect(getColumnIdentifier(column, 'DataFieldForAnnotation::FieldGroup::PostalCodeCity')).toBe( + 'DataFieldForAnnotation::FieldGroup::PostalCodeCity' + ); }); }); describe('transformTableColumns()', () => { - test('maps standard columns using Value key with header from description', () => { + test('keys plain DataField columns by the bound property path', () => { const columnAggregations: ColumnAggregations = { - 'ProductID::col': { + 'DataField::ProductID': { path: [], aggregations: {}, description: 'Product ID', schema: { keys: [{ name: 'Value', value: 'ProductID' }] } }, - 'Name::col': { + 'DataField::Name': { path: [], aggregations: {}, description: 'Name', @@ -77,7 +96,7 @@ describe('transformTableColumns()', () => { test('omits header when description is absent', () => { const columnAggregations: ColumnAggregations = { - 'ProductID::col': { + 'DataField::ProductID': { path: [], aggregations: {}, schema: { keys: [{ name: 'Value', value: 'ProductID' }] } @@ -88,11 +107,12 @@ describe('transformTableColumns()', () => { }); }); - test('falls back to index as key when identifier cannot be determined', () => { + test('falls back to index as key when a custom column has no Key entry', () => { const columnAggregations: ColumnAggregations = { - unknownCol: { + myCol: { path: [], aggregations: {}, + custom: true, description: 'Unknown', schema: { keys: [{ name: 'Label', value: 'something' }] } } @@ -105,6 +125,65 @@ describe('transformTableColumns()', () => { test('returns empty object for empty input', () => { expect(transformTableColumns({})).toEqual({}); }); + + test('keys Contact-card columns by their full aggregation key', () => { + const columnAggregations: ColumnAggregations = { + 'DataField::TravelID': { + path: [], + aggregations: {}, + description: 'Travel ID', + schema: { keys: [{ name: 'Value', value: 'TravelID' }] } + }, + 'DataFieldForAnnotation::_Agency::Contact': { + path: [], + aggregations: {}, + description: 'Agency', + schema: { keys: [{ name: 'Target', value: '_Agency/Communication.Contact' }] } + } + }; + expect(transformTableColumns(columnAggregations)).toEqual({ + TravelID: { header: 'Travel ID' }, + 'DataFieldForAnnotation::_Agency::Contact': { header: 'Agency' } + }); + }); + + test('skips columns whose availability is not Default', () => { + const columnAggregations: ColumnAggregations = { + 'DataField::TravelID': { + path: [], + aggregations: {}, + description: 'Travel ID', + schema: { keys: [{ name: 'Value', value: 'TravelID' }] } + }, + myCustomColumn: { + path: [], + aggregations: {}, + custom: true, + description: 'Custom Column', + schema: { keys: [{ name: 'Key', value: 'myCustomColumn' }] }, + properties: { availability: { value: 'Adaptation' } } + }, + myHiddenColumn: { + path: [], + aggregations: {}, + custom: true, + description: 'Hidden', + schema: { keys: [{ name: 'Key', value: 'myHiddenColumn' }] }, + properties: { availability: { value: 'Hidden' } } + }, + 'DataField::Default': { + path: [], + aggregations: {}, + description: 'Default', + schema: { keys: [{ name: 'Value', value: 'Default' }] }, + properties: { availability: { value: 'Default' } } + } + }; + expect(transformTableColumns(columnAggregations)).toEqual({ + TravelID: { header: 'Travel ID' }, + Default: { header: 'Default' } + }); + }); }); function makeNode(columnItems: Record): TreeAggregation { @@ -124,11 +203,11 @@ function makeNode(columnItems: Record): TreeAggregation { describe('extractTableColumnsFromNode()', () => { test('extracts columns from a node with a table aggregation', () => { const node = makeNode({ - 'ProductID::col': { + 'DataField::ProductID': { description: 'Product ID', schema: { keys: [{ name: 'Value', value: 'ProductID' }] } }, - 'Name::col': { + 'DataField::Name': { description: 'Name', schema: { keys: [{ name: 'Value', value: 'Name' }] } } @@ -164,3 +243,79 @@ describe('extractTableColumnsFromNode()', () => { expect(extractTableColumnsFromNode(node)).toEqual({}); }); }); + +describe('extractContactCardColumnsFromNode()', () => { + test('extracts a single Contact column keyed by its aggregation key', () => { + const node = makeNode({ + 'DataField::TravelID': { + schema: { keys: [{ name: 'Value', value: 'TravelID' }] } + }, + 'DataFieldForAnnotation::_Agency::Contact': { + schema: { keys: [{ name: 'Target', value: '_Agency/@Communication.Contact' }] } + } + }); + expect(extractContactCardColumnsFromNode(node)).toEqual([ + { property: 'DataFieldForAnnotation::_Agency::Contact' } + ]); + }); + + test('extracts multiple Contact columns and ignores regular columns', () => { + const node = makeNode({ + 'DataField::TravelID': { + schema: { keys: [{ name: 'Value', value: 'TravelID' }] } + }, + 'DataFieldForAnnotation::_Agency::Contact': { + schema: { keys: [{ name: 'Target', value: '_Agency/@Communication.Contact' }] } + }, + 'DataFieldForAnnotation::_Customer::Contact': { + schema: { keys: [{ name: 'Target', value: '_Customer/@Communication.Contact' }] } + }, + 'DataFieldForAnnotation::Status::DataPoint': { + schema: { keys: [{ name: 'Target', value: 'Status/@UI.DataPoint' }] } + } + }); + expect(extractContactCardColumnsFromNode(node)).toEqual([ + { property: 'DataFieldForAnnotation::_Agency::Contact' }, + { property: 'DataFieldForAnnotation::_Customer::Contact' } + ]); + }); + + test('returns empty array when node has no table aggregation', () => { + const node = { aggregations: {} } as unknown as TreeAggregation; + expect(extractContactCardColumnsFromNode(node)).toEqual([]); + }); + + test('returns empty array when table has no columns aggregation', () => { + const node = { + aggregations: { table: { aggregations: {} } } + } as unknown as TreeAggregation; + expect(extractContactCardColumnsFromNode(node)).toEqual([]); + }); + + test('skips Contact-card columns whose availability is not Default', () => { + const node = makeNode({ + 'DataField::TravelID': { + schema: { keys: [{ name: 'Value', value: 'TravelID' }] } + }, + 'DataFieldForAnnotation::_Agency::Contact': { + schema: { keys: [{ name: 'Target', value: '_Agency/@Communication.Contact' }] }, + properties: { availability: { value: 'Adaptation' } } + }, + 'DataFieldForAnnotation::_Customer::Contact': { + schema: { keys: [{ name: 'Target', value: '_Customer/@Communication.Contact' }] } + } + }); + expect(extractContactCardColumnsFromNode(node)).toEqual([ + { property: 'DataFieldForAnnotation::_Customer::Contact' } + ]); + }); + + test('returns empty array when no columns are Contact-annotated', () => { + const node = makeNode({ + 'DataField::TravelID': { + schema: { keys: [{ name: 'Value', value: 'TravelID' }] } + } + }); + expect(extractContactCardColumnsFromNode(node)).toEqual([]); + }); +}); From 01980d12b3a539e21c0946f7cb4bb52424faaf06 Mon Sep 17 00:00:00 2001 From: I334706 Date: Tue, 23 Jun 2026 10:35:33 +0200 Subject: [PATCH 06/18] fix(ui5-test-writer): skip non-Contact annotation wrappers in body form fields --- .../test/unit/utils/objectPageUtils.test.ts | 90 +++++++++++++++++++ pnpm-lock.yaml | 2 +- 2 files changed, 91 insertions(+), 1 deletion(-) diff --git a/packages/ui5-test-writer/test/unit/utils/objectPageUtils.test.ts b/packages/ui5-test-writer/test/unit/utils/objectPageUtils.test.ts index a177825396f..8e522f5d896 100644 --- a/packages/ui5-test-writer/test/unit/utils/objectPageUtils.test.ts +++ b/packages/ui5-test-writer/test/unit/utils/objectPageUtils.test.ts @@ -2489,6 +2489,96 @@ describe('Contact Card extraction', () => { expect(subSection?.contactCardFields).toEqual([{ property: '_Customer/Contact' }]); }); + test('skips ConnectedFields / FieldGroup wrappers in body sub-section form fields', async () => { + const objectPage = { + name: 'objectPage1', + pageType: 'ObjectPage', + model: { + root: { + aggregations: { + header: { + aggregations: { + sections: { aggregations: {} } as unknown as TreeAggregation + } as unknown as TreeAggregation + } as unknown as TreeAggregation, + sections: { + aggregations: { + section1: { + isTable: false, + custom: false, + schema: { keys: [{ name: 'ID', value: 'GeneralInformation' }] }, + aggregations: { + subSections: { + aggregations: { + subSection1: { + isTable: false, + custom: false, + schema: { keys: [{ name: 'ID', value: 'BookingData' }] }, + aggregations: { + form: { + schema: { keys: [] }, + aggregations: { + fields: { + aggregations: { + plain: { + name: 'DataField::BookingId', + schema: { + keys: [ + { + name: 'Value', + value: 'BookingId' + } + ] + } + } as unknown as TreeAggregation, + connected: { + name: 'DataFieldForAnnotation::ConnectedFields::CountryCity', + schema: { + keys: [ + { + name: 'Target', + value: '@UI.ConnectedFields#CountryCity' + } + ] + } + } as unknown as TreeAggregation, + group: { + name: 'DataFieldForAnnotation::FieldGroup::CheckBoxGroup', + schema: { + keys: [ + { + name: 'Target', + value: '@UI.FieldGroup#CheckBoxGroup' + } + ] + } + } as unknown as TreeAggregation + } + } as unknown as TreeAggregation + } as unknown as TreeAggregation + } as unknown as TreeAggregation + } + } as unknown as TreeAggregation + } + } as unknown as TreeAggregation + } + } as unknown as TreeAggregation + } + } as unknown as TreeAggregation + } + } as unknown as TreeAggregation, + name: 'test', + schema: {} + } + }; + const result = await getObjectPageFeatures([objectPage] as PageWithModelV4[], undefined, mockLogger); + const subSection = result[0].bodySections?.[0].subSections?.[0]; + // Only the plain field remains; ConnectedFields and FieldGroup wrappers are skipped + // pending proper inner-property drilling (handled on a separate branch). + expect(subSection?.fields).toEqual([{ property: 'BookingId' }]); + expect(subSection?.contactCardFields).toEqual([]); + }); + test('exposes Contact-annotated body-section table columns as contactCardColumns', async () => { const objectPage = { name: 'objectPage1', diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 415711e32b4..545f84e8aab 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -33512,7 +33512,7 @@ snapshots: retry-axios@2.6.0(axios@1.16.1): dependencies: - axios: 1.16.1(debug@4.3.4) + axios: 1.16.1 optional: true retry@0.12.0: {} From 51c7e8b9a26815fabfd3fc1c490e2b94067a2a03 Mon Sep 17 00:00:00 2001 From: I334706 Date: Tue, 23 Jun 2026 14:18:56 +0200 Subject: [PATCH 07/18] test(fiori-app-sub-generator): regenerate v4 fixtures after template changes --- .../MaterialDetailsObjectPageJourney.gen.js | 6 +++--- .../test/integration/SalesOrderItemListJourney.gen.js | 5 +++-- .../SalesOrderItemObjectPageJourney.gen.js | 8 +++----- .../pages/MaterialDetailsObjectPage.gen.js | 11 ++--------- .../integration/pages/SalesOrderItemObjectPage.gen.js | 11 ++--------- .../test/integration/pages/BooksObjectPage.gen.js | 11 ++--------- .../test/integration/pages/BooksObjectPage.gen.js | 11 ++--------- .../test/integration/BookingObjectPageJourney.gen.js | 4 ++-- .../test/integration/TravelObjectPageJourney.gen.js | 6 +++--- .../test/integration/pages/BookingObjectPage.gen.js | 11 ++--------- .../test/integration/pages/TravelObjectPage.gen.js | 11 ++--------- .../test/integration/BookingObjectPageJourney.gen.js | 4 ++-- .../webapp/test/integration/TravelListJourney.gen.js | 3 ++- .../test/integration/TravelObjectPageJourney.gen.js | 6 +++--- .../test/integration/pages/BookingObjectPage.gen.js | 11 ++--------- .../test/integration/pages/TravelObjectPage.gen.js | 11 ++--------- .../test/integration/pages/BooksObjectPage.gen.js | 11 ++--------- .../test/integration/pages/BooksObjectPage.gen.js | 11 ++--------- .../test/integration/pages/BooksObjectPage.gen.js | 11 ++--------- .../test/integration/BookingObjectPageJourney.gen.js | 4 ++-- .../webapp/test/integration/TravelListJourney.gen.js | 3 ++- .../test/integration/TravelObjectPageJourney.gen.js | 6 +++--- .../test/integration/pages/BookingObjectPage.gen.js | 11 ++--------- .../test/integration/pages/TravelObjectPage.gen.js | 11 ++--------- 24 files changed, 54 insertions(+), 144 deletions(-) diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/MaterialDetailsObjectPageJourney.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/MaterialDetailsObjectPageJourney.gen.js index 18c01424903..997e44f8c1f 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/MaterialDetailsObjectPageJourney.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/MaterialDetailsObjectPageJourney.gen.js @@ -42,7 +42,7 @@ sap.ui.define([ opaTest("Check header actions of the Object Page", function (Given, When, Then) { // Ensure the opened entity is not in Draft state before uncommenting // Then.onTheMaterialDetailsObjectPageGenerated.onHeader().iCheckEdit({ visible: true }); - // When.onTheMaterialDetailsObjectPageGenerated.onHeader().iPressEdit(); + // When.onTheMaterialDetailsObjectPageGenerated.onHeader().iExecuteEdit(); Then.onTheMaterialDetailsObjectPageGenerated.onHeader().iCheckAction("Change Material Category", { enabled: true }); // When.onTheMaterialDetailsObjectPageGenerated.onHeader().iPressAction("Change Material Category"); }); @@ -50,13 +50,13 @@ sap.ui.define([ opaTest("Check body sections of the Object Page", function (Given, When, Then) { Then.onTheMaterialDetailsObjectPageGenerated.iCheckNumberOfSections(2); - When.onTheMaterialDetailsObjectPageGenerated.iPressSectionIconTabFilterButton("MaterialDetailsFacet"); + When.onTheMaterialDetailsObjectPageGenerated.iGoToSection({ section: "MaterialDetailsFacet" }); Then.onTheMaterialDetailsObjectPageGenerated.iCheckSection({ section: "MaterialDetailsFacet" }); Then.onTheMaterialDetailsObjectPageGenerated.onForm({ section: "MaterialDetailsFacet" }).iCheckField({ property: "ModelYear" }); Then.onTheMaterialDetailsObjectPageGenerated.onForm({ section: "MaterialDetailsFacet" }).iCheckField({ property: "WarrantyYear" }); Then.onTheMaterialDetailsObjectPageGenerated.onForm({ section: "MaterialDetailsFacet" }).iCheckField({ property: "BrandCategory" }); Then.onTheMaterialDetailsObjectPageGenerated.onForm({ section: "MaterialDetailsFacet" }).iCheckField({ property: "FabricationCountry" }); - When.onTheMaterialDetailsObjectPageGenerated.iPressSectionIconTabFilterButton("MaterialRatingsFacet"); + When.onTheMaterialDetailsObjectPageGenerated.iGoToSection({ section: "MaterialRatingsFacet" }); Then.onTheMaterialDetailsObjectPageGenerated.iCheckSection({ section: "MaterialRatingsFacet" }); Then.onTheMaterialDetailsObjectPageGenerated.onTable({ property: "_MaterialRatings" }).iCheckAction("Material Ratings Bound Action", { enabled: true }); // When.onTheMaterialDetailsObjectPageGenerated.onTable({ property: "_MaterialRatings" }).iPressAction("Material Ratings Bound Action"); diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/SalesOrderItemListJourney.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/SalesOrderItemListJourney.gen.js index 757ae933fa1..49fa5fcafed 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/SalesOrderItemListJourney.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/SalesOrderItemListJourney.gen.js @@ -45,12 +45,13 @@ sap.ui.define([ Then.onTheSalesOrderItemListGenerated.onTable().iCheckAction("View Return Status", { enabled: true }); // Then.onTheSalesOrderItemListGenerated.onTable().iPressAction("Dummy Bound Action"); Then.onTheSalesOrderItemListGenerated.onTable().iCheckAction("Dummy Bound Action", { enabled: false }); - Then.onTheSalesOrderItemListGenerated.onTable().iCheckColumns(undefined, {"10":{"header":"Bound Action"},"11":{"header":"IBN"},"SalesOrderItem":{"header":"Item"},"HigherLevelItem":{"header":"Higher-Level Item"},"Material":{"header":"Material"},"RequestedQuantity":{"header":"Requested Quantity"},"SalesOrderItemCategory":{"header":"Item Category"},"RequestedDeliveryDate":{"header":"Delivery Date"},"NetAmount":{"header":"Net Value"},"_Material/Material":{"header":"Material"},"isVerified":{"header":"Verified Material"},"_ReferencedSalesOrder/SalesOrder":{"header":"Referenced Sales Order"}}); - + Then.onTheSalesOrderItemListGenerated.onTable().iCheckColumns(undefined, {"SalesOrderItem":{"header":"Item"},"HigherLevelItem":{"header":"Higher-Level Item"},"Material":{"header":"Material"},"RequestedQuantity":{"header":"Requested Quantity"},"SalesOrderItemCategory":{"header":"Item Category"},"RequestedDeliveryDate":{"header":"Delivery Date"},"NetAmount":{"header":"Net Value"},"_Material/Material":{"header":"Material"},"isVerified":{"header":"Verified Material"},"_ReferencedSalesOrder/SalesOrder":{"header":"Referenced Sales Order"},"DataFieldForAction::com.c_salesordermanage_sd_aggregate.DummyBoundAction":{"header":"Bound Action"},"DataFieldForIntentBasedNavigation::SalesOrder::manageInline::RequiresContext":{"header":"IBN"}}); }); + + opaTest("Navigate to ObjectPage", function (Given, When, Then) { // Note: this test will fail if the ListReport page doesn't show any data diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/SalesOrderItemObjectPageJourney.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/SalesOrderItemObjectPageJourney.gen.js index c979491cfb2..0454d3b3108 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/SalesOrderItemObjectPageJourney.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/SalesOrderItemObjectPageJourney.gen.js @@ -38,7 +38,7 @@ sap.ui.define([ opaTest("Check header actions of the Object Page", function (Given, When, Then) { // Ensure the opened entity is not in Draft state before uncommenting // Then.onTheSalesOrderItemObjectPageGenerated.onHeader().iCheckEdit({ visible: true }); - // When.onTheSalesOrderItemObjectPageGenerated.onHeader().iPressEdit(); + // When.onTheSalesOrderItemObjectPageGenerated.onHeader().iExecuteEdit(); Then.onTheSalesOrderItemObjectPageGenerated.onHeader().iCheckAction("Identification Form Action" /* , { enabled: true } */); // When.onTheSalesOrderItemObjectPageGenerated.onHeader().iPressAction("Identification Form Action"); }); @@ -46,15 +46,13 @@ sap.ui.define([ opaTest("Check body sections of the Object Page", function (Given, When, Then) { Then.onTheSalesOrderItemObjectPageGenerated.iCheckNumberOfSections(2); - When.onTheSalesOrderItemObjectPageGenerated.iPressSectionIconTabFilterButton("Identification"); + When.onTheSalesOrderItemObjectPageGenerated.iGoToSection({ section: "Identification" }); Then.onTheSalesOrderItemObjectPageGenerated.iCheckSection({ section: "Identification" }); - Then.onTheSalesOrderItemObjectPageGenerated.onForm({ section: "Identification" }).iCheckField({ property: "_ReferencedSalesOrder/SalesOrder" }); Then.onTheSalesOrderItemObjectPageGenerated.onForm({ section: "Identification" }).iCheckField({ property: "SalesOrderItem" }); Then.onTheSalesOrderItemObjectPageGenerated.onForm({ section: "Identification" }).iCheckField({ property: "Material" }); Then.onTheSalesOrderItemObjectPageGenerated.onForm({ section: "Identification" }).iCheckField({ property: "RequestedQuantity" }); Then.onTheSalesOrderItemObjectPageGenerated.onForm({ section: "Identification" }).iCheckField({ property: "NetAmount" }); - Then.onTheSalesOrderItemObjectPageGenerated.onForm({ section: "Identification" }).iCheckField({ property: "_ReferencedSalesOrderItem/SalesOrderItem" }); - When.onTheSalesOrderItemObjectPageGenerated.iPressSectionIconTabFilterButton("MaterialDetailsFacet"); + When.onTheSalesOrderItemObjectPageGenerated.iGoToSection({ section: "MaterialDetailsFacet" }); Then.onTheSalesOrderItemObjectPageGenerated.iCheckSection({ section: "MaterialDetailsFacet" }); Then.onTheSalesOrderItemObjectPageGenerated.onTable({ property: "_MaterialDetails" }).iCheckAction("Material Details Bound Action", { enabled: true }); // When.onTheSalesOrderItemObjectPageGenerated.onTable({ property: "_MaterialDetails" }).iPressAction("Material Details Bound Action"); diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/pages/MaterialDetailsObjectPage.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/pages/MaterialDetailsObjectPage.gen.js index 54dfc296f74..7464aa33cad 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/pages/MaterialDetailsObjectPage.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/pages/MaterialDetailsObjectPage.gen.js @@ -15,18 +15,11 @@ * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { +sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { 'use strict'; var CustomPageDefinitions = { - actions: { - iPressSectionIconTabFilterButton: function (section) { - return this.waitFor({ - id: new RegExp(`.*--fe::FacetSection::${section}-anchor$`), - actions: new Press() - }); - } - }, + actions: {}, assertions: {} }; diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/pages/SalesOrderItemObjectPage.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/pages/SalesOrderItemObjectPage.gen.js index 0276c1d89b9..d07f38d13a6 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/pages/SalesOrderItemObjectPage.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/pages/SalesOrderItemObjectPage.gen.js @@ -15,18 +15,11 @@ * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { +sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { 'use strict'; var CustomPageDefinitions = { - actions: { - iPressSectionIconTabFilterButton: function (section) { - return this.waitFor({ - id: new RegExp(`.*--fe::FacetSection::${section}-anchor$`), - actions: new Press() - }); - } - }, + actions: {}, assertions: {} }; diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4_cap/app/alp_v4_cap/webapp/test/integration/pages/BooksObjectPage.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4_cap/app/alp_v4_cap/webapp/test/integration/pages/BooksObjectPage.gen.js index 798921c6159..465afce4af5 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4_cap/app/alp_v4_cap/webapp/test/integration/pages/BooksObjectPage.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4_cap/app/alp_v4_cap/webapp/test/integration/pages/BooksObjectPage.gen.js @@ -15,18 +15,11 @@ * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { +sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { 'use strict'; var CustomPageDefinitions = { - actions: { - iPressSectionIconTabFilterButton: function (section) { - return this.waitFor({ - id: new RegExp(`.*--fe::FacetSection::${section}-anchor$`), - actions: new Press() - }); - } - }, + actions: {}, assertions: {} }; diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/feop_v4_cap/app/feop_v4_cap/webapp/test/integration/pages/BooksObjectPage.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/feop_v4_cap/app/feop_v4_cap/webapp/test/integration/pages/BooksObjectPage.gen.js index 8597f9bd1f1..5a21720201c 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/feop_v4_cap/app/feop_v4_cap/webapp/test/integration/pages/BooksObjectPage.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/feop_v4_cap/app/feop_v4_cap/webapp/test/integration/pages/BooksObjectPage.gen.js @@ -15,18 +15,11 @@ * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { +sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { 'use strict'; var CustomPageDefinitions = { - actions: { - iPressSectionIconTabFilterButton: function (section) { - return this.waitFor({ - id: new RegExp(`.*--fe::FacetSection::${section}-anchor$`), - actions: new Press() - }); - } - }, + actions: {}, assertions: {} }; diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/form_entry_v4/webapp/test/integration/BookingObjectPageJourney.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/form_entry_v4/webapp/test/integration/BookingObjectPageJourney.gen.js index 8d3e352d17e..64b95ac0bdc 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/form_entry_v4/webapp/test/integration/BookingObjectPageJourney.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/form_entry_v4/webapp/test/integration/BookingObjectPageJourney.gen.js @@ -43,7 +43,7 @@ sap.ui.define([ opaTest("Check body sections of the Object Page", function (Given, When, Then) { Then.onTheBookingObjectPageGenerated.iCheckNumberOfSections(2); - When.onTheBookingObjectPageGenerated.iPressSectionIconTabFilterButton("Booking"); + When.onTheBookingObjectPageGenerated.iGoToSection({ section: "Booking" }); Then.onTheBookingObjectPageGenerated.iCheckSection({ section: "Booking" }); Then.onTheBookingObjectPageGenerated.onForm({ section: "Booking" }).iCheckField({ property: "BookingID" }); Then.onTheBookingObjectPageGenerated.onForm({ section: "Booking" }).iCheckField({ property: "BookingDate" }); @@ -53,7 +53,7 @@ sap.ui.define([ Then.onTheBookingObjectPageGenerated.onForm({ section: "Booking" }).iCheckField({ property: "FlightDate" }); Then.onTheBookingObjectPageGenerated.onForm({ section: "Booking" }).iCheckField({ property: "FlightPrice" }); Then.onTheBookingObjectPageGenerated.onForm({ section: "Booking" }).iCheckField({ property: "DestinationRisk" }); - When.onTheBookingObjectPageGenerated.iPressSectionIconTabFilterButton("BookingSupplement"); + When.onTheBookingObjectPageGenerated.iGoToSection({ section: "BookingSupplement" }); Then.onTheBookingObjectPageGenerated.iCheckSection({ section: "BookingSupplement" }); Then.onTheBookingObjectPageGenerated.onTable({ property: "_BookSupplement" }).iCheckColumns({"BookingSupplementID":{"header":"Book. Supp. Number"},"SupplementID":{"header":"Product ID"},"Price":{"header":"Product Price"}}); }); diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/form_entry_v4/webapp/test/integration/TravelObjectPageJourney.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/form_entry_v4/webapp/test/integration/TravelObjectPageJourney.gen.js index be776b7eb3c..ab9e9c951ae 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/form_entry_v4/webapp/test/integration/TravelObjectPageJourney.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/form_entry_v4/webapp/test/integration/TravelObjectPageJourney.gen.js @@ -38,7 +38,7 @@ sap.ui.define([ opaTest("Check header actions of the Object Page", function (Given, When, Then) { // Ensure the opened entity is not in Draft state before uncommenting // Then.onTheTravelObjectPageGenerated.onHeader().iCheckEdit({ visible: true }); - // When.onTheTravelObjectPageGenerated.onHeader().iPressEdit(); + // When.onTheTravelObjectPageGenerated.onHeader().iExecuteEdit(); Then.onTheTravelObjectPageGenerated.onHeader().iCheckAction("Set Cancel Date to Tomorrow" /* , { enabled: true } */); // When.onTheTravelObjectPageGenerated.onHeader().iPressAction("Set Cancel Date to Tomorrow"); Then.onTheTravelObjectPageGenerated.onHeader().iCheckAction("Set To Booked" /* , { enabled: true } */); @@ -54,7 +54,7 @@ sap.ui.define([ opaTest("Check body sections of the Object Page", function (Given, When, Then) { Then.onTheTravelObjectPageGenerated.iCheckNumberOfSections(2); - When.onTheTravelObjectPageGenerated.iPressSectionIconTabFilterButton("Travel"); + When.onTheTravelObjectPageGenerated.iGoToSection({ section: "Travel" }); Then.onTheTravelObjectPageGenerated.iCheckSection({ section: "Travel" }); Then.onTheTravelObjectPageGenerated.onForm({ section: "Travel" }).iCheckField({ property: "TravelID" }); Then.onTheTravelObjectPageGenerated.onForm({ section: "Travel" }).iCheckField({ property: "AgencyID" }); @@ -66,7 +66,7 @@ sap.ui.define([ Then.onTheTravelObjectPageGenerated.onForm({ section: "Travel" }).iCheckField({ property: "LatestCancellationDate" }); Then.onTheTravelObjectPageGenerated.onForm({ section: "Travel" }).iCheckField({ property: "Memo" }); Then.onTheTravelObjectPageGenerated.onForm({ section: "Travel" }).iCheckField({ property: "Status" }); - When.onTheTravelObjectPageGenerated.iPressSectionIconTabFilterButton("Booking"); + When.onTheTravelObjectPageGenerated.iGoToSection({ section: "Booking" }); Then.onTheTravelObjectPageGenerated.iCheckSection({ section: "Booking" }); Then.onTheTravelObjectPageGenerated.onTable({ property: "_Booking" }).iCheckColumns({"BookingID":{"header":"Booking Number"},"BookingDate":{"header":"Booking Date"},"CustomerID":{"header":"Customer ID"},"AirlineID":{"header":"Airline ID"},"ConnectionID":{"header":"Flight Number"},"FlightDate":{"header":"Flight Date"},"FlightPrice":{"header":"Flight Price"},"DestinationRisk":{"header":"Destination Risk"}}); }); diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/form_entry_v4/webapp/test/integration/pages/BookingObjectPage.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/form_entry_v4/webapp/test/integration/pages/BookingObjectPage.gen.js index fa8ed3ea6b4..ed1d8f8e6d2 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/form_entry_v4/webapp/test/integration/pages/BookingObjectPage.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/form_entry_v4/webapp/test/integration/pages/BookingObjectPage.gen.js @@ -15,18 +15,11 @@ * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { +sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { 'use strict'; var CustomPageDefinitions = { - actions: { - iPressSectionIconTabFilterButton: function (section) { - return this.waitFor({ - id: new RegExp(`.*--fe::FacetSection::${section}-anchor$`), - actions: new Press() - }); - } - }, + actions: {}, assertions: {} }; diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/form_entry_v4/webapp/test/integration/pages/TravelObjectPage.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/form_entry_v4/webapp/test/integration/pages/TravelObjectPage.gen.js index 07259e367eb..25d6df03325 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/form_entry_v4/webapp/test/integration/pages/TravelObjectPage.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/form_entry_v4/webapp/test/integration/pages/TravelObjectPage.gen.js @@ -15,18 +15,11 @@ * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { +sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { 'use strict'; var CustomPageDefinitions = { - actions: { - iPressSectionIconTabFilterButton: function (section) { - return this.waitFor({ - id: new RegExp(`.*--fe::FacetSection::${section}-anchor$`), - actions: new Press() - }); - } - }, + actions: {}, assertions: {} }; diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/BookingObjectPageJourney.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/BookingObjectPageJourney.gen.js index ee1c918462a..8b7b2681faa 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/BookingObjectPageJourney.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/BookingObjectPageJourney.gen.js @@ -43,7 +43,7 @@ sap.ui.define([ opaTest("Check body sections of the Object Page", function (Given, When, Then) { Then.onTheBookingObjectPageGenerated.iCheckNumberOfSections(2); - When.onTheBookingObjectPageGenerated.iPressSectionIconTabFilterButton("Booking"); + When.onTheBookingObjectPageGenerated.iGoToSection({ section: "Booking" }); Then.onTheBookingObjectPageGenerated.iCheckSection({ section: "Booking" }); Then.onTheBookingObjectPageGenerated.onForm({ section: "Booking" }).iCheckField({ property: "BookingID" }); Then.onTheBookingObjectPageGenerated.onForm({ section: "Booking" }).iCheckField({ property: "BookingDate" }); @@ -53,7 +53,7 @@ sap.ui.define([ Then.onTheBookingObjectPageGenerated.onForm({ section: "Booking" }).iCheckField({ property: "FlightDate" }); Then.onTheBookingObjectPageGenerated.onForm({ section: "Booking" }).iCheckField({ property: "FlightPrice" }); Then.onTheBookingObjectPageGenerated.onForm({ section: "Booking" }).iCheckField({ property: "DestinationRisk" }); - When.onTheBookingObjectPageGenerated.iPressSectionIconTabFilterButton("BookingSupplement"); + When.onTheBookingObjectPageGenerated.iGoToSection({ section: "BookingSupplement" }); Then.onTheBookingObjectPageGenerated.iCheckSection({ section: "BookingSupplement" }); Then.onTheBookingObjectPageGenerated.onTable({ property: "_BookSupplement" }).iCheckColumns({"BookingSupplementID":{"header":"Book. Supp. Number"},"SupplementID":{"header":"Product ID"},"Price":{"header":"Product Price"}}); }); diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/TravelListJourney.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/TravelListJourney.gen.js index 0de78811e45..8657e76d125 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/TravelListJourney.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/TravelListJourney.gen.js @@ -63,11 +63,12 @@ sap.ui.define([ // Then.onTheTravelListGenerated.onTable().iPressAction("Set Cancel Date to Tomorrow"); Then.onTheTravelListGenerated.onTable().iCheckAction("Set Cancel Date to Tomorrow", { enabled: false }); Then.onTheTravelListGenerated.onTable().iCheckColumns(undefined, {"TravelID":{"header":"Travel ID"},"AgencyID":{"header":"Agency ID"},"CustomerID":{"header":"Customer ID"},"BeginDate":{"header":"Starting Date"},"EndDate":{"header":"End Date"},"BookingFee":{"header":"Booking Fee"},"TotalPrice":{"header":"Total Price"},"LatestCancellationDate":{"header":"Latest Cancellation Date"},"Memo":{"header":"Description"},"Status":{"header":"Travel Status"}}); - }); + + opaTest("Navigate to ObjectPage", function (Given, When, Then) { // Note: this test will fail if the ListReport page doesn't show any data diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/TravelObjectPageJourney.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/TravelObjectPageJourney.gen.js index f29f1b08baf..ad7bd42fa16 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/TravelObjectPageJourney.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/TravelObjectPageJourney.gen.js @@ -38,7 +38,7 @@ sap.ui.define([ opaTest("Check header actions of the Object Page", function (Given, When, Then) { // Ensure the opened entity is not in Draft state before uncommenting // Then.onTheTravelObjectPageGenerated.onHeader().iCheckEdit({ visible: true }); - // When.onTheTravelObjectPageGenerated.onHeader().iPressEdit(); + // When.onTheTravelObjectPageGenerated.onHeader().iExecuteEdit(); Then.onTheTravelObjectPageGenerated.onHeader().iCheckAction("Set Cancel Date to Tomorrow" /* , { enabled: true } */); // When.onTheTravelObjectPageGenerated.onHeader().iPressAction("Set Cancel Date to Tomorrow"); Then.onTheTravelObjectPageGenerated.onHeader().iCheckAction("Set To Booked" /* , { enabled: true } */); @@ -54,7 +54,7 @@ sap.ui.define([ opaTest("Check body sections of the Object Page", function (Given, When, Then) { Then.onTheTravelObjectPageGenerated.iCheckNumberOfSections(2); - When.onTheTravelObjectPageGenerated.iPressSectionIconTabFilterButton("Travel"); + When.onTheTravelObjectPageGenerated.iGoToSection({ section: "Travel" }); Then.onTheTravelObjectPageGenerated.iCheckSection({ section: "Travel" }); Then.onTheTravelObjectPageGenerated.onForm({ section: "Travel" }).iCheckField({ property: "TravelID" }); Then.onTheTravelObjectPageGenerated.onForm({ section: "Travel" }).iCheckField({ property: "AgencyID" }); @@ -66,7 +66,7 @@ sap.ui.define([ Then.onTheTravelObjectPageGenerated.onForm({ section: "Travel" }).iCheckField({ property: "LatestCancellationDate" }); Then.onTheTravelObjectPageGenerated.onForm({ section: "Travel" }).iCheckField({ property: "Memo" }); Then.onTheTravelObjectPageGenerated.onForm({ section: "Travel" }).iCheckField({ property: "Status" }); - When.onTheTravelObjectPageGenerated.iPressSectionIconTabFilterButton("Booking"); + When.onTheTravelObjectPageGenerated.iGoToSection({ section: "Booking" }); Then.onTheTravelObjectPageGenerated.iCheckSection({ section: "Booking" }); Then.onTheTravelObjectPageGenerated.onTable({ property: "_Booking" }).iCheckColumns({"BookingID":{"header":"Booking Number"},"BookingDate":{"header":"Booking Date"},"CustomerID":{"header":"Customer ID"},"AirlineID":{"header":"Airline ID"},"ConnectionID":{"header":"Flight Number"},"FlightDate":{"header":"Flight Date"},"FlightPrice":{"header":"Flight Price"},"DestinationRisk":{"header":"Destination Risk"}}); }); diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/pages/BookingObjectPage.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/pages/BookingObjectPage.gen.js index e822effeaf2..e56dc91e6bd 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/pages/BookingObjectPage.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/pages/BookingObjectPage.gen.js @@ -15,18 +15,11 @@ * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { +sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { 'use strict'; var CustomPageDefinitions = { - actions: { - iPressSectionIconTabFilterButton: function (section) { - return this.waitFor({ - id: new RegExp(`.*--fe::FacetSection::${section}-anchor$`), - actions: new Press() - }); - } - }, + actions: {}, assertions: {} }; diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/pages/TravelObjectPage.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/pages/TravelObjectPage.gen.js index fff7ae95ba2..6976cfd675a 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/pages/TravelObjectPage.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/pages/TravelObjectPage.gen.js @@ -15,18 +15,11 @@ * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { +sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { 'use strict'; var CustomPageDefinitions = { - actions: { - iPressSectionIconTabFilterButton: function (section) { - return this.waitFor({ - id: new RegExp(`.*--fe::FacetSection::${section}-anchor$`), - actions: new Press() - }); - } - }, + actions: {}, assertions: {} }; diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4_cap/app/lrop_v4_cap/webapp/test/integration/pages/BooksObjectPage.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4_cap/app/lrop_v4_cap/webapp/test/integration/pages/BooksObjectPage.gen.js index 76cbf87b87e..e80258fdac2 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4_cap/app/lrop_v4_cap/webapp/test/integration/pages/BooksObjectPage.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4_cap/app/lrop_v4_cap/webapp/test/integration/pages/BooksObjectPage.gen.js @@ -15,18 +15,11 @@ * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { +sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { 'use strict'; var CustomPageDefinitions = { - actions: { - iPressSectionIconTabFilterButton: function (section) { - return this.waitFor({ - id: new RegExp(`.*--fe::FacetSection::${section}-anchor$`), - actions: new Press() - }); - } - }, + actions: {}, assertions: {} }; diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4_cap_java/app/lrop_v4_cap_java/webapp/test/integration/pages/BooksObjectPage.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4_cap_java/app/lrop_v4_cap_java/webapp/test/integration/pages/BooksObjectPage.gen.js index 37efa12fb2a..8eb92663bb5 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4_cap_java/app/lrop_v4_cap_java/webapp/test/integration/pages/BooksObjectPage.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4_cap_java/app/lrop_v4_cap_java/webapp/test/integration/pages/BooksObjectPage.gen.js @@ -15,18 +15,11 @@ * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { +sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { 'use strict'; var CustomPageDefinitions = { - actions: { - iPressSectionIconTabFilterButton: function (section) { - return this.waitFor({ - id: new RegExp(`.*--fe::FacetSection::${section}-anchor$`), - actions: new Press() - }); - } - }, + actions: {}, assertions: {} }; diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4_version_not_specified/app/lrop_v4_version_not_specified/webapp/test/integration/pages/BooksObjectPage.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4_version_not_specified/app/lrop_v4_version_not_specified/webapp/test/integration/pages/BooksObjectPage.gen.js index 985e1d128d6..6c3d6f7bf29 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4_version_not_specified/app/lrop_v4_version_not_specified/webapp/test/integration/pages/BooksObjectPage.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4_version_not_specified/app/lrop_v4_version_not_specified/webapp/test/integration/pages/BooksObjectPage.gen.js @@ -15,18 +15,11 @@ * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { +sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { 'use strict'; var CustomPageDefinitions = { - actions: { - iPressSectionIconTabFilterButton: function (section) { - return this.waitFor({ - id: new RegExp(`.*--fe::FacetSection::${section}-anchor$`), - actions: new Press() - }); - } - }, + actions: {}, assertions: {} }; diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/BookingObjectPageJourney.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/BookingObjectPageJourney.gen.js index 8f09d9a40f3..31984811c21 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/BookingObjectPageJourney.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/BookingObjectPageJourney.gen.js @@ -41,7 +41,7 @@ sap.ui.define([ opaTest("Check body sections of the Object Page", function (Given, When, Then) { Then.onTheBookingObjectPageGenerated.iCheckNumberOfSections(2); - When.onTheBookingObjectPageGenerated.iPressSectionIconTabFilterButton("Booking"); + When.onTheBookingObjectPageGenerated.iGoToSection({ section: "Booking" }); Then.onTheBookingObjectPageGenerated.iCheckSection({ section: "Booking" }); Then.onTheBookingObjectPageGenerated.onForm({ section: "Booking" }).iCheckField({ property: "BookingID" }); Then.onTheBookingObjectPageGenerated.onForm({ section: "Booking" }).iCheckField({ property: "BookingDate" }); @@ -51,7 +51,7 @@ sap.ui.define([ Then.onTheBookingObjectPageGenerated.onForm({ section: "Booking" }).iCheckField({ property: "FlightDate" }); Then.onTheBookingObjectPageGenerated.onForm({ section: "Booking" }).iCheckField({ property: "FlightPrice" }); Then.onTheBookingObjectPageGenerated.onForm({ section: "Booking" }).iCheckField({ property: "DestinationRisk" }); - When.onTheBookingObjectPageGenerated.iPressSectionIconTabFilterButton("BookingSupplement"); + When.onTheBookingObjectPageGenerated.iGoToSection({ section: "BookingSupplement" }); Then.onTheBookingObjectPageGenerated.iCheckSection({ section: "BookingSupplement" }); Then.onTheBookingObjectPageGenerated.onTable({ property: "_BookSupplement" }).iCheckColumns({"BookingSupplementID":{"header":"Book. Supp. Number"},"SupplementID":{"header":"Product ID"},"Price":{"header":"Product Price"}}); }); diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/TravelListJourney.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/TravelListJourney.gen.js index f61827af67c..2e7448a6190 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/TravelListJourney.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/TravelListJourney.gen.js @@ -58,11 +58,12 @@ sap.ui.define([ // Then.onTheTravelListGenerated.onTable().iPressAction("Set Cancel Date to Tomorrow"); Then.onTheTravelListGenerated.onTable().iCheckAction("Set Cancel Date to Tomorrow", { enabled: false }); Then.onTheTravelListGenerated.onTable().iCheckColumns(undefined, {"TravelID":{"header":"Travel ID"},"AgencyID":{"header":"Agency ID"},"CustomerID":{"header":"Customer ID"},"BeginDate":{"header":"Starting Date"},"EndDate":{"header":"End Date"},"BookingFee":{"header":"Booking Fee"},"TotalPrice":{"header":"Total Price"},"LatestCancellationDate":{"header":"Latest Cancellation Date"},"Memo":{"header":"Description"},"Status":{"header":"Travel Status"}}); - }); + + opaTest("Navigate to ObjectPage", function (Given, When, Then) { // Note: this test will fail if the ListReport page doesn't show any data diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/TravelObjectPageJourney.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/TravelObjectPageJourney.gen.js index a60a8ff69e6..a72f4c9a9b2 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/TravelObjectPageJourney.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/TravelObjectPageJourney.gen.js @@ -36,7 +36,7 @@ sap.ui.define([ opaTest("Check header actions of the Object Page", function (Given, When, Then) { // Ensure the opened entity is not in Draft state before uncommenting // Then.onTheTravelObjectPageGenerated.onHeader().iCheckEdit({ visible: true }); - // When.onTheTravelObjectPageGenerated.onHeader().iPressEdit(); + // When.onTheTravelObjectPageGenerated.onHeader().iExecuteEdit(); Then.onTheTravelObjectPageGenerated.onHeader().iCheckAction("Set Cancel Date to Tomorrow" /* , { enabled: true } */); // When.onTheTravelObjectPageGenerated.onHeader().iPressAction("Set Cancel Date to Tomorrow"); Then.onTheTravelObjectPageGenerated.onHeader().iCheckAction("Set To Booked" /* , { enabled: true } */); @@ -52,7 +52,7 @@ sap.ui.define([ opaTest("Check body sections of the Object Page", function (Given, When, Then) { Then.onTheTravelObjectPageGenerated.iCheckNumberOfSections(2); - When.onTheTravelObjectPageGenerated.iPressSectionIconTabFilterButton("Travel"); + When.onTheTravelObjectPageGenerated.iGoToSection({ section: "Travel" }); Then.onTheTravelObjectPageGenerated.iCheckSection({ section: "Travel" }); Then.onTheTravelObjectPageGenerated.onForm({ section: "Travel" }).iCheckField({ property: "TravelID" }); Then.onTheTravelObjectPageGenerated.onForm({ section: "Travel" }).iCheckField({ property: "AgencyID" }); @@ -64,7 +64,7 @@ sap.ui.define([ Then.onTheTravelObjectPageGenerated.onForm({ section: "Travel" }).iCheckField({ property: "LatestCancellationDate" }); Then.onTheTravelObjectPageGenerated.onForm({ section: "Travel" }).iCheckField({ property: "Memo" }); Then.onTheTravelObjectPageGenerated.onForm({ section: "Travel" }).iCheckField({ property: "Status" }); - When.onTheTravelObjectPageGenerated.iPressSectionIconTabFilterButton("Booking"); + When.onTheTravelObjectPageGenerated.iGoToSection({ section: "Booking" }); Then.onTheTravelObjectPageGenerated.iCheckSection({ section: "Booking" }); Then.onTheTravelObjectPageGenerated.onTable({ property: "_Booking" }).iCheckColumns({"BookingID":{"header":"Booking Number"},"BookingDate":{"header":"Booking Date"},"CustomerID":{"header":"Customer ID"},"AirlineID":{"header":"Airline ID"},"ConnectionID":{"header":"Flight Number"},"FlightDate":{"header":"Flight Date"},"FlightPrice":{"header":"Flight Price"},"DestinationRisk":{"header":"Destination Risk"}}); }); diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/pages/BookingObjectPage.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/pages/BookingObjectPage.gen.js index 02081c74573..171a2df2023 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/pages/BookingObjectPage.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/pages/BookingObjectPage.gen.js @@ -15,18 +15,11 @@ * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { +sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { 'use strict'; var CustomPageDefinitions = { - actions: { - iPressSectionIconTabFilterButton: function (section) { - return this.waitFor({ - id: new RegExp(`.*--fe::FacetSection::${section}-anchor$`), - actions: new Press() - }); - } - }, + actions: {}, assertions: {} }; diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/pages/TravelObjectPage.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/pages/TravelObjectPage.gen.js index 8e043d64b04..46e97dd7502 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/pages/TravelObjectPage.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/pages/TravelObjectPage.gen.js @@ -15,18 +15,11 @@ * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { +sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { 'use strict'; var CustomPageDefinitions = { - actions: { - iPressSectionIconTabFilterButton: function (section) { - return this.waitFor({ - id: new RegExp(`.*--fe::FacetSection::${section}-anchor$`), - actions: new Press() - }); - } - }, + actions: {}, assertions: {} }; From 5bde28123de0ee89a8add57c118447413ea9730d Mon Sep 17 00:00:00 2001 From: I334706 Date: Tue, 23 Jun 2026 15:07:21 +0200 Subject: [PATCH 08/18] revert: roll back iGoToSection/iExecuteEdit template migration (moved to separate PR) --- .../MaterialDetailsObjectPageJourney.gen.js | 6 +- .../SalesOrderItemObjectPageJourney.gen.js | 6 +- .../pages/MaterialDetailsObjectPage.gen.js | 11 +- .../pages/SalesOrderItemObjectPage.gen.js | 11 +- .../integration/pages/BooksObjectPage.gen.js | 11 +- .../integration/pages/BooksObjectPage.gen.js | 11 +- .../BookingObjectPageJourney.gen.js | 4 +- .../TravelObjectPageJourney.gen.js | 6 +- .../pages/BookingObjectPage.gen.js | 11 +- .../integration/pages/TravelObjectPage.gen.js | 11 +- .../BookingObjectPageJourney.gen.js | 4 +- .../TravelObjectPageJourney.gen.js | 6 +- .../pages/BookingObjectPage.gen.js | 11 +- .../integration/pages/TravelObjectPage.gen.js | 11 +- .../integration/pages/BooksObjectPage.gen.js | 11 +- .../integration/pages/BooksObjectPage.gen.js | 11 +- .../integration/pages/BooksObjectPage.gen.js | 11 +- .../BookingObjectPageJourney.gen.js | 4 +- .../TravelObjectPageJourney.gen.js | 6 +- .../pages/BookingObjectPage.gen.js | 11 +- .../integration/pages/TravelObjectPage.gen.js | 11 +- .../test/__snapshots__/lrop.test.ts.snap | 7 +- .../v4/integration/ObjectPageJourney.js | 10 +- .../v4/integration/ObjectPageJourney.ts | 12 +- .../v4/integration/pages/ObjectPage.js | 11 +- .../test/test-input/fin.test.v4.lr1 | 1 + .../__snapshots__/fiori-elements.test.ts.snap | 314 +++++++++++++++--- .../test/unit/fiori-elements.test.ts | 20 +- 28 files changed, 443 insertions(+), 117 deletions(-) create mode 160000 packages/ui5-test-writer/test/test-input/fin.test.v4.lr1 diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/MaterialDetailsObjectPageJourney.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/MaterialDetailsObjectPageJourney.gen.js index 997e44f8c1f..18c01424903 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/MaterialDetailsObjectPageJourney.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/MaterialDetailsObjectPageJourney.gen.js @@ -42,7 +42,7 @@ sap.ui.define([ opaTest("Check header actions of the Object Page", function (Given, When, Then) { // Ensure the opened entity is not in Draft state before uncommenting // Then.onTheMaterialDetailsObjectPageGenerated.onHeader().iCheckEdit({ visible: true }); - // When.onTheMaterialDetailsObjectPageGenerated.onHeader().iExecuteEdit(); + // When.onTheMaterialDetailsObjectPageGenerated.onHeader().iPressEdit(); Then.onTheMaterialDetailsObjectPageGenerated.onHeader().iCheckAction("Change Material Category", { enabled: true }); // When.onTheMaterialDetailsObjectPageGenerated.onHeader().iPressAction("Change Material Category"); }); @@ -50,13 +50,13 @@ sap.ui.define([ opaTest("Check body sections of the Object Page", function (Given, When, Then) { Then.onTheMaterialDetailsObjectPageGenerated.iCheckNumberOfSections(2); - When.onTheMaterialDetailsObjectPageGenerated.iGoToSection({ section: "MaterialDetailsFacet" }); + When.onTheMaterialDetailsObjectPageGenerated.iPressSectionIconTabFilterButton("MaterialDetailsFacet"); Then.onTheMaterialDetailsObjectPageGenerated.iCheckSection({ section: "MaterialDetailsFacet" }); Then.onTheMaterialDetailsObjectPageGenerated.onForm({ section: "MaterialDetailsFacet" }).iCheckField({ property: "ModelYear" }); Then.onTheMaterialDetailsObjectPageGenerated.onForm({ section: "MaterialDetailsFacet" }).iCheckField({ property: "WarrantyYear" }); Then.onTheMaterialDetailsObjectPageGenerated.onForm({ section: "MaterialDetailsFacet" }).iCheckField({ property: "BrandCategory" }); Then.onTheMaterialDetailsObjectPageGenerated.onForm({ section: "MaterialDetailsFacet" }).iCheckField({ property: "FabricationCountry" }); - When.onTheMaterialDetailsObjectPageGenerated.iGoToSection({ section: "MaterialRatingsFacet" }); + When.onTheMaterialDetailsObjectPageGenerated.iPressSectionIconTabFilterButton("MaterialRatingsFacet"); Then.onTheMaterialDetailsObjectPageGenerated.iCheckSection({ section: "MaterialRatingsFacet" }); Then.onTheMaterialDetailsObjectPageGenerated.onTable({ property: "_MaterialRatings" }).iCheckAction("Material Ratings Bound Action", { enabled: true }); // When.onTheMaterialDetailsObjectPageGenerated.onTable({ property: "_MaterialRatings" }).iPressAction("Material Ratings Bound Action"); diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/SalesOrderItemObjectPageJourney.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/SalesOrderItemObjectPageJourney.gen.js index 0454d3b3108..e5e707f1ea0 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/SalesOrderItemObjectPageJourney.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/SalesOrderItemObjectPageJourney.gen.js @@ -38,7 +38,7 @@ sap.ui.define([ opaTest("Check header actions of the Object Page", function (Given, When, Then) { // Ensure the opened entity is not in Draft state before uncommenting // Then.onTheSalesOrderItemObjectPageGenerated.onHeader().iCheckEdit({ visible: true }); - // When.onTheSalesOrderItemObjectPageGenerated.onHeader().iExecuteEdit(); + // When.onTheSalesOrderItemObjectPageGenerated.onHeader().iPressEdit(); Then.onTheSalesOrderItemObjectPageGenerated.onHeader().iCheckAction("Identification Form Action" /* , { enabled: true } */); // When.onTheSalesOrderItemObjectPageGenerated.onHeader().iPressAction("Identification Form Action"); }); @@ -46,13 +46,13 @@ sap.ui.define([ opaTest("Check body sections of the Object Page", function (Given, When, Then) { Then.onTheSalesOrderItemObjectPageGenerated.iCheckNumberOfSections(2); - When.onTheSalesOrderItemObjectPageGenerated.iGoToSection({ section: "Identification" }); + When.onTheSalesOrderItemObjectPageGenerated.iPressSectionIconTabFilterButton("Identification"); Then.onTheSalesOrderItemObjectPageGenerated.iCheckSection({ section: "Identification" }); Then.onTheSalesOrderItemObjectPageGenerated.onForm({ section: "Identification" }).iCheckField({ property: "SalesOrderItem" }); Then.onTheSalesOrderItemObjectPageGenerated.onForm({ section: "Identification" }).iCheckField({ property: "Material" }); Then.onTheSalesOrderItemObjectPageGenerated.onForm({ section: "Identification" }).iCheckField({ property: "RequestedQuantity" }); Then.onTheSalesOrderItemObjectPageGenerated.onForm({ section: "Identification" }).iCheckField({ property: "NetAmount" }); - When.onTheSalesOrderItemObjectPageGenerated.iGoToSection({ section: "MaterialDetailsFacet" }); + When.onTheSalesOrderItemObjectPageGenerated.iPressSectionIconTabFilterButton("MaterialDetailsFacet"); Then.onTheSalesOrderItemObjectPageGenerated.iCheckSection({ section: "MaterialDetailsFacet" }); Then.onTheSalesOrderItemObjectPageGenerated.onTable({ property: "_MaterialDetails" }).iCheckAction("Material Details Bound Action", { enabled: true }); // When.onTheSalesOrderItemObjectPageGenerated.onTable({ property: "_MaterialDetails" }).iPressAction("Material Details Bound Action"); diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/pages/MaterialDetailsObjectPage.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/pages/MaterialDetailsObjectPage.gen.js index 7464aa33cad..54dfc296f74 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/pages/MaterialDetailsObjectPage.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/pages/MaterialDetailsObjectPage.gen.js @@ -15,11 +15,18 @@ * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { +sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { 'use strict'; var CustomPageDefinitions = { - actions: {}, + actions: { + iPressSectionIconTabFilterButton: function (section) { + return this.waitFor({ + id: new RegExp(`.*--fe::FacetSection::${section}-anchor$`), + actions: new Press() + }); + } + }, assertions: {} }; diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/pages/SalesOrderItemObjectPage.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/pages/SalesOrderItemObjectPage.gen.js index d07f38d13a6..0276c1d89b9 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/pages/SalesOrderItemObjectPage.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/pages/SalesOrderItemObjectPage.gen.js @@ -15,11 +15,18 @@ * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { +sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { 'use strict'; var CustomPageDefinitions = { - actions: {}, + actions: { + iPressSectionIconTabFilterButton: function (section) { + return this.waitFor({ + id: new RegExp(`.*--fe::FacetSection::${section}-anchor$`), + actions: new Press() + }); + } + }, assertions: {} }; diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4_cap/app/alp_v4_cap/webapp/test/integration/pages/BooksObjectPage.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4_cap/app/alp_v4_cap/webapp/test/integration/pages/BooksObjectPage.gen.js index 465afce4af5..798921c6159 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4_cap/app/alp_v4_cap/webapp/test/integration/pages/BooksObjectPage.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4_cap/app/alp_v4_cap/webapp/test/integration/pages/BooksObjectPage.gen.js @@ -15,11 +15,18 @@ * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { +sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { 'use strict'; var CustomPageDefinitions = { - actions: {}, + actions: { + iPressSectionIconTabFilterButton: function (section) { + return this.waitFor({ + id: new RegExp(`.*--fe::FacetSection::${section}-anchor$`), + actions: new Press() + }); + } + }, assertions: {} }; diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/feop_v4_cap/app/feop_v4_cap/webapp/test/integration/pages/BooksObjectPage.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/feop_v4_cap/app/feop_v4_cap/webapp/test/integration/pages/BooksObjectPage.gen.js index 5a21720201c..8597f9bd1f1 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/feop_v4_cap/app/feop_v4_cap/webapp/test/integration/pages/BooksObjectPage.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/feop_v4_cap/app/feop_v4_cap/webapp/test/integration/pages/BooksObjectPage.gen.js @@ -15,11 +15,18 @@ * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { +sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { 'use strict'; var CustomPageDefinitions = { - actions: {}, + actions: { + iPressSectionIconTabFilterButton: function (section) { + return this.waitFor({ + id: new RegExp(`.*--fe::FacetSection::${section}-anchor$`), + actions: new Press() + }); + } + }, assertions: {} }; diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/form_entry_v4/webapp/test/integration/BookingObjectPageJourney.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/form_entry_v4/webapp/test/integration/BookingObjectPageJourney.gen.js index 64b95ac0bdc..8d3e352d17e 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/form_entry_v4/webapp/test/integration/BookingObjectPageJourney.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/form_entry_v4/webapp/test/integration/BookingObjectPageJourney.gen.js @@ -43,7 +43,7 @@ sap.ui.define([ opaTest("Check body sections of the Object Page", function (Given, When, Then) { Then.onTheBookingObjectPageGenerated.iCheckNumberOfSections(2); - When.onTheBookingObjectPageGenerated.iGoToSection({ section: "Booking" }); + When.onTheBookingObjectPageGenerated.iPressSectionIconTabFilterButton("Booking"); Then.onTheBookingObjectPageGenerated.iCheckSection({ section: "Booking" }); Then.onTheBookingObjectPageGenerated.onForm({ section: "Booking" }).iCheckField({ property: "BookingID" }); Then.onTheBookingObjectPageGenerated.onForm({ section: "Booking" }).iCheckField({ property: "BookingDate" }); @@ -53,7 +53,7 @@ sap.ui.define([ Then.onTheBookingObjectPageGenerated.onForm({ section: "Booking" }).iCheckField({ property: "FlightDate" }); Then.onTheBookingObjectPageGenerated.onForm({ section: "Booking" }).iCheckField({ property: "FlightPrice" }); Then.onTheBookingObjectPageGenerated.onForm({ section: "Booking" }).iCheckField({ property: "DestinationRisk" }); - When.onTheBookingObjectPageGenerated.iGoToSection({ section: "BookingSupplement" }); + When.onTheBookingObjectPageGenerated.iPressSectionIconTabFilterButton("BookingSupplement"); Then.onTheBookingObjectPageGenerated.iCheckSection({ section: "BookingSupplement" }); Then.onTheBookingObjectPageGenerated.onTable({ property: "_BookSupplement" }).iCheckColumns({"BookingSupplementID":{"header":"Book. Supp. Number"},"SupplementID":{"header":"Product ID"},"Price":{"header":"Product Price"}}); }); diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/form_entry_v4/webapp/test/integration/TravelObjectPageJourney.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/form_entry_v4/webapp/test/integration/TravelObjectPageJourney.gen.js index ab9e9c951ae..be776b7eb3c 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/form_entry_v4/webapp/test/integration/TravelObjectPageJourney.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/form_entry_v4/webapp/test/integration/TravelObjectPageJourney.gen.js @@ -38,7 +38,7 @@ sap.ui.define([ opaTest("Check header actions of the Object Page", function (Given, When, Then) { // Ensure the opened entity is not in Draft state before uncommenting // Then.onTheTravelObjectPageGenerated.onHeader().iCheckEdit({ visible: true }); - // When.onTheTravelObjectPageGenerated.onHeader().iExecuteEdit(); + // When.onTheTravelObjectPageGenerated.onHeader().iPressEdit(); Then.onTheTravelObjectPageGenerated.onHeader().iCheckAction("Set Cancel Date to Tomorrow" /* , { enabled: true } */); // When.onTheTravelObjectPageGenerated.onHeader().iPressAction("Set Cancel Date to Tomorrow"); Then.onTheTravelObjectPageGenerated.onHeader().iCheckAction("Set To Booked" /* , { enabled: true } */); @@ -54,7 +54,7 @@ sap.ui.define([ opaTest("Check body sections of the Object Page", function (Given, When, Then) { Then.onTheTravelObjectPageGenerated.iCheckNumberOfSections(2); - When.onTheTravelObjectPageGenerated.iGoToSection({ section: "Travel" }); + When.onTheTravelObjectPageGenerated.iPressSectionIconTabFilterButton("Travel"); Then.onTheTravelObjectPageGenerated.iCheckSection({ section: "Travel" }); Then.onTheTravelObjectPageGenerated.onForm({ section: "Travel" }).iCheckField({ property: "TravelID" }); Then.onTheTravelObjectPageGenerated.onForm({ section: "Travel" }).iCheckField({ property: "AgencyID" }); @@ -66,7 +66,7 @@ sap.ui.define([ Then.onTheTravelObjectPageGenerated.onForm({ section: "Travel" }).iCheckField({ property: "LatestCancellationDate" }); Then.onTheTravelObjectPageGenerated.onForm({ section: "Travel" }).iCheckField({ property: "Memo" }); Then.onTheTravelObjectPageGenerated.onForm({ section: "Travel" }).iCheckField({ property: "Status" }); - When.onTheTravelObjectPageGenerated.iGoToSection({ section: "Booking" }); + When.onTheTravelObjectPageGenerated.iPressSectionIconTabFilterButton("Booking"); Then.onTheTravelObjectPageGenerated.iCheckSection({ section: "Booking" }); Then.onTheTravelObjectPageGenerated.onTable({ property: "_Booking" }).iCheckColumns({"BookingID":{"header":"Booking Number"},"BookingDate":{"header":"Booking Date"},"CustomerID":{"header":"Customer ID"},"AirlineID":{"header":"Airline ID"},"ConnectionID":{"header":"Flight Number"},"FlightDate":{"header":"Flight Date"},"FlightPrice":{"header":"Flight Price"},"DestinationRisk":{"header":"Destination Risk"}}); }); diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/form_entry_v4/webapp/test/integration/pages/BookingObjectPage.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/form_entry_v4/webapp/test/integration/pages/BookingObjectPage.gen.js index ed1d8f8e6d2..fa8ed3ea6b4 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/form_entry_v4/webapp/test/integration/pages/BookingObjectPage.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/form_entry_v4/webapp/test/integration/pages/BookingObjectPage.gen.js @@ -15,11 +15,18 @@ * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { +sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { 'use strict'; var CustomPageDefinitions = { - actions: {}, + actions: { + iPressSectionIconTabFilterButton: function (section) { + return this.waitFor({ + id: new RegExp(`.*--fe::FacetSection::${section}-anchor$`), + actions: new Press() + }); + } + }, assertions: {} }; diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/form_entry_v4/webapp/test/integration/pages/TravelObjectPage.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/form_entry_v4/webapp/test/integration/pages/TravelObjectPage.gen.js index 25d6df03325..07259e367eb 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/form_entry_v4/webapp/test/integration/pages/TravelObjectPage.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/form_entry_v4/webapp/test/integration/pages/TravelObjectPage.gen.js @@ -15,11 +15,18 @@ * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { +sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { 'use strict'; var CustomPageDefinitions = { - actions: {}, + actions: { + iPressSectionIconTabFilterButton: function (section) { + return this.waitFor({ + id: new RegExp(`.*--fe::FacetSection::${section}-anchor$`), + actions: new Press() + }); + } + }, assertions: {} }; diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/BookingObjectPageJourney.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/BookingObjectPageJourney.gen.js index 8b7b2681faa..ee1c918462a 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/BookingObjectPageJourney.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/BookingObjectPageJourney.gen.js @@ -43,7 +43,7 @@ sap.ui.define([ opaTest("Check body sections of the Object Page", function (Given, When, Then) { Then.onTheBookingObjectPageGenerated.iCheckNumberOfSections(2); - When.onTheBookingObjectPageGenerated.iGoToSection({ section: "Booking" }); + When.onTheBookingObjectPageGenerated.iPressSectionIconTabFilterButton("Booking"); Then.onTheBookingObjectPageGenerated.iCheckSection({ section: "Booking" }); Then.onTheBookingObjectPageGenerated.onForm({ section: "Booking" }).iCheckField({ property: "BookingID" }); Then.onTheBookingObjectPageGenerated.onForm({ section: "Booking" }).iCheckField({ property: "BookingDate" }); @@ -53,7 +53,7 @@ sap.ui.define([ Then.onTheBookingObjectPageGenerated.onForm({ section: "Booking" }).iCheckField({ property: "FlightDate" }); Then.onTheBookingObjectPageGenerated.onForm({ section: "Booking" }).iCheckField({ property: "FlightPrice" }); Then.onTheBookingObjectPageGenerated.onForm({ section: "Booking" }).iCheckField({ property: "DestinationRisk" }); - When.onTheBookingObjectPageGenerated.iGoToSection({ section: "BookingSupplement" }); + When.onTheBookingObjectPageGenerated.iPressSectionIconTabFilterButton("BookingSupplement"); Then.onTheBookingObjectPageGenerated.iCheckSection({ section: "BookingSupplement" }); Then.onTheBookingObjectPageGenerated.onTable({ property: "_BookSupplement" }).iCheckColumns({"BookingSupplementID":{"header":"Book. Supp. Number"},"SupplementID":{"header":"Product ID"},"Price":{"header":"Product Price"}}); }); diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/TravelObjectPageJourney.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/TravelObjectPageJourney.gen.js index ad7bd42fa16..f29f1b08baf 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/TravelObjectPageJourney.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/TravelObjectPageJourney.gen.js @@ -38,7 +38,7 @@ sap.ui.define([ opaTest("Check header actions of the Object Page", function (Given, When, Then) { // Ensure the opened entity is not in Draft state before uncommenting // Then.onTheTravelObjectPageGenerated.onHeader().iCheckEdit({ visible: true }); - // When.onTheTravelObjectPageGenerated.onHeader().iExecuteEdit(); + // When.onTheTravelObjectPageGenerated.onHeader().iPressEdit(); Then.onTheTravelObjectPageGenerated.onHeader().iCheckAction("Set Cancel Date to Tomorrow" /* , { enabled: true } */); // When.onTheTravelObjectPageGenerated.onHeader().iPressAction("Set Cancel Date to Tomorrow"); Then.onTheTravelObjectPageGenerated.onHeader().iCheckAction("Set To Booked" /* , { enabled: true } */); @@ -54,7 +54,7 @@ sap.ui.define([ opaTest("Check body sections of the Object Page", function (Given, When, Then) { Then.onTheTravelObjectPageGenerated.iCheckNumberOfSections(2); - When.onTheTravelObjectPageGenerated.iGoToSection({ section: "Travel" }); + When.onTheTravelObjectPageGenerated.iPressSectionIconTabFilterButton("Travel"); Then.onTheTravelObjectPageGenerated.iCheckSection({ section: "Travel" }); Then.onTheTravelObjectPageGenerated.onForm({ section: "Travel" }).iCheckField({ property: "TravelID" }); Then.onTheTravelObjectPageGenerated.onForm({ section: "Travel" }).iCheckField({ property: "AgencyID" }); @@ -66,7 +66,7 @@ sap.ui.define([ Then.onTheTravelObjectPageGenerated.onForm({ section: "Travel" }).iCheckField({ property: "LatestCancellationDate" }); Then.onTheTravelObjectPageGenerated.onForm({ section: "Travel" }).iCheckField({ property: "Memo" }); Then.onTheTravelObjectPageGenerated.onForm({ section: "Travel" }).iCheckField({ property: "Status" }); - When.onTheTravelObjectPageGenerated.iGoToSection({ section: "Booking" }); + When.onTheTravelObjectPageGenerated.iPressSectionIconTabFilterButton("Booking"); Then.onTheTravelObjectPageGenerated.iCheckSection({ section: "Booking" }); Then.onTheTravelObjectPageGenerated.onTable({ property: "_Booking" }).iCheckColumns({"BookingID":{"header":"Booking Number"},"BookingDate":{"header":"Booking Date"},"CustomerID":{"header":"Customer ID"},"AirlineID":{"header":"Airline ID"},"ConnectionID":{"header":"Flight Number"},"FlightDate":{"header":"Flight Date"},"FlightPrice":{"header":"Flight Price"},"DestinationRisk":{"header":"Destination Risk"}}); }); diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/pages/BookingObjectPage.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/pages/BookingObjectPage.gen.js index e56dc91e6bd..e822effeaf2 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/pages/BookingObjectPage.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/pages/BookingObjectPage.gen.js @@ -15,11 +15,18 @@ * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { +sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { 'use strict'; var CustomPageDefinitions = { - actions: {}, + actions: { + iPressSectionIconTabFilterButton: function (section) { + return this.waitFor({ + id: new RegExp(`.*--fe::FacetSection::${section}-anchor$`), + actions: new Press() + }); + } + }, assertions: {} }; diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/pages/TravelObjectPage.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/pages/TravelObjectPage.gen.js index 6976cfd675a..fff7ae95ba2 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/pages/TravelObjectPage.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/pages/TravelObjectPage.gen.js @@ -15,11 +15,18 @@ * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { +sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { 'use strict'; var CustomPageDefinitions = { - actions: {}, + actions: { + iPressSectionIconTabFilterButton: function (section) { + return this.waitFor({ + id: new RegExp(`.*--fe::FacetSection::${section}-anchor$`), + actions: new Press() + }); + } + }, assertions: {} }; diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4_cap/app/lrop_v4_cap/webapp/test/integration/pages/BooksObjectPage.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4_cap/app/lrop_v4_cap/webapp/test/integration/pages/BooksObjectPage.gen.js index e80258fdac2..76cbf87b87e 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4_cap/app/lrop_v4_cap/webapp/test/integration/pages/BooksObjectPage.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4_cap/app/lrop_v4_cap/webapp/test/integration/pages/BooksObjectPage.gen.js @@ -15,11 +15,18 @@ * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { +sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { 'use strict'; var CustomPageDefinitions = { - actions: {}, + actions: { + iPressSectionIconTabFilterButton: function (section) { + return this.waitFor({ + id: new RegExp(`.*--fe::FacetSection::${section}-anchor$`), + actions: new Press() + }); + } + }, assertions: {} }; diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4_cap_java/app/lrop_v4_cap_java/webapp/test/integration/pages/BooksObjectPage.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4_cap_java/app/lrop_v4_cap_java/webapp/test/integration/pages/BooksObjectPage.gen.js index 8eb92663bb5..37efa12fb2a 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4_cap_java/app/lrop_v4_cap_java/webapp/test/integration/pages/BooksObjectPage.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4_cap_java/app/lrop_v4_cap_java/webapp/test/integration/pages/BooksObjectPage.gen.js @@ -15,11 +15,18 @@ * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { +sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { 'use strict'; var CustomPageDefinitions = { - actions: {}, + actions: { + iPressSectionIconTabFilterButton: function (section) { + return this.waitFor({ + id: new RegExp(`.*--fe::FacetSection::${section}-anchor$`), + actions: new Press() + }); + } + }, assertions: {} }; diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4_version_not_specified/app/lrop_v4_version_not_specified/webapp/test/integration/pages/BooksObjectPage.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4_version_not_specified/app/lrop_v4_version_not_specified/webapp/test/integration/pages/BooksObjectPage.gen.js index 6c3d6f7bf29..985e1d128d6 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4_version_not_specified/app/lrop_v4_version_not_specified/webapp/test/integration/pages/BooksObjectPage.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4_version_not_specified/app/lrop_v4_version_not_specified/webapp/test/integration/pages/BooksObjectPage.gen.js @@ -15,11 +15,18 @@ * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { +sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { 'use strict'; var CustomPageDefinitions = { - actions: {}, + actions: { + iPressSectionIconTabFilterButton: function (section) { + return this.waitFor({ + id: new RegExp(`.*--fe::FacetSection::${section}-anchor$`), + actions: new Press() + }); + } + }, assertions: {} }; diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/BookingObjectPageJourney.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/BookingObjectPageJourney.gen.js index 31984811c21..8f09d9a40f3 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/BookingObjectPageJourney.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/BookingObjectPageJourney.gen.js @@ -41,7 +41,7 @@ sap.ui.define([ opaTest("Check body sections of the Object Page", function (Given, When, Then) { Then.onTheBookingObjectPageGenerated.iCheckNumberOfSections(2); - When.onTheBookingObjectPageGenerated.iGoToSection({ section: "Booking" }); + When.onTheBookingObjectPageGenerated.iPressSectionIconTabFilterButton("Booking"); Then.onTheBookingObjectPageGenerated.iCheckSection({ section: "Booking" }); Then.onTheBookingObjectPageGenerated.onForm({ section: "Booking" }).iCheckField({ property: "BookingID" }); Then.onTheBookingObjectPageGenerated.onForm({ section: "Booking" }).iCheckField({ property: "BookingDate" }); @@ -51,7 +51,7 @@ sap.ui.define([ Then.onTheBookingObjectPageGenerated.onForm({ section: "Booking" }).iCheckField({ property: "FlightDate" }); Then.onTheBookingObjectPageGenerated.onForm({ section: "Booking" }).iCheckField({ property: "FlightPrice" }); Then.onTheBookingObjectPageGenerated.onForm({ section: "Booking" }).iCheckField({ property: "DestinationRisk" }); - When.onTheBookingObjectPageGenerated.iGoToSection({ section: "BookingSupplement" }); + When.onTheBookingObjectPageGenerated.iPressSectionIconTabFilterButton("BookingSupplement"); Then.onTheBookingObjectPageGenerated.iCheckSection({ section: "BookingSupplement" }); Then.onTheBookingObjectPageGenerated.onTable({ property: "_BookSupplement" }).iCheckColumns({"BookingSupplementID":{"header":"Book. Supp. Number"},"SupplementID":{"header":"Product ID"},"Price":{"header":"Product Price"}}); }); diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/TravelObjectPageJourney.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/TravelObjectPageJourney.gen.js index a72f4c9a9b2..a60a8ff69e6 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/TravelObjectPageJourney.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/TravelObjectPageJourney.gen.js @@ -36,7 +36,7 @@ sap.ui.define([ opaTest("Check header actions of the Object Page", function (Given, When, Then) { // Ensure the opened entity is not in Draft state before uncommenting // Then.onTheTravelObjectPageGenerated.onHeader().iCheckEdit({ visible: true }); - // When.onTheTravelObjectPageGenerated.onHeader().iExecuteEdit(); + // When.onTheTravelObjectPageGenerated.onHeader().iPressEdit(); Then.onTheTravelObjectPageGenerated.onHeader().iCheckAction("Set Cancel Date to Tomorrow" /* , { enabled: true } */); // When.onTheTravelObjectPageGenerated.onHeader().iPressAction("Set Cancel Date to Tomorrow"); Then.onTheTravelObjectPageGenerated.onHeader().iCheckAction("Set To Booked" /* , { enabled: true } */); @@ -52,7 +52,7 @@ sap.ui.define([ opaTest("Check body sections of the Object Page", function (Given, When, Then) { Then.onTheTravelObjectPageGenerated.iCheckNumberOfSections(2); - When.onTheTravelObjectPageGenerated.iGoToSection({ section: "Travel" }); + When.onTheTravelObjectPageGenerated.iPressSectionIconTabFilterButton("Travel"); Then.onTheTravelObjectPageGenerated.iCheckSection({ section: "Travel" }); Then.onTheTravelObjectPageGenerated.onForm({ section: "Travel" }).iCheckField({ property: "TravelID" }); Then.onTheTravelObjectPageGenerated.onForm({ section: "Travel" }).iCheckField({ property: "AgencyID" }); @@ -64,7 +64,7 @@ sap.ui.define([ Then.onTheTravelObjectPageGenerated.onForm({ section: "Travel" }).iCheckField({ property: "LatestCancellationDate" }); Then.onTheTravelObjectPageGenerated.onForm({ section: "Travel" }).iCheckField({ property: "Memo" }); Then.onTheTravelObjectPageGenerated.onForm({ section: "Travel" }).iCheckField({ property: "Status" }); - When.onTheTravelObjectPageGenerated.iGoToSection({ section: "Booking" }); + When.onTheTravelObjectPageGenerated.iPressSectionIconTabFilterButton("Booking"); Then.onTheTravelObjectPageGenerated.iCheckSection({ section: "Booking" }); Then.onTheTravelObjectPageGenerated.onTable({ property: "_Booking" }).iCheckColumns({"BookingID":{"header":"Booking Number"},"BookingDate":{"header":"Booking Date"},"CustomerID":{"header":"Customer ID"},"AirlineID":{"header":"Airline ID"},"ConnectionID":{"header":"Flight Number"},"FlightDate":{"header":"Flight Date"},"FlightPrice":{"header":"Flight Price"},"DestinationRisk":{"header":"Destination Risk"}}); }); diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/pages/BookingObjectPage.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/pages/BookingObjectPage.gen.js index 171a2df2023..02081c74573 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/pages/BookingObjectPage.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/pages/BookingObjectPage.gen.js @@ -15,11 +15,18 @@ * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { +sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { 'use strict'; var CustomPageDefinitions = { - actions: {}, + actions: { + iPressSectionIconTabFilterButton: function (section) { + return this.waitFor({ + id: new RegExp(`.*--fe::FacetSection::${section}-anchor$`), + actions: new Press() + }); + } + }, assertions: {} }; diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/pages/TravelObjectPage.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/pages/TravelObjectPage.gen.js index 46e97dd7502..8e043d64b04 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/pages/TravelObjectPage.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/pages/TravelObjectPage.gen.js @@ -15,11 +15,18 @@ * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { +sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { 'use strict'; var CustomPageDefinitions = { - actions: {}, + actions: { + iPressSectionIconTabFilterButton: function (section) { + return this.waitFor({ + id: new RegExp(`.*--fe::FacetSection::${section}-anchor$`), + actions: new Press() + }); + } + }, assertions: {} }; diff --git a/packages/fiori-elements-writer/test/__snapshots__/lrop.test.ts.snap b/packages/fiori-elements-writer/test/__snapshots__/lrop.test.ts.snap index c7f1e170129..1e2f1e55a96 100644 --- a/packages/fiori-elements-writer/test/__snapshots__/lrop.test.ts.snap +++ b/packages/fiori-elements-writer/test/__snapshots__/lrop.test.ts.snap @@ -19148,6 +19148,8 @@ sap.ui.define([ + + opaTest(\\"Navigate to ObjectPage\\", function (Given, When, Then) { // Note: this test will fail if the ListReport page doesn't show any data @@ -23220,11 +23222,12 @@ sap.ui.define([ // Then.onTheTravelListGenerated.onTable().iPressAction(\\"Set Cancel Date to Tomorrow\\"); Then.onTheTravelListGenerated.onTable().iCheckAction(\\"Set Cancel Date to Tomorrow\\", { enabled: false }); Then.onTheTravelListGenerated.onTable().iCheckColumns(undefined, {\\"TravelID\\":{\\"header\\":\\"Travel ID\\"},\\"AgencyID\\":{\\"header\\":\\"Agency ID\\"},\\"CustomerID\\":{\\"header\\":\\"Customer ID\\"},\\"BeginDate\\":{\\"header\\":\\"Starting Date\\"},\\"EndDate\\":{\\"header\\":\\"End Date\\"},\\"BookingFee\\":{\\"header\\":\\"Booking Fee\\"},\\"TotalPrice\\":{\\"header\\":\\"Total Price\\"},\\"LatestCancellationDate\\":{\\"header\\":\\"Latest Cancellation Date\\"},\\"Memo\\":{\\"header\\":\\"Description\\"},\\"Status\\":{\\"header\\":\\"Travel Status\\"}}); - }); + + opaTest(\\"Navigate to ObjectPage\\", function (Given, When, Then) { // Note: this test will fail if the ListReport page doesn't show any data @@ -26792,6 +26795,8 @@ sap.ui.define([ + + opaTest(\\"Navigate to ObjectPage\\", function (Given, When, Then) { // Note: this test will fail if the ListReport page doesn't show any data diff --git a/packages/ui5-test-writer/templates/v4/integration/ObjectPageJourney.js b/packages/ui5-test-writer/templates/v4/integration/ObjectPageJourney.js index ca5097e68b1..01c816ff568 100644 --- a/packages/ui5-test-writer/templates/v4/integration/ObjectPageJourney.js +++ b/packages/ui5-test-writer/templates/v4/integration/ObjectPageJourney.js @@ -44,7 +44,7 @@ sap.ui.define([ <% if (editButton?.visible) { -%> // Ensure the opened entity is not in Draft state before uncommenting // Then.onThe<%- name%>Generated.onHeader().iCheckEdit({ visible: true }); - // When.onThe<%- name%>Generated.onHeader().iExecuteEdit(); + // When.onThe<%- name%>Generated.onHeader().iPressEdit(); <% } -%> <% headerActions.forEach(function(action) { -%> <% if (action.visible) { -%> @@ -86,9 +86,13 @@ sap.ui.define([ <% if (bodySections?.length > 0) { -%> opaTest("Check body sections of the Object Page", function (Given, When, Then) { +<% if (bodySections?.length > 1) { -%> Then.onThe<%- name%>Generated.iCheckNumberOfSections(<%- bodySections.length %>); +<% } -%> <% bodySections.forEach(function(section) { -%> - When.onThe<%- name%>Generated.iGoToSection({ section: "<%- section.id %>" }); +<% if (bodySections.length > 1) { -%> + When.onThe<%- name%>Generated.iPressSectionIconTabFilterButton("<%- section.id %>"); +<% } -%> Then.onThe<%- name%>Generated.iCheckSection({ section: "<%- section.id %>" }); <% if (section.actions && section.actions.length > 0) { -%> <% section.actions.forEach(function(action) { -%> @@ -127,7 +131,7 @@ sap.ui.define([ <% } -%> <% if (section?.subSections?.length > 0) { -%> <% section.subSections.forEach(function(subSection) { -%> - When.onThe<%- name%>Generated.iGoToSection({ section: "<%- section.id %>", subSection: "<%- subSection.id %>" }); + //When.onThe<%- name%>Generated.iGoToSection({ section: "<%- section.id %>", subSection: "<%- subSection.id %>" }); Then.onThe<%- name%>Generated.iCheckSubSection({ section: "<%- subSection.id %>" }); <% if (subSection.fields && subSection.fields.length > 0) { -%> <% subSection.fields.forEach(function(field) { -%> diff --git a/packages/ui5-test-writer/templates/v4/integration/ObjectPageJourney.ts b/packages/ui5-test-writer/templates/v4/integration/ObjectPageJourney.ts index 1c7e1db08ef..290725f3d51 100644 --- a/packages/ui5-test-writer/templates/v4/integration/ObjectPageJourney.ts +++ b/packages/ui5-test-writer/templates/v4/integration/ObjectPageJourney.ts @@ -63,7 +63,7 @@ function journey() { <% if (editButton?.visible) { -%> // Ensure the opened entity is not in Draft state before uncommenting // Then.onThe<%- name%>Generated.onHeader().iCheckEdit({ visible: true }); - // When.onThe<%- name%>Generated.onHeader().iExecuteEdit(); + // When.onThe<%- name%>Generated.onHeader().iPressEdit(); <% } -%> <% headerActions.forEach(function(action) { -%> <% if (action.visible) { -%> @@ -104,10 +104,14 @@ function journey() { <% } -%> <% if (bodySections?.length > 0) { -%> - opaTest("Check body sections of the Object Page", function (_Given: Given, When: When, Then: Then) { + opaTest("Check body sections of the Object Page", function (_Given: Given, <% if (bodySections?.length > 1) { %>When: When<% } else { %>_When: When<% } %>, Then: Then) { +<% if (bodySections?.length > 1) { -%> Then.onThe<%- name%>Generated.iCheckNumberOfSections(<%- bodySections.length %>); +<% } -%> <% bodySections.forEach(function(section) { -%> - When.onThe<%- name%>Generated.iGoToSection({ section: "<%- section.id %>" }); +<% if (bodySections.length > 1) { -%> + When.onThe<%- name%>Generated.iPressSectionIconTabFilterButton("<%- section.id %>"); +<% } -%> Then.onThe<%- name%>Generated.iCheckSection({ section: "<%- section.id %>" }, {}); <% if (section.actions && section.actions.length > 0) { -%> <% section.actions.forEach(function(action) { -%> @@ -146,7 +150,7 @@ function journey() { <% } -%> <% if (section?.subSections?.length > 0) { -%> <% section.subSections.forEach(function(subSection) { -%> - When.onThe<%- name%>Generated.iGoToSection({ section: "<%- section.id %>", subSection: "<%- subSection.id %>" }); + //When.onThe<%- name%>Generated.iGoToSection({ section: "<%- section.id %>", subSection: "<%- subSection.id %>" }); Then.onThe<%- name%>Generated.iCheckSubSection({ section: "<%- subSection.id %>" }); <% if (subSection.fields && subSection.fields.length > 0) { -%> <% subSection.fields.forEach(function(field) { -%> diff --git a/packages/ui5-test-writer/templates/v4/integration/pages/ObjectPage.js b/packages/ui5-test-writer/templates/v4/integration/pages/ObjectPage.js index 89c6b4757bb..07e36a9bcbc 100644 --- a/packages/ui5-test-writer/templates/v4/integration/pages/ObjectPage.js +++ b/packages/ui5-test-writer/templates/v4/integration/pages/ObjectPage.js @@ -15,11 +15,18 @@ * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { +sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { 'use strict'; var CustomPageDefinitions = { - actions: {}, + actions: { + iPressSectionIconTabFilterButton: function (section) { + return this.waitFor({ + id: new RegExp(`.*--fe::FacetSection::${section}-anchor$`), + actions: new Press() + }); + } + }, assertions: {} }; diff --git a/packages/ui5-test-writer/test/test-input/fin.test.v4.lr1 b/packages/ui5-test-writer/test/test-input/fin.test.v4.lr1 new file mode 160000 index 00000000000..2556a6e75ab --- /dev/null +++ b/packages/ui5-test-writer/test/test-input/fin.test.v4.lr1 @@ -0,0 +1 @@ +Subproject commit 2556a6e75abda82f4d44f0380317eee1e6833547 diff --git a/packages/ui5-test-writer/test/unit/__snapshots__/fiori-elements.test.ts.snap b/packages/ui5-test-writer/test/unit/__snapshots__/fiori-elements.test.ts.snap index 70a4271bd15..fa4b0f388ab 100644 --- a/packages/ui5-test-writer/test/unit/__snapshots__/fiori-elements.test.ts.snap +++ b/packages/ui5-test-writer/test/unit/__snapshots__/fiori-elements.test.ts.snap @@ -354,11 +354,18 @@ sap.ui.define(['sap/fe/test/ListReport'], function(ListReport) { * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { +sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { 'use strict'; var CustomPageDefinitions = { - actions: {}, + actions: { + iPressSectionIconTabFilterButton: function (section) { + return this.waitFor({ + id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), + actions: new Press() + }); + } + }, assertions: {} }; @@ -780,11 +787,18 @@ sap.ui.define(['sap/fe/test/ListReport'], function(ListReport) { * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { +sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { 'use strict'; var CustomPageDefinitions = { - actions: {}, + actions: { + iPressSectionIconTabFilterButton: function (section) { + return this.waitFor({ + id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), + actions: new Press() + }); + } + }, assertions: {} }; @@ -1183,11 +1197,18 @@ sap.ui.define(['sap/fe/test/ListReport'], function(ListReport) { * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { +sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { 'use strict'; var CustomPageDefinitions = { - actions: {}, + actions: { + iPressSectionIconTabFilterButton: function (section) { + return this.waitFor({ + id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), + actions: new Press() + }); + } + }, assertions: {} }; @@ -1586,11 +1607,18 @@ sap.ui.define(['sap/fe/test/ListReport'], function(ListReport) { * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { +sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { 'use strict'; var CustomPageDefinitions = { - actions: {}, + actions: { + iPressSectionIconTabFilterButton: function (section) { + return this.waitFor({ + id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), + actions: new Press() + }); + } + }, assertions: {} }; @@ -2255,11 +2283,18 @@ sap.ui.require( * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { +sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { 'use strict'; var CustomPageDefinitions = { - actions: {}, + actions: { + iPressSectionIconTabFilterButton: function (section) { + return this.waitFor({ + id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), + actions: new Press() + }); + } + }, assertions: {} }; @@ -2589,11 +2624,18 @@ sap.ui.require( * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { +sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { 'use strict'; var CustomPageDefinitions = { - actions: {}, + actions: { + iPressSectionIconTabFilterButton: function (section) { + return this.waitFor({ + id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), + actions: new Press() + }); + } + }, assertions: {} }; @@ -3033,11 +3075,18 @@ sap.ui.define(['sap/fe/test/ListReport'], function(ListReport) { * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { +sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { 'use strict'; var CustomPageDefinitions = { - actions: {}, + actions: { + iPressSectionIconTabFilterButton: function (section) { + return this.waitFor({ + id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), + actions: new Press() + }); + } + }, assertions: {} }; @@ -3097,11 +3146,18 @@ sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { +sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { 'use strict'; var CustomPageDefinitions = { - actions: {}, + actions: { + iPressSectionIconTabFilterButton: function (section) { + return this.waitFor({ + id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), + actions: new Press() + }); + } + }, assertions: {} }; @@ -3134,11 +3190,18 @@ sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { +sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { 'use strict'; var CustomPageDefinitions = { - actions: {}, + actions: { + iPressSectionIconTabFilterButton: function (section) { + return this.waitFor({ + id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), + actions: new Press() + }); + } + }, assertions: {} }; @@ -3557,11 +3620,18 @@ sap.ui.define(['sap/fe/test/ListReport'], function(ListReport) { * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { +sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { 'use strict'; var CustomPageDefinitions = { - actions: {}, + actions: { + iPressSectionIconTabFilterButton: function (section) { + return this.waitFor({ + id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), + actions: new Press() + }); + } + }, assertions: {} }; @@ -3621,11 +3691,18 @@ sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { +sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { 'use strict'; var CustomPageDefinitions = { - actions: {}, + actions: { + iPressSectionIconTabFilterButton: function (section) { + return this.waitFor({ + id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), + actions: new Press() + }); + } + }, assertions: {} }; @@ -3658,11 +3735,18 @@ sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { +sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { 'use strict'; var CustomPageDefinitions = { - actions: {}, + actions: { + iPressSectionIconTabFilterButton: function (section) { + return this.waitFor({ + id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), + actions: new Press() + }); + } + }, assertions: {} }; @@ -4093,11 +4177,18 @@ sap.ui.define(['sap/fe/test/ListReport'], function(ListReport) { * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { +sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { 'use strict'; var CustomPageDefinitions = { - actions: {}, + actions: { + iPressSectionIconTabFilterButton: function (section) { + return this.waitFor({ + id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), + actions: new Press() + }); + } + }, assertions: {} }; @@ -5946,11 +6037,18 @@ sap.ui.define(['sap/fe/test/ListReport'], function(ListReport) { * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { +sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { 'use strict'; var CustomPageDefinitions = { - actions: {}, + actions: { + iPressSectionIconTabFilterButton: function (section) { + return this.waitFor({ + id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), + actions: new Press() + }); + } + }, assertions: {} }; @@ -7640,11 +7738,18 @@ sap.ui.define(['sap/fe/test/ListReport'], function(ListReport) { * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { +sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { 'use strict'; var CustomPageDefinitions = { - actions: {}, + actions: { + iPressSectionIconTabFilterButton: function (section) { + return this.waitFor({ + id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), + actions: new Press() + }); + } + }, assertions: {} }; @@ -9461,11 +9566,18 @@ sap.ui.define(['sap/fe/test/ListReport'], function(ListReport) { * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { +sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { 'use strict'; var CustomPageDefinitions = { - actions: {}, + actions: { + iPressSectionIconTabFilterButton: function (section) { + return this.waitFor({ + id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), + actions: new Press() + }); + } + }, assertions: {} }; @@ -11288,11 +11400,18 @@ sap.ui.define(['sap/fe/test/ListReport'], function(ListReport) { * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { +sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { 'use strict'; var CustomPageDefinitions = { - actions: {}, + actions: { + iPressSectionIconTabFilterButton: function (section) { + return this.waitFor({ + id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), + actions: new Press() + }); + } + }, assertions: {} }; @@ -11600,11 +11719,18 @@ sap.ui.require( * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { +sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { 'use strict'; var CustomPageDefinitions = { - actions: {}, + actions: { + iPressSectionIconTabFilterButton: function (section) { + return this.waitFor({ + id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), + actions: new Press() + }); + } + }, assertions: {} }; @@ -11979,7 +12105,17 @@ export default class ListReport { "state": "modified", }, "webapp/test/integration/pages/EmployeesObjectPage.gen.ts": Object { - "contents": "export const actions = {}; + "contents": "import type Opa5 from \\"sap/ui/test/Opa5\\"; +import Press from \\"sap/ui/test/actions/Press\\"; + +export const actions = { + iPressSectionIconTabFilterButton(this: Opa5, section: string) { + return this.waitFor({ + id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), + actions: new Press() + }); + } +}; export const assertions = {}; @@ -12371,7 +12507,17 @@ export default class ListReport { "state": "modified", }, "webapp/test/integration/pages/EmployeesObjectPage.gen.ts": Object { - "contents": "export const actions = {}; + "contents": "import type Opa5 from \\"sap/ui/test/Opa5\\"; +import Press from \\"sap/ui/test/actions/Press\\"; + +export const actions = { + iPressSectionIconTabFilterButton(this: Opa5, section: string) { + return this.waitFor({ + id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), + actions: new Press() + }); + } +}; export const assertions = {}; @@ -12763,7 +12909,17 @@ export default class ListReport { "state": "modified", }, "webapp/test/integration/pages/EmployeesObjectPage.gen.ts": Object { - "contents": "export const actions = {}; + "contents": "import type Opa5 from \\"sap/ui/test/Opa5\\"; +import Press from \\"sap/ui/test/actions/Press\\"; + +export const actions = { + iPressSectionIconTabFilterButton(this: Opa5, section: string) { + return this.waitFor({ + id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), + actions: new Press() + }); + } +}; export const assertions = {}; @@ -13538,7 +13694,17 @@ export default class ListReport { "state": "modified", }, "webapp/test/integration/pages/EmployeesObjectPage.gen.ts": Object { - "contents": "export const actions = {}; + "contents": "import type Opa5 from \\"sap/ui/test/Opa5\\"; +import Press from \\"sap/ui/test/actions/Press\\"; + +export const actions = { + iPressSectionIconTabFilterButton(this: Opa5, section: string) { + return this.waitFor({ + id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), + actions: new Press() + }); + } +}; export const assertions = {}; @@ -13602,7 +13768,17 @@ export default runner; "state": "modified", }, "webapp/test/integration/pages/PositionsObjectPage.gen.ts": Object { - "contents": "export const actions = {}; + "contents": "import type Opa5 from \\"sap/ui/test/Opa5\\"; +import Press from \\"sap/ui/test/actions/Press\\"; + +export const actions = { + iPressSectionIconTabFilterButton(this: Opa5, section: string) { + return this.waitFor({ + id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), + actions: new Press() + }); + } +}; export const assertions = {}; @@ -13614,7 +13790,17 @@ export default class ObjectPage { "state": "modified", }, "webapp/test/integration/pages/TrainingsObjectPage.gen.ts": Object { - "contents": "export const actions = {}; + "contents": "import type Opa5 from \\"sap/ui/test/Opa5\\"; +import Press from \\"sap/ui/test/actions/Press\\"; + +export const actions = { + iPressSectionIconTabFilterButton(this: Opa5, section: string) { + return this.waitFor({ + id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), + actions: new Press() + }); + } +}; export const assertions = {}; @@ -15516,11 +15702,18 @@ sap.ui.define(['sap/fe/test/ListReport'], function(ListReport) { * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { +sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { 'use strict'; var CustomPageDefinitions = { - actions: {}, + actions: { + iPressSectionIconTabFilterButton: function (section) { + return this.waitFor({ + id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), + actions: new Press() + }); + } + }, assertions: {} }; @@ -17379,11 +17572,18 @@ sap.ui.define(['sap/fe/test/ListReport'], function(ListReport) { * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { +sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { 'use strict'; var CustomPageDefinitions = { - actions: {}, + actions: { + iPressSectionIconTabFilterButton: function (section) { + return this.waitFor({ + id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), + actions: new Press() + }); + } + }, assertions: {} }; @@ -19236,11 +19436,18 @@ sap.ui.define(['sap/fe/test/ListReport'], function(ListReport) { * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { +sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { 'use strict'; var CustomPageDefinitions = { - actions: {}, + actions: { + iPressSectionIconTabFilterButton: function (section) { + return this.waitFor({ + id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), + actions: new Press() + }); + } + }, assertions: {} }; @@ -21357,11 +21564,18 @@ sap.ui.define(['sap/fe/test/ListReport'], function(ListReport) { * ╚═══════════════════════════════════════════════════════════════════════╝ * ******************************************************************************/ -sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) { +sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) { 'use strict'; var CustomPageDefinitions = { - actions: {}, + actions: { + iPressSectionIconTabFilterButton: function (section) { + return this.waitFor({ + id: new RegExp(\`.*--fe::FacetSection::\${section}-anchor$\`), + actions: new Press() + }); + } + }, assertions: {} }; diff --git a/packages/ui5-test-writer/test/unit/fiori-elements.test.ts b/packages/ui5-test-writer/test/unit/fiori-elements.test.ts index fa212a0d49d..647d54b3cf2 100644 --- a/packages/ui5-test-writer/test/unit/fiori-elements.test.ts +++ b/packages/ui5-test-writer/test/unit/fiori-elements.test.ts @@ -760,20 +760,19 @@ export type Then = Opa5 & BaseArrangements & { expect(bookingObjPageJourneyContent).toContain('iCheckMicroChart("Supplement Price")'); expect(bookingObjPageJourneyContent).toContain('onHeader().iCheckAction("Activate", { enabled: false })'); expect(bookingObjPageJourneyContent).toContain('iCheckNumberOfSections(3)'); - expect(bookingObjPageJourneyContent).not.toContain('iPressSectionIconTabFilterButton'); - expect(bookingObjPageJourneyContent).toContain('iGoToSection({ section: "BookingDetails" })'); + expect(bookingObjPageJourneyContent).toContain('iPressSectionIconTabFilterButton("BookingDetails")'); expect(bookingObjPageJourneyContent).toContain('iCheckSection({ section: "BookingDetails" })'); expect(bookingObjPageJourneyContent).toContain( 'iGoToSection({ section: "BookingDetails", subSection: "BookingData" })' ); expect(bookingObjPageJourneyContent).toContain('iCheckSubSection({ section: "BookingData" })'); expect(bookingObjPageJourneyContent).toContain('iCheckSubSection({ section: "AdministrativeData" })'); - expect(bookingObjPageJourneyContent).toContain('iGoToSection({ section: "FlightData" })'); + expect(bookingObjPageJourneyContent).toContain('iPressSectionIconTabFilterButton("FlightData")'); expect(bookingObjPageJourneyContent).toContain('iCheckSection({ section: "FlightData" })'); expect(bookingObjPageJourneyContent).toContain( '.iCheckAction("Deduct Discount" /* , { enabled: true } */)' ); - expect(bookingObjPageJourneyContent).toContain('iGoToSection({ section: "PriceData" })'); + expect(bookingObjPageJourneyContent).toContain('iPressSectionIconTabFilterButton("PriceData")'); expect(bookingObjPageJourneyContent).toContain('iCheckSection({ section: "PriceData" })'); expect(bookingObjPageJourneyContent).toContain( 'onTable({ property: "_BookSupplement" }).iCheckAction("Create Template", { enabled: true })' @@ -943,11 +942,13 @@ export type Then = Opa5 & BaseArrangements & { expect(opPagePath).toBeDefined(); const opContent = dumped[opPagePath!].contents as string; + expect(opContent).toContain('import type Opa5 from "sap/ui/test/Opa5"'); + expect(opContent).toContain('import Press from "sap/ui/test/actions/Press"'); expect(opContent).toContain('export const actions'); expect(opContent).toContain('export const assertions'); expect(opContent).toContain('export default class ObjectPage'); - expect(opContent).not.toContain('iPressSectionIconTabFilterButton'); - expect(opContent).not.toContain('sap/ui/test/actions/Press'); + expect(opContent).toContain('iPressSectionIconTabFilterButton'); + expect(opContent).toContain('this: Opa5'); expect(opContent).not.toContain('sap/fe/test/ObjectPage'); }); @@ -1164,15 +1165,14 @@ export type Then = Opa5 & BaseArrangements & { // ─── Section navigation ─── expect(content).toContain('iCheckNumberOfSections(3)'); - expect(content).not.toContain('iPressSectionIconTabFilterButton'); - expect(content).toContain('iGoToSection({ section: "BookingDetails" })'); + expect(content).toContain('iPressSectionIconTabFilterButton("BookingDetails")'); expect(content).toContain('iCheckSection({ section: "BookingDetails" }, {})'); expect(content).toContain('iGoToSection({ section: "BookingDetails", subSection: "BookingData" })'); expect(content).toContain('iCheckSubSection({ section: "BookingData" })'); expect(content).toContain('iCheckSubSection({ section: "AdministrativeData" })'); - expect(content).toContain('iGoToSection({ section: "FlightData" })'); + expect(content).toContain('iPressSectionIconTabFilterButton("FlightData")'); expect(content).toContain('iCheckSection({ section: "FlightData" }, {})'); - expect(content).toContain('iGoToSection({ section: "PriceData" })'); + expect(content).toContain('iPressSectionIconTabFilterButton("PriceData")'); expect(content).toContain('iCheckSection({ section: "PriceData" }, {})'); // ─── Header Contact Card (OP-8) ─── From e36468f2ead0b19e57c37ac0d66f49aeb36d80a0 Mon Sep 17 00:00:00 2001 From: I334706 Date: Tue, 23 Jun 2026 15:07:45 +0200 Subject: [PATCH 09/18] chore: remove accidentally embedded local test fixture --- packages/ui5-test-writer/test/test-input/fin.test.v4.lr1 | 1 - 1 file changed, 1 deletion(-) delete mode 160000 packages/ui5-test-writer/test/test-input/fin.test.v4.lr1 diff --git a/packages/ui5-test-writer/test/test-input/fin.test.v4.lr1 b/packages/ui5-test-writer/test/test-input/fin.test.v4.lr1 deleted file mode 160000 index 2556a6e75ab..00000000000 --- a/packages/ui5-test-writer/test/test-input/fin.test.v4.lr1 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2556a6e75abda82f4d44f0380317eee1e6833547 From d2496e35e0357ed0e2b52c1faeebebf0639b1434 Mon Sep 17 00:00:00 2001 From: I334706 Date: Wed, 24 Jun 2026 08:11:17 +0200 Subject: [PATCH 10/18] fix(ui5-test-writer): preserve blank-line spacing in ListReportJourney contact-card block --- .../SalesOrderItemListJourney.gen.js | 3 +- .../test/integration/TravelListJourney.gen.js | 3 +- .../test/integration/TravelListJourney.gen.js | 3 +- .../test/__snapshots__/lrop.test.ts.snap | 7 +- .../v4/integration/ListReportJourney.js | 5 +- .../v4/integration/ListReportJourney.ts | 5 +- .../__snapshots__/fiori-elements.test.ts.snap | 290 ++++++++++++++++-- 7 files changed, 276 insertions(+), 40 deletions(-) diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/SalesOrderItemListJourney.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/SalesOrderItemListJourney.gen.js index 49fa5fcafed..c507c68f322 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/SalesOrderItemListJourney.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/SalesOrderItemListJourney.gen.js @@ -46,9 +46,8 @@ sap.ui.define([ // Then.onTheSalesOrderItemListGenerated.onTable().iPressAction("Dummy Bound Action"); Then.onTheSalesOrderItemListGenerated.onTable().iCheckAction("Dummy Bound Action", { enabled: false }); Then.onTheSalesOrderItemListGenerated.onTable().iCheckColumns(undefined, {"SalesOrderItem":{"header":"Item"},"HigherLevelItem":{"header":"Higher-Level Item"},"Material":{"header":"Material"},"RequestedQuantity":{"header":"Requested Quantity"},"SalesOrderItemCategory":{"header":"Item Category"},"RequestedDeliveryDate":{"header":"Delivery Date"},"NetAmount":{"header":"Net Value"},"_Material/Material":{"header":"Material"},"isVerified":{"header":"Verified Material"},"_ReferencedSalesOrder/SalesOrder":{"header":"Referenced Sales Order"},"DataFieldForAction::com.c_salesordermanage_sd_aggregate.DummyBoundAction":{"header":"Bound Action"},"DataFieldForIntentBasedNavigation::SalesOrder::manageInline::RequiresContext":{"header":"IBN"}}); - }); - + }); diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/TravelListJourney.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/TravelListJourney.gen.js index 8657e76d125..0de78811e45 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/TravelListJourney.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/lrop_v4/webapp/test/integration/TravelListJourney.gen.js @@ -63,9 +63,8 @@ sap.ui.define([ // Then.onTheTravelListGenerated.onTable().iPressAction("Set Cancel Date to Tomorrow"); Then.onTheTravelListGenerated.onTable().iCheckAction("Set Cancel Date to Tomorrow", { enabled: false }); Then.onTheTravelListGenerated.onTable().iCheckColumns(undefined, {"TravelID":{"header":"Travel ID"},"AgencyID":{"header":"Agency ID"},"CustomerID":{"header":"Customer ID"},"BeginDate":{"header":"Starting Date"},"EndDate":{"header":"End Date"},"BookingFee":{"header":"Booking Fee"},"TotalPrice":{"header":"Total Price"},"LatestCancellationDate":{"header":"Latest Cancellation Date"},"Memo":{"header":"Description"},"Status":{"header":"Travel Status"}}); - }); - + }); diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/TravelListJourney.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/TravelListJourney.gen.js index 2e7448a6190..f61827af67c 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/TravelListJourney.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/worklist_v4/webapp/test/integration/TravelListJourney.gen.js @@ -58,9 +58,8 @@ sap.ui.define([ // Then.onTheTravelListGenerated.onTable().iPressAction("Set Cancel Date to Tomorrow"); Then.onTheTravelListGenerated.onTable().iCheckAction("Set Cancel Date to Tomorrow", { enabled: false }); Then.onTheTravelListGenerated.onTable().iCheckColumns(undefined, {"TravelID":{"header":"Travel ID"},"AgencyID":{"header":"Agency ID"},"CustomerID":{"header":"Customer ID"},"BeginDate":{"header":"Starting Date"},"EndDate":{"header":"End Date"},"BookingFee":{"header":"Booking Fee"},"TotalPrice":{"header":"Total Price"},"LatestCancellationDate":{"header":"Latest Cancellation Date"},"Memo":{"header":"Description"},"Status":{"header":"Travel Status"}}); - }); - + }); diff --git a/packages/fiori-elements-writer/test/__snapshots__/lrop.test.ts.snap b/packages/fiori-elements-writer/test/__snapshots__/lrop.test.ts.snap index 1e2f1e55a96..c7f1e170129 100644 --- a/packages/fiori-elements-writer/test/__snapshots__/lrop.test.ts.snap +++ b/packages/fiori-elements-writer/test/__snapshots__/lrop.test.ts.snap @@ -19148,8 +19148,6 @@ sap.ui.define([ - - opaTest(\\"Navigate to ObjectPage\\", function (Given, When, Then) { // Note: this test will fail if the ListReport page doesn't show any data @@ -23222,9 +23220,8 @@ sap.ui.define([ // Then.onTheTravelListGenerated.onTable().iPressAction(\\"Set Cancel Date to Tomorrow\\"); Then.onTheTravelListGenerated.onTable().iCheckAction(\\"Set Cancel Date to Tomorrow\\", { enabled: false }); Then.onTheTravelListGenerated.onTable().iCheckColumns(undefined, {\\"TravelID\\":{\\"header\\":\\"Travel ID\\"},\\"AgencyID\\":{\\"header\\":\\"Agency ID\\"},\\"CustomerID\\":{\\"header\\":\\"Customer ID\\"},\\"BeginDate\\":{\\"header\\":\\"Starting Date\\"},\\"EndDate\\":{\\"header\\":\\"End Date\\"},\\"BookingFee\\":{\\"header\\":\\"Booking Fee\\"},\\"TotalPrice\\":{\\"header\\":\\"Total Price\\"},\\"LatestCancellationDate\\":{\\"header\\":\\"Latest Cancellation Date\\"},\\"Memo\\":{\\"header\\":\\"Description\\"},\\"Status\\":{\\"header\\":\\"Travel Status\\"}}); - }); - + }); @@ -26795,8 +26792,6 @@ sap.ui.define([ - - opaTest(\\"Navigate to ObjectPage\\", function (Given, When, Then) { // Note: this test will fail if the ListReport page doesn't show any data diff --git a/packages/ui5-test-writer/templates/v4/integration/ListReportJourney.js b/packages/ui5-test-writer/templates/v4/integration/ListReportJourney.js index f386db06843..68375679797 100644 --- a/packages/ui5-test-writer/templates/v4/integration/ListReportJourney.js +++ b/packages/ui5-test-writer/templates/v4/integration/ListReportJourney.js @@ -85,7 +85,7 @@ sap.ui.define([ <%_ } -%> <%_ if (tableColumns && Object.keys(tableColumns).length > 0) { -%> Then.onThe<%- startLR %>Generated.onTable().iCheckColumns(undefined, <%- JSON.stringify(tableColumns) %>); - <%_ } _%> + <%_ } %> }); <%_ } %> @@ -97,8 +97,7 @@ sap.ui.define([ Then.onThe<%- startLR %>Generated.onDialog().iCheckContactDialog({ controlType: "sap.ui.mdc.link.Panel" }); <%_ }); -%> }); -<%_ } %> - +<%_ } -%> <% if (startLR) { %> opaTest("Navigate to ObjectPage", function (Given, When, Then) { // Note: this test will fail if the ListReport page doesn't show any data diff --git a/packages/ui5-test-writer/templates/v4/integration/ListReportJourney.ts b/packages/ui5-test-writer/templates/v4/integration/ListReportJourney.ts index da9b165bc3c..5285a7b8a4f 100644 --- a/packages/ui5-test-writer/templates/v4/integration/ListReportJourney.ts +++ b/packages/ui5-test-writer/templates/v4/integration/ListReportJourney.ts @@ -91,7 +91,7 @@ function journey() { <%_ } -%> <%_ if (tableColumns && Object.keys(tableColumns).length > 0) { -%> Then.onThe<%- startLR %>Generated.onTable("").iCheckColumns(undefined, <%- JSON.stringify(tableColumns) %>); - <%_ } _%> + <%_ } %> }); <%_ } %> @@ -103,8 +103,7 @@ function journey() { Then.onThe<%- startLR %>Generated.onDialog().iCheckContactDialog({ controlType: "sap.ui.mdc.link.Panel" }); <%_ }); -%> }); -<%_ } %> - +<%_ } -%> <% if (startLR) { %> opaTest("Navigate to ObjectPage", function (_Given: Given, When: When, Then: Then) { // Note: this test will fail if the ListReport page doesn't show any data diff --git a/packages/ui5-test-writer/test/unit/__snapshots__/fiori-elements.test.ts.snap b/packages/ui5-test-writer/test/unit/__snapshots__/fiori-elements.test.ts.snap index fa4b0f388ab..cb406d8d866 100644 --- a/packages/ui5-test-writer/test/unit/__snapshots__/fiori-elements.test.ts.snap +++ b/packages/ui5-test-writer/test/unit/__snapshots__/fiori-elements.test.ts.snap @@ -12093,7 +12093,24 @@ sap.ui.require( "state": "modified", }, "webapp/test/integration/pages/EmployeesList.gen.ts": Object { - "contents": "export const actions = {}; + "contents": "/****************************************************************************** + * ╔═══════════════════════════════════════════════════════════════════════╗ * + * ║ ║ * + * ║ WARNING: AUTO-GENERATED FILE ║ * + * ║ ║ * + * ║ This file is automatically generated by SAP Fiori tools and is ║ * + * ║ overwritten when you run the OPA test generator again. ║ * + * ║ ║ * + * ║ To add your own custom pages: ║ * + * ║ - Create a new page file in this directory. ║ * + * ║ - Follow the same pattern as this file. ║ * + * ║ - Add the new file to the JourneyRunner. ║ * + * ║ - Custom page files are not overwritten. ║ * + * ║ ║ * + * ╚═══════════════════════════════════════════════════════════════════════╝ * + ******************************************************************************/ + +export const actions = {}; export const assertions = {}; @@ -12105,7 +12122,24 @@ export default class ListReport { "state": "modified", }, "webapp/test/integration/pages/EmployeesObjectPage.gen.ts": Object { - "contents": "import type Opa5 from \\"sap/ui/test/Opa5\\"; + "contents": "/****************************************************************************** + * ╔═══════════════════════════════════════════════════════════════════════╗ * + * ║ ║ * + * ║ WARNING: AUTO-GENERATED FILE ║ * + * ║ ║ * + * ║ This file is automatically generated by SAP Fiori tools and is ║ * + * ║ overwritten when you run the OPA test generator again. ║ * + * ║ ║ * + * ║ To add your own custom pages: ║ * + * ║ - Create a new page file in this directory. ║ * + * ║ - Follow the same pattern as this file. ║ * + * ║ - Add the new file to the JourneyRunner. ║ * + * ║ - Custom page files are not overwritten. ║ * + * ║ ║ * + * ╚═══════════════════════════════════════════════════════════════════════╝ * + ******************************************************************************/ + +import type Opa5 from \\"sap/ui/test/Opa5\\"; import Press from \\"sap/ui/test/actions/Press\\"; export const actions = { @@ -12161,7 +12195,20 @@ export default runner; "state": "modified", }, "webapp/test/integration/types/OpaJourneyTypes.d.ts": Object { - "contents": "import type Opa5 from \\"sap/ui/test/Opa5\\"; + "contents": "/****************************************************************************** + * ╔═══════════════════════════════════════════════════════════════════════╗ * + * ║ ║ * + * ║ WARNING: AUTO-GENERATED FILE ║ * + * ║ ║ * + * ║ This file is automatically generated by SAP Fiori tools and is ║ * + * ║ overwritten when you run the OPA test generator again. ║ * + * ║ ║ * + * ║ Do not edit this file directly. Any changes will be lost. ║ * + * ║ ║ * + * ╚═══════════════════════════════════════════════════════════════════════╝ * + ******************************************************************************/ + +import type Opa5 from \\"sap/ui/test/Opa5\\"; import type { actions as ListReportActions, assertions as ListReportAssertions } from \\"sap/fe/test/ListReport\\"; import type { actions as ObjectPageActions, assertions as ObjectPageAssertions } from \\"sap/fe/test/ObjectPage\\"; import type { actions as TemplatePageActions, assertions as TemplatePageAssertions } from \\"sap/fe/test/TemplatePage\\"; @@ -12495,7 +12542,24 @@ sap.ui.require( "state": "modified", }, "webapp/test/integration/pages/EmployeesList.gen.ts": Object { - "contents": "export const actions = {}; + "contents": "/****************************************************************************** + * ╔═══════════════════════════════════════════════════════════════════════╗ * + * ║ ║ * + * ║ WARNING: AUTO-GENERATED FILE ║ * + * ║ ║ * + * ║ This file is automatically generated by SAP Fiori tools and is ║ * + * ║ overwritten when you run the OPA test generator again. ║ * + * ║ ║ * + * ║ To add your own custom pages: ║ * + * ║ - Create a new page file in this directory. ║ * + * ║ - Follow the same pattern as this file. ║ * + * ║ - Add the new file to the JourneyRunner. ║ * + * ║ - Custom page files are not overwritten. ║ * + * ║ ║ * + * ╚═══════════════════════════════════════════════════════════════════════╝ * + ******************************************************************************/ + +export const actions = {}; export const assertions = {}; @@ -12507,7 +12571,24 @@ export default class ListReport { "state": "modified", }, "webapp/test/integration/pages/EmployeesObjectPage.gen.ts": Object { - "contents": "import type Opa5 from \\"sap/ui/test/Opa5\\"; + "contents": "/****************************************************************************** + * ╔═══════════════════════════════════════════════════════════════════════╗ * + * ║ ║ * + * ║ WARNING: AUTO-GENERATED FILE ║ * + * ║ ║ * + * ║ This file is automatically generated by SAP Fiori tools and is ║ * + * ║ overwritten when you run the OPA test generator again. ║ * + * ║ ║ * + * ║ To add your own custom pages: ║ * + * ║ - Create a new page file in this directory. ║ * + * ║ - Follow the same pattern as this file. ║ * + * ║ - Add the new file to the JourneyRunner. ║ * + * ║ - Custom page files are not overwritten. ║ * + * ║ ║ * + * ╚═══════════════════════════════════════════════════════════════════════╝ * + ******************************************************************************/ + +import type Opa5 from \\"sap/ui/test/Opa5\\"; import Press from \\"sap/ui/test/actions/Press\\"; export const actions = { @@ -12563,7 +12644,20 @@ export default runner; "state": "modified", }, "webapp/test/integration/types/OpaJourneyTypes.d.ts": Object { - "contents": "import type Opa5 from \\"sap/ui/test/Opa5\\"; + "contents": "/****************************************************************************** + * ╔═══════════════════════════════════════════════════════════════════════╗ * + * ║ ║ * + * ║ WARNING: AUTO-GENERATED FILE ║ * + * ║ ║ * + * ║ This file is automatically generated by SAP Fiori tools and is ║ * + * ║ overwritten when you run the OPA test generator again. ║ * + * ║ ║ * + * ║ Do not edit this file directly. Any changes will be lost. ║ * + * ║ ║ * + * ╚═══════════════════════════════════════════════════════════════════════╝ * + ******************************************************************************/ + +import type Opa5 from \\"sap/ui/test/Opa5\\"; import type { actions as ListReportActions, assertions as ListReportAssertions } from \\"sap/fe/test/ListReport\\"; import type { actions as ObjectPageActions, assertions as ObjectPageAssertions } from \\"sap/fe/test/ObjectPage\\"; import type { actions as TemplatePageActions, assertions as TemplatePageAssertions } from \\"sap/fe/test/TemplatePage\\"; @@ -12897,7 +12991,24 @@ sap.ui.require( "state": "modified", }, "webapp/test/integration/pages/EmployeesList.gen.ts": Object { - "contents": "export const actions = {}; + "contents": "/****************************************************************************** + * ╔═══════════════════════════════════════════════════════════════════════╗ * + * ║ ║ * + * ║ WARNING: AUTO-GENERATED FILE ║ * + * ║ ║ * + * ║ This file is automatically generated by SAP Fiori tools and is ║ * + * ║ overwritten when you run the OPA test generator again. ║ * + * ║ ║ * + * ║ To add your own custom pages: ║ * + * ║ - Create a new page file in this directory. ║ * + * ║ - Follow the same pattern as this file. ║ * + * ║ - Add the new file to the JourneyRunner. ║ * + * ║ - Custom page files are not overwritten. ║ * + * ║ ║ * + * ╚═══════════════════════════════════════════════════════════════════════╝ * + ******************************************************************************/ + +export const actions = {}; export const assertions = {}; @@ -12909,7 +13020,24 @@ export default class ListReport { "state": "modified", }, "webapp/test/integration/pages/EmployeesObjectPage.gen.ts": Object { - "contents": "import type Opa5 from \\"sap/ui/test/Opa5\\"; + "contents": "/****************************************************************************** + * ╔═══════════════════════════════════════════════════════════════════════╗ * + * ║ ║ * + * ║ WARNING: AUTO-GENERATED FILE ║ * + * ║ ║ * + * ║ This file is automatically generated by SAP Fiori tools and is ║ * + * ║ overwritten when you run the OPA test generator again. ║ * + * ║ ║ * + * ║ To add your own custom pages: ║ * + * ║ - Create a new page file in this directory. ║ * + * ║ - Follow the same pattern as this file. ║ * + * ║ - Add the new file to the JourneyRunner. ║ * + * ║ - Custom page files are not overwritten. ║ * + * ║ ║ * + * ╚═══════════════════════════════════════════════════════════════════════╝ * + ******************************************************************************/ + +import type Opa5 from \\"sap/ui/test/Opa5\\"; import Press from \\"sap/ui/test/actions/Press\\"; export const actions = { @@ -12965,7 +13093,20 @@ export default runner; "state": "modified", }, "webapp/test/integration/types/OpaJourneyTypes.d.ts": Object { - "contents": "import type Opa5 from \\"sap/ui/test/Opa5\\"; + "contents": "/****************************************************************************** + * ╔═══════════════════════════════════════════════════════════════════════╗ * + * ║ ║ * + * ║ WARNING: AUTO-GENERATED FILE ║ * + * ║ ║ * + * ║ This file is automatically generated by SAP Fiori tools and is ║ * + * ║ overwritten when you run the OPA test generator again. ║ * + * ║ ║ * + * ║ Do not edit this file directly. Any changes will be lost. ║ * + * ║ ║ * + * ╚═══════════════════════════════════════════════════════════════════════╝ * + ******************************************************************************/ + +import type Opa5 from \\"sap/ui/test/Opa5\\"; import type { actions as ListReportActions, assertions as ListReportAssertions } from \\"sap/fe/test/ListReport\\"; import type { actions as ObjectPageActions, assertions as ObjectPageAssertions } from \\"sap/fe/test/ObjectPage\\"; import type { actions as TemplatePageActions, assertions as TemplatePageAssertions } from \\"sap/fe/test/TemplatePage\\"; @@ -13273,7 +13414,24 @@ sap.ui.require( "state": "modified", }, "webapp/test/integration/pages/EmployeesList.gen.ts": Object { - "contents": "export const actions = {}; + "contents": "/****************************************************************************** + * ╔═══════════════════════════════════════════════════════════════════════╗ * + * ║ ║ * + * ║ WARNING: AUTO-GENERATED FILE ║ * + * ║ ║ * + * ║ This file is automatically generated by SAP Fiori tools and is ║ * + * ║ overwritten when you run the OPA test generator again. ║ * + * ║ ║ * + * ║ To add your own custom pages: ║ * + * ║ - Create a new page file in this directory. ║ * + * ║ - Follow the same pattern as this file. ║ * + * ║ - Add the new file to the JourneyRunner. ║ * + * ║ - Custom page files are not overwritten. ║ * + * ║ ║ * + * ╚═══════════════════════════════════════════════════════════════════════╝ * + ******************************************************************************/ + +export const actions = {}; export const assertions = {}; @@ -13309,7 +13467,20 @@ export default runner; "state": "modified", }, "webapp/test/integration/types/OpaJourneyTypes.d.ts": Object { - "contents": "import type Opa5 from \\"sap/ui/test/Opa5\\"; + "contents": "/****************************************************************************** + * ╔═══════════════════════════════════════════════════════════════════════╗ * + * ║ ║ * + * ║ WARNING: AUTO-GENERATED FILE ║ * + * ║ ║ * + * ║ This file is automatically generated by SAP Fiori tools and is ║ * + * ║ overwritten when you run the OPA test generator again. ║ * + * ║ ║ * + * ║ Do not edit this file directly. Any changes will be lost. ║ * + * ║ ║ * + * ╚═══════════════════════════════════════════════════════════════════════╝ * + ******************************************************************************/ + +import type Opa5 from \\"sap/ui/test/Opa5\\"; import type { actions as ListReportActions, assertions as ListReportAssertions } from \\"sap/fe/test/ListReport\\"; import type { actions as TemplatePageActions, assertions as TemplatePageAssertions } from \\"sap/fe/test/TemplatePage\\"; import type Shell from \\"sap/fe/test/Shell\\"; @@ -13682,7 +13853,24 @@ sap.ui.require( "state": "modified", }, "webapp/test/integration/pages/EmployeesList.gen.ts": Object { - "contents": "export const actions = {}; + "contents": "/****************************************************************************** + * ╔═══════════════════════════════════════════════════════════════════════╗ * + * ║ ║ * + * ║ WARNING: AUTO-GENERATED FILE ║ * + * ║ ║ * + * ║ This file is automatically generated by SAP Fiori tools and is ║ * + * ║ overwritten when you run the OPA test generator again. ║ * + * ║ ║ * + * ║ To add your own custom pages: ║ * + * ║ - Create a new page file in this directory. ║ * + * ║ - Follow the same pattern as this file. ║ * + * ║ - Add the new file to the JourneyRunner. ║ * + * ║ - Custom page files are not overwritten. ║ * + * ║ ║ * + * ╚═══════════════════════════════════════════════════════════════════════╝ * + ******************************************************************************/ + +export const actions = {}; export const assertions = {}; @@ -13694,7 +13882,24 @@ export default class ListReport { "state": "modified", }, "webapp/test/integration/pages/EmployeesObjectPage.gen.ts": Object { - "contents": "import type Opa5 from \\"sap/ui/test/Opa5\\"; + "contents": "/****************************************************************************** + * ╔═══════════════════════════════════════════════════════════════════════╗ * + * ║ ║ * + * ║ WARNING: AUTO-GENERATED FILE ║ * + * ║ ║ * + * ║ This file is automatically generated by SAP Fiori tools and is ║ * + * ║ overwritten when you run the OPA test generator again. ║ * + * ║ ║ * + * ║ To add your own custom pages: ║ * + * ║ - Create a new page file in this directory. ║ * + * ║ - Follow the same pattern as this file. ║ * + * ║ - Add the new file to the JourneyRunner. ║ * + * ║ - Custom page files are not overwritten. ║ * + * ║ ║ * + * ╚═══════════════════════════════════════════════════════════════════════╝ * + ******************************************************************************/ + +import type Opa5 from \\"sap/ui/test/Opa5\\"; import Press from \\"sap/ui/test/actions/Press\\"; export const actions = { @@ -13768,7 +13973,24 @@ export default runner; "state": "modified", }, "webapp/test/integration/pages/PositionsObjectPage.gen.ts": Object { - "contents": "import type Opa5 from \\"sap/ui/test/Opa5\\"; + "contents": "/****************************************************************************** + * ╔═══════════════════════════════════════════════════════════════════════╗ * + * ║ ║ * + * ║ WARNING: AUTO-GENERATED FILE ║ * + * ║ ║ * + * ║ This file is automatically generated by SAP Fiori tools and is ║ * + * ║ overwritten when you run the OPA test generator again. ║ * + * ║ ║ * + * ║ To add your own custom pages: ║ * + * ║ - Create a new page file in this directory. ║ * + * ║ - Follow the same pattern as this file. ║ * + * ║ - Add the new file to the JourneyRunner. ║ * + * ║ - Custom page files are not overwritten. ║ * + * ║ ║ * + * ╚═══════════════════════════════════════════════════════════════════════╝ * + ******************************************************************************/ + +import type Opa5 from \\"sap/ui/test/Opa5\\"; import Press from \\"sap/ui/test/actions/Press\\"; export const actions = { @@ -13790,7 +14012,24 @@ export default class ObjectPage { "state": "modified", }, "webapp/test/integration/pages/TrainingsObjectPage.gen.ts": Object { - "contents": "import type Opa5 from \\"sap/ui/test/Opa5\\"; + "contents": "/****************************************************************************** + * ╔═══════════════════════════════════════════════════════════════════════╗ * + * ║ ║ * + * ║ WARNING: AUTO-GENERATED FILE ║ * + * ║ ║ * + * ║ This file is automatically generated by SAP Fiori tools and is ║ * + * ║ overwritten when you run the OPA test generator again. ║ * + * ║ ║ * + * ║ To add your own custom pages: ║ * + * ║ - Create a new page file in this directory. ║ * + * ║ - Follow the same pattern as this file. ║ * + * ║ - Add the new file to the JourneyRunner. ║ * + * ║ - Custom page files are not overwritten. ║ * + * ║ ║ * + * ╚═══════════════════════════════════════════════════════════════════════╝ * + ******************************************************************************/ + +import type Opa5 from \\"sap/ui/test/Opa5\\"; import Press from \\"sap/ui/test/actions/Press\\"; export const actions = { @@ -13812,7 +14051,20 @@ export default class ObjectPage { "state": "modified", }, "webapp/test/integration/types/OpaJourneyTypes.d.ts": Object { - "contents": "import type Opa5 from \\"sap/ui/test/Opa5\\"; + "contents": "/****************************************************************************** + * ╔═══════════════════════════════════════════════════════════════════════╗ * + * ║ ║ * + * ║ WARNING: AUTO-GENERATED FILE ║ * + * ║ ║ * + * ║ This file is automatically generated by SAP Fiori tools and is ║ * + * ║ overwritten when you run the OPA test generator again. ║ * + * ║ ║ * + * ║ Do not edit this file directly. Any changes will be lost. ║ * + * ║ ║ * + * ╚═══════════════════════════════════════════════════════════════════════╝ * + ******************************************************************************/ + +import type Opa5 from \\"sap/ui/test/Opa5\\"; import type { actions as ListReportActions, assertions as ListReportAssertions } from \\"sap/fe/test/ListReport\\"; import type { actions as ObjectPageActions, assertions as ObjectPageAssertions } from \\"sap/fe/test/ObjectPage\\"; import type { actions as TemplatePageActions, assertions as TemplatePageAssertions } from \\"sap/fe/test/TemplatePage\\"; @@ -15536,8 +15788,6 @@ sap.ui.define([ - - opaTest(\\"Navigate to ObjectPage\\", function (Given, When, Then) { // Note: this test will fail if the ListReport page doesn't show any data @@ -17406,8 +17656,6 @@ sap.ui.define([ - - opaTest(\\"Navigate to ObjectPage\\", function (Given, When, Then) { // Note: this test will fail if the ListReport page doesn't show any data @@ -19272,8 +19520,6 @@ sap.ui.define([ - - opaTest(\\"Navigate to ObjectPage\\", function (Given, When, Then) { // Note: this test will fail if the ListReport page doesn't show any data From 2a7e789071e15ac3c74f81e0514bb1c7893b7f8c Mon Sep 17 00:00:00 2001 From: I334706 Date: Wed, 24 Jun 2026 15:31:01 +0200 Subject: [PATCH 11/18] test(fiori-app-sub-generator): refresh ALP v4 SalesOrderItem fixture The expected fixture lagged behind the test-writer output by two iCheckField lines for _ReferencedSalesOrder/SalesOrder and _ReferencedSalesOrderItem/SalesOrderItem. Pull in the current fixture version that matches the generator. --- .../test/integration/SalesOrderItemObjectPageJourney.gen.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/SalesOrderItemObjectPageJourney.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/SalesOrderItemObjectPageJourney.gen.js index e5e707f1ea0..c979491cfb2 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/SalesOrderItemObjectPageJourney.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/SalesOrderItemObjectPageJourney.gen.js @@ -48,10 +48,12 @@ sap.ui.define([ Then.onTheSalesOrderItemObjectPageGenerated.iCheckNumberOfSections(2); When.onTheSalesOrderItemObjectPageGenerated.iPressSectionIconTabFilterButton("Identification"); Then.onTheSalesOrderItemObjectPageGenerated.iCheckSection({ section: "Identification" }); + Then.onTheSalesOrderItemObjectPageGenerated.onForm({ section: "Identification" }).iCheckField({ property: "_ReferencedSalesOrder/SalesOrder" }); Then.onTheSalesOrderItemObjectPageGenerated.onForm({ section: "Identification" }).iCheckField({ property: "SalesOrderItem" }); Then.onTheSalesOrderItemObjectPageGenerated.onForm({ section: "Identification" }).iCheckField({ property: "Material" }); Then.onTheSalesOrderItemObjectPageGenerated.onForm({ section: "Identification" }).iCheckField({ property: "RequestedQuantity" }); Then.onTheSalesOrderItemObjectPageGenerated.onForm({ section: "Identification" }).iCheckField({ property: "NetAmount" }); + Then.onTheSalesOrderItemObjectPageGenerated.onForm({ section: "Identification" }).iCheckField({ property: "_ReferencedSalesOrderItem/SalesOrderItem" }); When.onTheSalesOrderItemObjectPageGenerated.iPressSectionIconTabFilterButton("MaterialDetailsFacet"); Then.onTheSalesOrderItemObjectPageGenerated.iCheckSection({ section: "MaterialDetailsFacet" }); Then.onTheSalesOrderItemObjectPageGenerated.onTable({ property: "_MaterialDetails" }).iCheckAction("Material Details Bound Action", { enabled: true }); From bf100cc00a46c5acf1510d94c84cbe7e54e35b66 Mon Sep 17 00:00:00 2001 From: I334706 Date: Thu, 25 Jun 2026 11:48:39 +0200 Subject: [PATCH 12/18] fix(ui5-test-writer): address review comment --- .../templates/v4/integration/ObjectPageJourney.js | 2 ++ .../templates/v4/integration/ObjectPageJourney.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/packages/ui5-test-writer/templates/v4/integration/ObjectPageJourney.js b/packages/ui5-test-writer/templates/v4/integration/ObjectPageJourney.js index 01c816ff568..46add2948c0 100644 --- a/packages/ui5-test-writer/templates/v4/integration/ObjectPageJourney.js +++ b/packages/ui5-test-writer/templates/v4/integration/ObjectPageJourney.js @@ -145,10 +145,12 @@ sap.ui.define([ <% if (subSection.tableColumns && Object.keys(subSection.tableColumns).length > 0 && subSection.navigationProperty) { -%> Then.onThe<%- name%>Generated.onTable({ property: "<%- subSection.navigationProperty %>" }).iCheckColumns(<%- JSON.stringify(subSection.tableColumns) %>); <% } -%> +<% if (subSection.navigationProperty) { -%> <% subSection.contactCardColumns.forEach(function(column) { -%> When.onThe<%- name%>Generated.onTable({ property: "<%- subSection.navigationProperty %>" }).iClickLink(0, "<%- column.property %>"); Then.onThe<%- name%>Generated.onDialog().iCheckContactDialog({ controlType: "sap.ui.mdc.link.Panel" }); <% }) -%> +<% } -%> <% }) -%> <% } else { -%> <% if (section.fields && section.fields.length > 0) { -%> diff --git a/packages/ui5-test-writer/templates/v4/integration/ObjectPageJourney.ts b/packages/ui5-test-writer/templates/v4/integration/ObjectPageJourney.ts index 290725f3d51..e02088791b0 100644 --- a/packages/ui5-test-writer/templates/v4/integration/ObjectPageJourney.ts +++ b/packages/ui5-test-writer/templates/v4/integration/ObjectPageJourney.ts @@ -164,10 +164,12 @@ function journey() { <% if (subSection.tableColumns && Object.keys(subSection.tableColumns).length > 0 && subSection.navigationProperty) { -%> Then.onThe<%- name%>Generated.onTable({ property: "<%- subSection.navigationProperty %>" }).iCheckColumns(<%- JSON.stringify(subSection.tableColumns) %>); <% } -%> +<% if (subSection.navigationProperty) { -%> <% subSection.contactCardColumns.forEach(function(column) { -%> When.onThe<%- name%>Generated.onTable({ property: "<%- subSection.navigationProperty %>" }).iClickLink(0, "<%- column.property %>"); Then.onThe<%- name%>Generated.onDialog().iCheckContactDialog({ controlType: "sap.ui.mdc.link.Panel" }); <% }) -%> +<% } -%> <% }) -%> <% } else { -%> <% if (section.fields && section.fields.length > 0) { -%> From 724f7d5e95a37604687185c3a37b75ffbcbb3d47 Mon Sep 17 00:00:00 2001 From: I334706 Date: Thu, 9 Jul 2026 13:51:20 +0200 Subject: [PATCH 13/18] fix(ui5-test-writer): repair merged object literal and dedupe test --- .../src/utils/objectPageUtils.ts | 21 +++----- .../test/unit/utils/modelUtils.test.ts | 49 ++++++------------- 2 files changed, 24 insertions(+), 46 deletions(-) diff --git a/packages/ui5-test-writer/src/utils/objectPageUtils.ts b/packages/ui5-test-writer/src/utils/objectPageUtils.ts index 6485f87733a..a780ac5276c 100644 --- a/packages/ui5-test-writer/src/utils/objectPageUtils.ts +++ b/packages/ui5-test-writer/src/utils/objectPageUtils.ts @@ -199,9 +199,7 @@ function extractObjectPageBodySectionsData( const navigationProperty = getNavigationPropertyFromKey(sectionKey); const isTable = isTableSection(section); const fields = - section.custom || isTable - ? [] - : extractFormFields(section, convertedMetadata, objectPage.entitySet); + section.custom || isTable ? [] : extractFormFields(section, convertedMetadata, objectPage.entitySet); const tableColumns = section.custom || !isTable ? {} : extractTableColumnsFromNode(section); const contactCardColumns = section.custom || !isTable ? [] : extractContactCardColumnsFromNode(section); const sectionData: BodySectionFeatureData = { @@ -210,11 +208,8 @@ function extractObjectPageBodySectionsData( isTable, custom: !!section.custom, order: section?.order ?? -1, - fields: - section.custom || isTable - ? [] - : extractFormFields(section, convertedMetadata, objectPage.entitySet), - tableColumns: section.custom || !isTable ? {} : extractTableColumnsFromNode(section), + fields, + tableColumns, contactCardFields: pickContactCardFields(fields), contactCardColumns, subSections, @@ -330,18 +325,18 @@ function extractBodySubSectionsData( const fields = subSection.custom || isTable ? [] : extractFormFields(subSection, convertedMetadata, entitySetName); const tableColumns = subSection.custom || !isTable ? {} : extractTableColumnsFromNode(subSection); - const contactCardColumns = - subSection.custom || !isTable ? [] : extractContactCardColumnsFromNode(subSection); + const contactCardColumns = subSection.custom || !isTable ? [] : extractContactCardColumnsFromNode(subSection); subSections.push({ id: subSectionId, navigationProperty: getNavigationPropertyFromKey(subSectionKey), isTable, custom: !!subSection.custom, order: subSection?.order ?? -1, // put a negative order number to signal that order was not in spec + // Contact-card fields are kept in `fields` too so the test also asserts `iCheckField` alongside `iClickLink` / `iCheckContactDialog` (dual diagnostic). contactCardFields: pickContactCardFields(fields), - contactCardColumns - fields: subSection.custom || isTable ? [] : extractFormFields(subSection, convertedMetadata, entitySetName), - tableColumns: subSection.custom || !isTable ? {} : extractTableColumnsFromNode(subSection) + contactCardColumns, + fields, + tableColumns }); }); return subSections; diff --git a/packages/ui5-test-writer/test/unit/utils/modelUtils.test.ts b/packages/ui5-test-writer/test/unit/utils/modelUtils.test.ts index d8f9298861a..bedf1b1e29e 100644 --- a/packages/ui5-test-writer/test/unit/utils/modelUtils.test.ts +++ b/packages/ui5-test-writer/test/unit/utils/modelUtils.test.ts @@ -269,11 +269,27 @@ describe('parseDataFieldForAnnotationName()', () => { }); }); + test('parses ConnectedFields and FieldGroup wrappers', () => { + expect(parseDataFieldForAnnotationName('DataFieldForAnnotation::ConnectedFields::CountryCity')).toEqual({ + property: 'ConnectedFields', + targetAnnotation: 'CountryCity' + }); + expect(parseDataFieldForAnnotationName('DataFieldForAnnotation::FieldGroup::CheckBoxGroup')).toEqual({ + property: 'FieldGroup', + targetAnnotation: 'CheckBoxGroup' + }); + }); + test('returns undefined for plain field names', () => { expect(parseDataFieldForAnnotationName('DataField::CompanyCode')).toBeUndefined(); expect(parseDataFieldForAnnotationName('PlainField')).toBeUndefined(); }); + test('returns undefined for 3-segment names whose first segment is not DataFieldForAnnotation', () => { + expect(parseDataFieldForAnnotationName('DataField::CompanyCode::Foo')).toBeUndefined(); + expect(parseDataFieldForAnnotationName('SomethingElse::Prop::Annotation')).toBeUndefined(); + }); + test('returns undefined for undefined or empty input', () => { expect(parseDataFieldForAnnotationName(undefined)).toBeUndefined(); expect(parseDataFieldForAnnotationName('')).toBeUndefined(); @@ -401,36 +417,3 @@ describe('Test edge cases for better branch coverage', () => { expect(result).toEqual({}); }); }); - -describe('parseDataFieldForAnnotationName()', () => { - test('parses an annotation-style identifier with property and target annotation', () => { - expect(parseDataFieldForAnnotationName('DataFieldForAnnotation::ConnectedFields::CountryCity')).toEqual({ - property: 'ConnectedFields', - targetAnnotation: 'CountryCity' - }); - expect(parseDataFieldForAnnotationName('DataFieldForAnnotation::FieldGroup::CheckBoxGroup')).toEqual({ - property: 'FieldGroup', - targetAnnotation: 'CheckBoxGroup' - }); - }); - - test('returns undefined for non-annotation entries', () => { - expect(parseDataFieldForAnnotationName('DataField::CompanyCode')).toBeUndefined(); - expect(parseDataFieldForAnnotationName('PlainField')).toBeUndefined(); - }); - - test('returns undefined for 3-segment names whose first segment is not DataFieldForAnnotation', () => { - expect(parseDataFieldForAnnotationName('DataField::CompanyCode::Foo')).toBeUndefined(); - expect(parseDataFieldForAnnotationName('SomethingElse::Prop::Annotation')).toBeUndefined(); - }); - - test('returns undefined for falsy input', () => { - expect(parseDataFieldForAnnotationName(undefined)).toBeUndefined(); - expect(parseDataFieldForAnnotationName('')).toBeUndefined(); - }); - - test('returns undefined when property or annotation segment is empty', () => { - expect(parseDataFieldForAnnotationName('DataFieldForAnnotation::::Contact')).toBeUndefined(); - expect(parseDataFieldForAnnotationName('DataFieldForAnnotation::Customer::')).toBeUndefined(); - }); -}); From e7463ba31dd3e179926428259c5f50f8a3a2408e Mon Sep 17 00:00:00 2001 From: I334706 Date: Thu, 9 Jul 2026 13:51:36 +0200 Subject: [PATCH 14/18] fix: restore axios lockfile entry after main merge --- pnpm-lock.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f8832d0a1a6..236f3ce694c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -34841,7 +34841,7 @@ snapshots: retry-axios@2.6.0(axios@1.16.1): dependencies: - axios: 1.16.1 + axios: 1.16.1(debug@4.3.4) optional: true retry@0.12.0: {} From cb9cf30e3131730a0b1e6b6ae142bfad7b352234 Mon Sep 17 00:00:00 2001 From: I334706 Date: Thu, 9 Jul 2026 13:51:36 +0200 Subject: [PATCH 15/18] test(fiori-app-sub-generator): refresh ALP v4 MaterialDetails fixture --- .../test/integration/MaterialDetailsObjectPageJourney.gen.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/MaterialDetailsObjectPageJourney.gen.js b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/MaterialDetailsObjectPageJourney.gen.js index 6ab56d41487..0ac7590ac54 100644 --- a/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/MaterialDetailsObjectPageJourney.gen.js +++ b/packages/fiori-app-sub-generator/test/int/fiori-elements/expected-output/alp_v4/webapp/test/integration/MaterialDetailsObjectPageJourney.gen.js @@ -58,7 +58,7 @@ sap.ui.define([ Then.onTheMaterialDetailsObjectPageGenerated.iCheckSection({ section: "MaterialRatingsFacet" }); Then.onTheMaterialDetailsObjectPageGenerated.onTable({ property: "_MaterialRatings" }).iCheckAction("Material Ratings Bound Action", { enabled: true }); // When.onTheMaterialDetailsObjectPageGenerated.onTable({ property: "_MaterialRatings" }).iPressAction("Material Ratings Bound Action"); - Then.onTheMaterialDetailsObjectPageGenerated.onTable({ property: "_MaterialRatings" }).iCheckColumns(undefined, {"0":{"header":"Rating"},"Title":{"header":"Title"}}); + Then.onTheMaterialDetailsObjectPageGenerated.onTable({ property: "_MaterialRatings" }).iCheckColumns(undefined, {"DataFieldForAnnotation::DataPoint::Rating":{"header":"Rating"},"Title":{"header":"Title"}}); }); opaTest("Teardown", function (Given, When, Then) { From 90c4a6270e1e90af69733537a624ff3f75e07942 Mon Sep 17 00:00:00 2001 From: I334706 Date: Wed, 22 Jul 2026 14:07:18 +0200 Subject: [PATCH 16/18] Remove extra changesets --- .changeset/ui5-test-writer-op-subsection-fields.md | 5 ----- .changeset/ui5-test-writer-special-form-fields.md | 5 ----- 2 files changed, 10 deletions(-) delete mode 100644 .changeset/ui5-test-writer-op-subsection-fields.md delete mode 100644 .changeset/ui5-test-writer-special-form-fields.md diff --git a/.changeset/ui5-test-writer-op-subsection-fields.md b/.changeset/ui5-test-writer-op-subsection-fields.md deleted file mode 100644 index 0de7837b4a7..00000000000 --- a/.changeset/ui5-test-writer-op-subsection-fields.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@sap-ux/ui5-test-writer": patch ---- - -FIX: Generate form field checks for Object Page standard form sections. The generator read the spec-model aggregation under the key `subSections`, but `@sap/ux-specification` emits it as `subsections`, so sections structured as CollectionFacet → ReferenceFacet (e.g. GeneralInformation) produced only a shallow `iCheckSection` with no `iCheckSubSection`/`iCheckField` checks. diff --git a/.changeset/ui5-test-writer-special-form-fields.md b/.changeset/ui5-test-writer-special-form-fields.md deleted file mode 100644 index 998c709de04..00000000000 --- a/.changeset/ui5-test-writer-special-form-fields.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@sap-ux/ui5-test-writer': patch ---- - -FIX: Handle `@UI.ConnectedFields` and `@UI.FieldGroup` wrappers in body sub-section form fields and emit one `iCheckField` per inner property with the `connectedFields` / `fieldGroup` qualifier on the `FieldIdentifier`. From 8ce436df58aedf748297a3cc86bfc75330347dd1 Mon Sep 17 00:00:00 2001 From: I334706 Date: Wed, 29 Jul 2026 08:55:48 +0200 Subject: [PATCH 17/18] Avoid unused When parameter --- .../v4/integration/ObjectPageJourney.ts | 2 +- .../test/unit/fiori-elements.test.ts | 48 +++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/packages/ui5-test-writer/templates/v4/integration/ObjectPageJourney.ts b/packages/ui5-test-writer/templates/v4/integration/ObjectPageJourney.ts index 3945b14b54f..b0c35ce10e8 100644 --- a/packages/ui5-test-writer/templates/v4/integration/ObjectPageJourney.ts +++ b/packages/ui5-test-writer/templates/v4/integration/ObjectPageJourney.ts @@ -81,7 +81,7 @@ function journey() { <% } -%> <% if (headerSections?.length > 0) { -%> - opaTest("Check header facets of the Object Page", function (_Given: Given, When: When, Then: Then) { + opaTest("Check header facets of the Object Page", function (_Given: Given, <% if (headerSections.some(function(section) { return section.contactCardFields?.length > 0; })) { %>When: When<% } else { %>_When: When<% } %>, Then: Then) { <% headerSections.forEach(function(section) { -%> <% if (section.microChart) { -%> Then.onThe<%- name%>Generated.onHeader().iCheckMicroChart("<%- section.title %>", ""); diff --git a/packages/ui5-test-writer/test/unit/fiori-elements.test.ts b/packages/ui5-test-writer/test/unit/fiori-elements.test.ts index 892a0be1713..64ee22832f7 100644 --- a/packages/ui5-test-writer/test/unit/fiori-elements.test.ts +++ b/packages/ui5-test-writer/test/unit/fiori-elements.test.ts @@ -1277,6 +1277,54 @@ export type Then = Opa5 & BaseArrangements & { expect(content).not.toContain("'use strict'"); }); + it('marks When as unused (_When) in the header-facets test when no header field is a Contact card', async () => { + // OP with a header facet (microchart) but no @Communication.Contact header field: When would be unused. + const appModel = JSON.parse(appModels.V4_WITH_SUB_OBJECT_PAGE); + appModel.applicationModel.pages.BookingObjectPage.navigation = { + _BookSupplement: { route: 'BookingSupplementObjectPage' } + }; + appModel.applicationModel.pages.BookingSupplementObjectPage = { + pageType: 'ObjectPage', + entitySet: 'BookingSupplement', + contextPath: '/BookingSupplement', + template: 'sap.fe.templates.ObjectPage', + model: { + root: { + aggregations: { + header: { + aggregations: { + sections: { + aggregations: { + priceChart: { + title: 'Supplement Price', + schema: { dataType: 'ChartDefinition' } + } + } + } + } + } + } + } + } + }; + readAppMock.mockResolvedValueOnce(appModel); + const projectDir = prepareTestFiles('LROPv4'); + const subOPMetadata = + fs?.read(join(__dirname, '../test-input/LROPv4/webapp/localService/mainService/metadata.xml')) ?? ''; + fs = await generateOPAFiles(projectDir, { enableTypeScript: true }, subOPMetadata, fs); + + const dumped = fs.dump(projectDir); + const journeyPath = Object.keys(dumped).find((p) => + p.includes('BookingSupplementObjectPageJourney.gen.ts') + ); + expect(journeyPath).toBeDefined(); + const content = dumped[journeyPath!].contents as string; + expect(content).toContain('iCheckMicroChart("Supplement Price", "")'); + expect(content).toContain( + 'opaTest("Check header facets of the Object Page", function (_Given: Given, _When: When, Then: Then)' + ); + }); + it('does not modify tsconfig.json', async () => { const projectDir = prepareTestFiles('FullScreenLROP'); const tsconfigPath = join(projectDir, 'tsconfig.json'); From 55f46c90c5522736ca17330a3f3f51d244cdfd92 Mon Sep 17 00:00:00 2001 From: I334706 Date: Tue, 4 Aug 2026 08:30:59 +0200 Subject: [PATCH 18/18] Remove implementation from 1.84 bucket --- .../v4/1.84/integration/ListReportJourney.js | 9 ------- .../v4/1.84/integration/ListReportJourney.ts | 9 ------- .../v4/1.84/integration/ObjectPageJourney.js | 22 ----------------- .../v4/1.84/integration/ObjectPageJourney.ts | 24 +------------------ 4 files changed, 1 insertion(+), 63 deletions(-) diff --git a/packages/ui5-test-writer/templates/v4/1.84/integration/ListReportJourney.js b/packages/ui5-test-writer/templates/v4/1.84/integration/ListReportJourney.js index 423ab154364..78113d31dee 100644 --- a/packages/ui5-test-writer/templates/v4/1.84/integration/ListReportJourney.js +++ b/packages/ui5-test-writer/templates/v4/1.84/integration/ListReportJourney.js @@ -95,15 +95,6 @@ sap.ui.define([ }); <%_ } -%> -<%_ if (contactCardColumns.length > 0) { -%> - opaTest("Check contact card links", function (Given, When, Then) { - <%_ contactCardColumns.forEach(function(column) { _%> - // May fail if the mock data has no row at index 0 or that row does not render the contact link; adjust the row selector if needed. - When.onThe<%- startLR %>Generated.onTable().iClickLink(0, "<%- column.property %>"); - Then.onThe<%- startLR %>Generated.onDialog().iCheckContactDialog({ controlType: "sap.ui.mdc.link.Panel" }); - <%_ }); -%> - }); -<%_ } -%> <%_ if (startLR) { -%> opaTest("Navigate to ObjectPage", function (Given, When, Then) { // Note: this test will fail if the ListReport page doesn't show any data diff --git a/packages/ui5-test-writer/templates/v4/1.84/integration/ListReportJourney.ts b/packages/ui5-test-writer/templates/v4/1.84/integration/ListReportJourney.ts index 51abb9499cc..868715a2754 100644 --- a/packages/ui5-test-writer/templates/v4/1.84/integration/ListReportJourney.ts +++ b/packages/ui5-test-writer/templates/v4/1.84/integration/ListReportJourney.ts @@ -100,15 +100,6 @@ function journey() { }); <%_ } -%> -<%_ if (contactCardColumns.length > 0) { -%> - opaTest("Check contact card links", function (_Given: Given, When: When, Then: Then) { - <%_ contactCardColumns.forEach(function(column) { _%> - // May fail if the mock data has no row at index 0 or that row does not render the contact link; adjust the row selector if needed. - When.onThe<%- startLR %>Generated.onTable("").iClickLink(0, "<%- column.property %>"); - Then.onThe<%- startLR %>Generated.onDialog().iCheckContactDialog({ controlType: "sap.ui.mdc.link.Panel" }); - <%_ }); -%> - }); -<%_ } -%> <%_ if (startLR) { -%> opaTest("Navigate to ObjectPage", function (_Given: Given, When: When, Then: Then) { // Note: this test will fail if the ListReport page doesn't show any data diff --git a/packages/ui5-test-writer/templates/v4/1.84/integration/ObjectPageJourney.js b/packages/ui5-test-writer/templates/v4/1.84/integration/ObjectPageJourney.js index 2a39b7f3ce6..75f60b185d4 100644 --- a/packages/ui5-test-writer/templates/v4/1.84/integration/ObjectPageJourney.js +++ b/packages/ui5-test-writer/templates/v4/1.84/integration/ObjectPageJourney.js @@ -76,10 +76,6 @@ sap.ui.define([ targetAnnotation: "<%- field.targetAnnotation %>" }); <% }) -%> -<% section.contactCardFields.forEach(function(field) { -%> - When.onThe<%- name%>Generated.onHeader().iClickLink({ property: "<%- field.property %>" }); - Then.onThe<%- name%>Generated.onDialog().iCheckContactDialog({ controlType: "sap.ui.mdc.link.Panel" }); -<% }) -%> <% } -%> <% } -%> <% }) -%> @@ -126,10 +122,6 @@ sap.ui.define([ Then.onThe<%- name%>Generated.onTable({ property: "<%- section.navigationProperty %>" }).iCheckDelete({ visible: true }); // When.onThe<%- name%>Generated.onTable({ property: "<%- section.navigationProperty %>" }).iPressDelete(); <% } -%> -<% section.contactCardColumns.forEach(function(column) { -%> - When.onThe<%- name%>Generated.onTable({ property: "<%- section.navigationProperty %>" }).iClickLink(0, "<%- column.property %>"); - Then.onThe<%- name%>Generated.onDialog().iCheckContactDialog({ controlType: "sap.ui.mdc.link.Panel" }); -<% }) -%> <% } -%> <% if (section?.subSections?.length > 0) { -%> <% section.subSections.forEach(function(subSection) { -%> @@ -140,19 +132,9 @@ sap.ui.define([ Then.onThe<%- name%>Generated.onForm({ section: "<%- subSection.id %>" }).iCheckField({ property: "<%- field.property %>"<% if (field.connectedFields) { %>, connectedFields: "<%- field.connectedFields %>"<% } %><% if (field.fieldGroup) { %>, fieldGroup: "<%- field.fieldGroup %>"<% } %> }); <% }) -%> <% } -%> -<% subSection.contactCardFields.forEach(function(field) { -%> - When.onThe<%- name%>Generated.onForm({ section: "<%- subSection.id %>" }).iClickLink({ property: "<%- field.property %>" }); - Then.onThe<%- name%>Generated.onDialog().iCheckContactDialog({ controlType: "sap.ui.mdc.link.Panel" }); -<% }) -%> <% if (subSection.tableColumns && Object.keys(subSection.tableColumns).length > 0 && subSection.navigationProperty) { -%> Then.onThe<%- name%>Generated.onTable({ property: "<%- subSection.navigationProperty %>" }).iCheckColumns(undefined, <%- JSON.stringify(subSection.tableColumns) %>); <% } -%> -<% if (subSection.navigationProperty) { -%> -<% subSection.contactCardColumns.forEach(function(column) { -%> - When.onThe<%- name%>Generated.onTable({ property: "<%- subSection.navigationProperty %>" }).iClickLink(0, "<%- column.property %>"); - Then.onThe<%- name%>Generated.onDialog().iCheckContactDialog({ controlType: "sap.ui.mdc.link.Panel" }); -<% }) -%> -<% } -%> <% }) -%> <% } else { -%> <% if (section.fields && section.fields.length > 0) { -%> @@ -160,10 +142,6 @@ sap.ui.define([ Then.onThe<%- name%>Generated.onForm({ section: "<%- section.id %>" }).iCheckField({ property: "<%- field.property %>"<% if (field.connectedFields) { %>, connectedFields: "<%- field.connectedFields %>"<% } %><% if (field.fieldGroup) { %>, fieldGroup: "<%- field.fieldGroup %>"<% } %> }); <% }) -%> <% } -%> -<% section.contactCardFields.forEach(function(field) { -%> - When.onThe<%- name%>Generated.onForm({ section: "<%- section.id %>" }).iClickLink({ property: "<%- field.property %>" }); - Then.onThe<%- name%>Generated.onDialog().iCheckContactDialog({ controlType: "sap.ui.mdc.link.Panel" }); -<% }) -%> <% if (section.tableColumns && Object.keys(section.tableColumns).length > 0 && section.navigationProperty) { -%> Then.onThe<%- name%>Generated.onTable({ property: "<%- section.navigationProperty %>" }).iCheckColumns(undefined, <%- JSON.stringify(section.tableColumns) %>); <% } -%> diff --git a/packages/ui5-test-writer/templates/v4/1.84/integration/ObjectPageJourney.ts b/packages/ui5-test-writer/templates/v4/1.84/integration/ObjectPageJourney.ts index 9274a955cdb..a1dfaef144a 100644 --- a/packages/ui5-test-writer/templates/v4/1.84/integration/ObjectPageJourney.ts +++ b/packages/ui5-test-writer/templates/v4/1.84/integration/ObjectPageJourney.ts @@ -81,7 +81,7 @@ function journey() { <% } -%> <% if (headerSections?.length > 0) { -%> - opaTest("Check header facets of the Object Page", function (_Given: Given, <% if (headerSections.some(function(section) { return section.contactCardFields?.length > 0; })) { %>When: When<% } else { %>_When: When<% } %>, Then: Then) { + opaTest("Check header facets of the Object Page", function (_Given: Given, _When: When, Then: Then) { <% headerSections.forEach(function(section) { -%> <% if (section.microChart) { -%> Then.onThe<%- name%>Generated.onHeader().iCheckMicroChart("<%- section.title %>", ""); @@ -95,10 +95,6 @@ function journey() { targetAnnotation: "<%- field.targetAnnotation %>" } as unknown as FieldIdentifier); <% }) -%> -<% section.contactCardFields.forEach(function(field) { -%> - When.onThe<%- name%>Generated.onHeader().iClickLink({ property: "<%- field.property %>" } as unknown as FieldIdentifier); - Then.onThe<%- name%>Generated.onDialog().iCheckContactDialog({ controlType: "sap.ui.mdc.link.Panel" }); -<% }) -%> <% } -%> <% } -%> <% }) -%> @@ -145,10 +141,6 @@ function journey() { Then.onThe<%- name%>Generated.onTable({ property: "<%- section.navigationProperty %>" }).iCheckDelete({ visible: true }); // When.onThe<%- name%>Generated.onTable({ property: "<%- section.navigationProperty %>" }).iPressDelete(); <% } -%> -<% section.contactCardColumns.forEach(function(column) { -%> - When.onThe<%- name%>Generated.onTable({ property: "<%- section.navigationProperty %>" }).iClickLink(0, "<%- column.property %>"); - Then.onThe<%- name%>Generated.onDialog().iCheckContactDialog({ controlType: "sap.ui.mdc.link.Panel" }); -<% }) -%> <% } -%> <% if (section?.subSections?.length > 0) { -%> <% section.subSections.forEach(function(subSection) { -%> @@ -159,19 +151,9 @@ function journey() { Then.onThe<%- name%>Generated.onForm({ section: "<%- subSection.id %>" } as unknown as FormIdentifier).iCheckField({ property: "<%- field.property %>"<% if (field.connectedFields) { %>, connectedFields: "<%- field.connectedFields %>"<% } %><% if (field.fieldGroup) { %>, fieldGroup: "<%- field.fieldGroup %>"<% } %> }); <% }) -%> <% } -%> -<% subSection.contactCardFields.forEach(function(field) { -%> - When.onThe<%- name%>Generated.onForm({ section: "<%- subSection.id %>" } as unknown as FormIdentifier).iClickLink({ property: "<%- field.property %>" }); - Then.onThe<%- name%>Generated.onDialog().iCheckContactDialog({ controlType: "sap.ui.mdc.link.Panel" }); -<% }) -%> <% if (subSection.tableColumns && Object.keys(subSection.tableColumns).length > 0 && subSection.navigationProperty) { -%> Then.onThe<%- name%>Generated.onTable({ property: "<%- subSection.navigationProperty %>" }).iCheckColumns(undefined, <%- JSON.stringify(subSection.tableColumns) %>); <% } -%> -<% if (subSection.navigationProperty) { -%> -<% subSection.contactCardColumns.forEach(function(column) { -%> - When.onThe<%- name%>Generated.onTable({ property: "<%- subSection.navigationProperty %>" }).iClickLink(0, "<%- column.property %>"); - Then.onThe<%- name%>Generated.onDialog().iCheckContactDialog({ controlType: "sap.ui.mdc.link.Panel" }); -<% }) -%> -<% } -%> <% }) -%> <% } else { -%> <% if (section.fields && section.fields.length > 0) { -%> @@ -179,10 +161,6 @@ function journey() { Then.onThe<%- name%>Generated.onForm({ section: "<%- section.id %>" } as unknown as FormIdentifier).iCheckField({ property: "<%- field.property %>"<% if (field.connectedFields) { %>, connectedFields: "<%- field.connectedFields %>"<% } %><% if (field.fieldGroup) { %>, fieldGroup: "<%- field.fieldGroup %>"<% } %> }); <% }) -%> <% } -%> -<% section.contactCardFields.forEach(function(field) { -%> - When.onThe<%- name%>Generated.onForm({ section: "<%- section.id %>" } as unknown as FormIdentifier).iClickLink({ property: "<%- field.property %>" }); - Then.onThe<%- name%>Generated.onDialog().iCheckContactDialog({ controlType: "sap.ui.mdc.link.Panel" }); -<% }) -%> <% if (section.tableColumns && Object.keys(section.tableColumns).length > 0 && section.navigationProperty) { -%> Then.onThe<%- name%>Generated.onTable({ property: "<%- section.navigationProperty %>" }).iCheckColumns(undefined, <%- JSON.stringify(section.tableColumns) %>); <% } -%>