ui5-community / wdi5

official UI5 end-to-end test framework for UI5 web-apps. wdi5 = Webdriver.IO + UI5 Test API
https://ui5-community.github.io/wdi5/
Apache License 2.0
102 stars 43 forks source link

Native methods of UI5 aggregation items cannot be invoked for SmartFilterBar #181

Closed rwnbiad closed 2 years ago

rwnbiad commented 2 years ago

Describe the bug Similar to something what is described here, doesn't work for SmartFilterBar. Invoking listItem.getTitle doesn't work

const control = await browser.asControl(oListSelector)
const ui5ListItems = await control.getAggregation("items")
for (const listItem of ui5ListItems) {
  expect(await listItem.getTitle()).not.toBe("")
}

SmartFilterBar has an aggregation called 'filterGroupItems' of type sap.ui.comp.filterbar.FilterGroupItem. Each FilterGroupItem has a property called label

The below is my code. I'm just invoking the getLabelMethod

image

This doesn't work, because the native UI5 methods of FilterGroupItem don't seem to be available on each of the items in aggregation.

image

This leads to a type error about missing function

image

This seems broken in other places (other than SmartFilterBar) as well. getRows on sap.ui.table.Table also has the same problem

To Reproduce Invoke getLabel on items of filterGroupItems aggregation of SmartFilterBar

Expected behavior The label of the filter item

Logs/Console Output TypeError: item.getLabel is not a function

$> TypeError: item.getLabel is not a function

Screenshots above

Runtime Env (please complete the following information):

vobu commented 2 years ago

hi, thanks again for the detailed description of the issue πŸ‘ have you tried adding interaction: "root" to the selector? as in

const filterbar = {
  selector: {
     //...
    interaction: "root"
  }
}

interaction: root is a malevolent property from OPA5 land - we're currently collecting all controls requiring that property in order to eventually add it on the fly; so that in the code of the test, it can go away from the selector

github-actions[bot] commented 2 years ago

hey πŸ‘‹ - silence for 30 days 🀐 ... anybody? πŸ˜€

github-actions[bot] commented 2 years ago

closed πŸ“΄ because silencio 🀫 since an additional 14 days after staleness πŸ“ 

borceacristiann commented 2 years ago

Hi, I have the same problem. I tried to add interaction: root, but it still doesn't work.

Runtime Env:

vobu commented 2 years ago

I guess we'll have to look at the SmartFilterBar specifically, meaning we'll include exactly that use case in our own tests. We'll get back to you two here!

borceacristiann commented 2 years ago

Sorry, I missed the fact that it was about the SmartFilterBar, in fact I have the same problem with sap.ui.comp.filterbar.FilterBar.

github-actions[bot] commented 2 years ago

hey πŸ‘‹ - silence for 30 days 🀐 ... anybody? πŸ˜€

github-actions[bot] commented 2 years ago

closed πŸ“΄ because silencio 🀫 since an additional 14 days after staleness πŸ“