name: fiori-elements description: > This skill should be used when testing "Fiori Elements" apps, "List Report", "Object Page", "Analytical List Page", or "Overview Page". Covers SmartFilterBar, SmartTable, ObjectPageLayout, DynamicPage patterns, and the FE test library API. version: 0.1.0
Fiori Elements
Fiori Elements apps are generated from OData metadata and CDS annotations. Do not look for custom view XML -- the framework renders controls dynamically. Target controls by controlType + bindingPath or properties.
List Report Pattern
Test the standard filter-search-select flow:
- Navigate to the List Report app via
ui5Navigation.navigateToApp(). - Fill SmartFilterBar fields using
bindingPath: { propertyPath }selectors. - Click the "Go" button to execute the query.
- Call
ui5.waitForUI5()after every interaction. - Verify table results with
ui5.table.getRowCount(). - Select a row with
ui5.table.selectRow()to navigate to the Object Page.
Use controlType: 'sap.ui.comp.smartfield.SmartField' with bindingPath for filter fields. For "Adapt Filters" dialog, use searchOpenDialogs: true.
Object Page Pattern
Test the view-edit-save flow:
- Navigate directly via
navigateToHash()with the entity key or select from List Report. - Read header data from
sap.m.Titleinsidesap.f.DynamicPageTitle. - Click "Edit" to enter edit mode.
- Fill SmartField controls using
bindingPath. - Click "Save" and wait for OData response.
- Verify success via MessageToast or ObjectStatus.
SmartTable Operations
Use ui5.table methods for table interactions:
ui5.table.getRows(tableId)-- get all visible rowsui5.table.getRowCount(tableId)-- count rowsui5.table.getCellValue(tableId, rowIndex, columnKey)-- read cellui5.table.selectRow(tableId, rowIndex)-- select row by index
Table type is auto-detected: sap.m.Table (responsive), sap.ui.table.Table (grid), or sap.ui.comp.smarttable.SmartTable (generated). Use the SmartTable ID when available.
SmartFilterBar Operations
- Fill filters by
bindingPathtargeting SmartField inside the filter bar. - Click "Go" (
sap.m.Buttonwithtext: 'Go') to execute. - Click "Clear" to reset all filters.
- Open "Adapt Filters" for hidden filter fields -- controls inside this dialog require
searchOpenDialogs: true.
SmartField Inner Control Pattern (V2)
SmartFields wrap inner controls. Target the inner control for interaction, the SmartField for assertions:
| Inner Control | Suffix | Use Case |
|---|---|---|
| Input | -input |
Text fields, number fields |
| ComboBox | -comboBoxEdit |
Dropdown selection fields |
| DatePicker | -picker |
Date/time fields |
| Display | -inner |
Read-only display fields |
Example: For SmartField fragment--supplierField, the combo is fragment--supplierField-comboBoxEdit.
Always use setValue() + fireChange() + waitForUI5() on the inner control, never the SmartField wrapper.
V4 MDC Field Pattern
MDC Fields (V4 apps) use different conventions:
- Outer field:
APD_::Material— for metadata, validation state - Inner input:
APD_::Material-inner— for value changes (triggers OData binding) - Value Help icon:
APD_::Material-inner-vhi— to open VH dialog - Service namespace prefix:
fe::APD_::${SRVD}.ActionNamefor action dialogs
MDC ValueHelp uses sap.ui.mdc.ValueHelp (not sap.ui.comp.valuehelpdialog.ValueHelpDialog).
FE Test Library
For advanced FE testing, initialize the Fiori Elements test library:
const feLib = await initializeFETestLibrary(page);
This provides a fluent API for List Report and Object Page actions aligned with SAP's OPA5 FE test patterns.
Refer to examples/ for complete List Report and Object Page test patterns.