Skip to content

feat(ui5-test-writer): Generate tests for Contact Cards - #4870

Closed
sap-sebelao wants to merge 20 commits into
mainfrom
feat/ui5-test-writer/contact-cards
Closed

feat(ui5-test-writer): Generate tests for Contact Cards#4870
sap-sebelao wants to merge 20 commits into
mainfrom
feat/ui5-test-writer/contact-cards

Conversation

@sap-sebelao

@sap-sebelao sap-sebelao commented Jun 22, 2026

Copy link
Copy Markdown
Member
  • covers both LR and OP as there is a lot of shared code anyway
  • also contains some minor fixes
    -- column availability is now evaluated
    -- commented out test suggestion now suggests existing action

Internal issue
36742
Internal JIRAs
FXUBRQ34-12564
FXUBRQ34-12565
FXUBRQ34-12566
FXUBRQ34-12525
FXUBRQ34-12604

sap-sebelao and others added 20 commits June 9, 2026 15:43
- add .gen suffix to files that are being overwritten
- only generate FirstJourney file when no other journeys present
- add warning to Pages
- do not move existing tests to integration_old
- only generate journeys and pages when incompatible setup exists
- update relevant files in compatible setups
- refactor several utils and writer code for readability
- tests, manual test script
- 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-bot

changeset-bot Bot commented Jun 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 83d014c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@sap-ux/ui5-test-writer Minor
@sap-ux/fiori-elements-writer Patch
@sap-ux/fiori-freestyle-writer Patch
@sap-ux/fiori-app-sub-generator Patch
@sap-ux/repo-app-import-sub-generator Patch
@sap-ux/generator-simple-fe Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@hyperspace-pr-bot

Copy link
Copy Markdown
Contributor

Summary

The following content is AI-generated and provides a summary of the pull request:


feat(ui5-test-writer): Generate OPA5 Tests for Contact Cards

New Features

✨ Adds Contact Card (@Communication.Contact) OPA5 test generation across all Fiori Elements page types — covering List Report tables, Object Page header field groups, Object Page body-section forms, and Object Page body-section tables.

Detected DataFieldForAnnotation::<property>::Contact entries are emitted as iClickLink({ property: "<property>/Contact" }) followed by iCheckContactDialog({ controlType: "sap.ui.mdc.link.Panel" }).

Additionally, the iPressSectionIconTabFilterButton page-object workaround is removed in favor of the public iGoToSection API, and iCheckNumberOfSections is now emitted unconditionally.

Changes

  • types.ts: Added ContactCardField type; extended SectionFormField with targetAnnotation; added contactCardFields and contactCardColumns to BodySubSectionFeatureData, BodySectionFeatureData, HeaderSectionFeatureData, and ListReportFeatures.

  • modelUtils.ts: Added parseDataFieldForAnnotationName() utility to parse DataFieldForAnnotation::<property>::<annotation> keys, extracting the property and target annotation.

  • objectPageUtils.ts: Wires in Contact Card extraction across header sections (via pickContactCardFieldsFromHeader), body section forms (via pickContactCardFields), and table sections (via extractContactCardColumnsFromNode). Replaces iPressSectionIconTabFilterButton with iGoToSection. Fixed sub-section key lookup to also check subsections (case-insensitive fallback). Uncommented sub-section navigation calls.

  • tableUtils.ts: Added isDefaultAvailableColumn() to filter out Adaptation/Hidden columns. Updated getColumnIdentifier() to fall back to the aggregation key for annotation-driven columns. Added extractContactCardColumnsFromNode() function. transformTableColumns() now passes column keys and respects availability flags.

  • listReportUtils.ts: Wires extractContactCardColumnsFromNode and populates contactCardColumns in ListReportFeatures.

  • ObjectPageJourney.js/.ts: Emits iClickLink/iCheckContactDialog calls for header field-group Contact cards, form Contact cards (body sections and sub-sections), and table Contact card columns. Replaces iPressSectionIconTabFilterButton with iGoToSection. Removes conditional guard on iCheckNumberOfSections. Fixes commented-out sub-section navigation. Corrects iPressEditiExecuteEdit.

  • ListReportJourney.js/.ts: Emits a new Check contact card links OPA test block for Contact-card columns in the LR table.

  • ObjectPage.js/.ts (page template): Removes the iPressSectionIconTabFilterButton custom action and its sap/ui/test/actions/Press dependency, leaving an empty actions object.

  • constants.ts (test input): Extended V4_WITH_SUB_OBJECT_PAGE model with Contact-card columns in the LR table, body sub-section form, and sub-section table.

  • fiori-elements.test.ts, tableUtils.test.ts, objectPageUtils.test.ts, listReportUtils.test.ts, modelUtils.test.ts: Updated and extended tests to cover Contact Card generation, availability filtering, and iGoToSection replacement.

  • fiori-elements.test.ts.snap: Updated snapshots to reflect removal of iPressSectionIconTabFilterButton and sap/ui/test/actions/Press.

  • .changeset/ui5-test-writer-contact-cards.md: Added minor changeset entry.


  • 🔄 Regenerate and Update Summary
  • ✏️ Insert as PR Description (deletes this comment)
  • 🗑️ Delete comment
PR Bot Information

Version: 1.26.4

  • LLM: anthropic--claude-4.6-sonnet
  • Correlation ID: 8f39428f-6041-4940-aed8-2a996ba011ac
  • Event Trigger: pull_request.opened
  • Summary Prompt: Default Prompt
  • Output Template: Default Template
  • File Content Strategy: Full file content

Base automatically changed from fix/ui5-test-writer/rework-regeneration to main June 22, 2026 12:11
@sap-sebelao

Copy link
Copy Markdown
Member Author

Abandoning this in favor of cleaner cherry-picked branch
#4872

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant