Skip to content

Update opa5_docu.md based on testing - #5000

Open
devinea wants to merge 4 commits into
mainfrom
devinea-patch-2
Open

Update opa5_docu.md based on testing#5000
devinea wants to merge 4 commits into
mainfrom
devinea-patch-2

Conversation

@devinea

@devinea devinea commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Description

This PR updates the OPA5 integration test documentation (opa5_docu.md) based on hands-on testing feedback. The changes correct inaccuracies, add missing patterns, and expand both the V4 and V2 API reference sections to better reflect real-world usage.

Key improvements include:

  • Introduction & Rules: Clarified the document's scope (V4-primary), updated base class guidance to include TemplatePage and FCL notes, replaced the teardown rule with a correct code example showing Given.iTeardownMyApp() called separately (not chained), and added a new Debugging section with the qunitPause tip.
  • API fundamentals: Added a new V4 API Fundamentals section covering the identifier pattern (string vs. object), function naming conventions, and .and. vs .and.then. chaining rules.
  • Categories 02–14: Fixed all filter/form/section/table examples to use the correct object-form identifiers ({ property: "..." }, { section: "..." }). Clarified iCheckField behavior for text-annotated fields ({ value, description }), section ID vs. display label distinction, iChangeSortOrder API, and value help selection patterns (single-select vs. multi-select, Case A vs. Case B).
  • Category 14: Replaced the old "ObjectPage Navigation Buttons" category with a corrected "Shell and Base Assertions" category covering onTheShell.iNavigateBack() and Then.iSeeMessageToast().
  • V2 section: Completely restructured with accurate API tables split by floorplan (onTheGenericListReport, onTheGenericObjectPage, ALP, FCL), a setup/configuration guide, app startup snippet, common pitfalls, and a complete working example journey.
  • Anti-patterns: Added missing rules (Do NOT chain teardown on a page object, fixed method name casing iTeardownMyApp).

Type of change

  • Bug (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds a new feature)
  • Breaking change (Bug or New feature that would cause existing functionality/consumers to not work as expected)
  • Non-Breaking chores (Changes to tools, libraries, build process, documentation, etc)
  • None of the above (Reviewers might ask for more clarification)

How have you tested?

Changes are documentation-only. Patterns were verified through actual test execution against SAP Fiori Elements applications.

Checklist:

  • The code conforms to the general development principles

  • Supplied as many details as possible on this change

  • The code is easy to read and maintainable by others

  • Corresponding changes to the documentation has been done

  • Already existing and new unit tests pass locally

  • 🔄 Regenerate and Update Summary

PR Bot Information

Version: 1.29.9

  • Output Template: Repository PR Template
  • File Content Strategy: Full file content
  • LLM: anthropic--claude-4.6-sonnet
  • Correlation ID: 44d5c490-8bf3-11f1-894b-56c5da534b3c
  • Event Trigger: pull_request.opened
  • Summary Prompt: Default Prompt

@devinea
devinea requested a review from a team as a code owner July 30, 2026 08:47
@changeset-bot

changeset-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b6b093b

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

This PR includes changesets to release 2 packages
Name Type
@sap-ux/fiori-docs-embeddings Patch
@sap-ux/fiori-mcp-server 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 hyperspace-pr-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR makes substantial improvements to the documentation — correcting API usage patterns, adding valuable new sections on V4 fundamentals, value help, and V2 details. Two issues were flagged: the iTearDownMyApp / iTeardownMyApp capitalisation inconsistency that remains in the Category 01 examples (while the rest of the document uses the lowercase-d form), and the removal of the surrounding CustomPageDefinitions object wrapper in the Category 12 custom selector code blocks, which leaves bare function definitions that are invalid JavaScript without context. Please address both before merging.

PR Bot Information

Version: 1.29.9

  • File Content Strategy: Full file content
  • Agent Instructions:
  • Correlation ID: 44d5c490-8bf3-11f1-894b-56c5da534b3c
  • Event Trigger: pull_request.opened
  • LLM: anthropic--claude-4.6-sonnet
  • Experiment Variant: control

Comment thread packages/fiori-docs-embeddings/data_local/opa5_docu.md Outdated
Comment thread packages/fiori-docs-embeddings/data_local/opa5_docu.md
@devinea
devinea requested a review from d027132 July 30, 2026 08:49
Co-authored-by: hyperspace-pr-bot[bot] <209611008+hyperspace-pr-bot[bot]@users.noreply.github.com>
d027132
d027132 previously approved these changes Jul 30, 2026
@sonarqubecloud

Copy link
Copy Markdown

@heimwege heimwege left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To me this document as is should not be merged. It must be aligned with the skill or it will produce different/wrong results.
See comments + e.g. QUnit autostart false is completely missing, Not everywhere RAP is mentioned, the CAP counterpart is provided, ...

Prompt:

check the document update at https://github.com/SAP/open-ux-tools/pull/5000 and compare to the information provided in the related skill file at https://github.com/SAP/open-ux-tools/blob/main/packages/fiori-mcp-server/skills/sap-fiori-opa5-test-development/SKILL.md The document in the PR should contain more or less the same information contined in the skill. Nothing should be missing and nothing should be contradicting.

I suggest to finalize the skill (because there are still some findings from Markus open) and then create the documentation based on the skill (maybe also automated generation like we do for the create readme). Else this will be out of sync sooner or later and that's what will lead to issues especially if the MCP and the skill are being used in one plugin (which is the way we recommend.

To be honest I would just delete this document because I don't see the benefit in having bot but I see the effort. But it's not up to me to decide 🤷🏻

"@sap-ux/fiori-mcp-server": patch
---

FIX: Update opa5_docu.md based on testing

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think what this PR should actually do is:

Suggested change
FIX: Update opa5_docu.md based on testing
FIX: Align opa5_docu.md with sap-fiori-opa5-test-development content

And then I'm wondering how this can be done because there are currently still some open findings to be integrated into the skill 🤷🏻

// ❌ Wrong — teardown chained on page object, no prior assertion
opaTest("Clean up", function(Given, When, Then) {
Then.onTheList.iSeeThisPage()
.and.onTheList.iTeardownMyApp();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iTeardownMyApp() is used throughout (lowercase d). Only one line mentions the actual difference in v2 vs v4

(V4: `Given.iTeardownMyApp()`, V2: `Given.iTeardownMyApp()`)

If this snipped is not returned by the search the MCP will lead to wrong code.


### Page Object Configuration

- Register all page objects in `JourneyRunner.pages` before running journeys

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In contrast to the skill, the JourneyRunner is not explained at all in this documentation

**Searching within value help:**

Search via the generic search field. The search field is only available when the value help entity set is annotated as searchable in `metadata.xml`. Depending on the backend:
- **CAP**: `Search.SearchRestrictions` with `Searchable: true` (from `@Search.searchable: true` in CDS)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is wrong (fixed in the skill)

- `Searchable: true` present → **Case A**
- Absent or `Searchable: false` → **Case B**

> For RAP backends, Case A is the default — standard VH entities expose `SAP__capabilities.SearchRestrictions` with `Searchable: true`. When in doubt, check the metadata rather than assuming Case B.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CAP is missing

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.

3 participants