wdi5 icon indicating copy to clipboard operation
wdi5 copied to clipboard

enterText method does not trigger Suggest Event

Open borceacristiann opened this issue 2 years ago • 28 comments

Describe the bug sap.m.MultiInput have suggestionColumns and suggestionRows aggregations used for tabular input suggestions. Besides this, sap.m.MultiInput has the startSuggestion property used to specify minimum length of the entered text in input before suggest event is fired.

Unfortunately, the suggest event is not triggered after calling the enterText method, respectively the suggestionsm list is not displayed.

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

 const multiInputSelector = {
        selector: {
            interaction: "root",
            controlType: "sap.m.MultiInput",
             properties: {
                    name: "MultiInputName"
                }
        }
    }

    const multiInput = await browser.asControl(multiInputSelector);
    await multiInput.enterText(value);

To Reproduce enter text into a MultiInput using enterText method, suggest event is not triggered and suggestion list is not rendered

Expected behavior enter text into a MultiInput using enterText method, suggest event is triggered and suggestion list is rendered

Runtime Env (please complete the following information):

  • wdi5/wdio-ui5-service-version: 0.9.13
  • UI5 version: 1.96.0
  • wdio-version: 7.25.0
  • node-version: 14.17.3
  • OS: macOS Monterey 12.6
  • Browser + Version: Chrome 106.0.0

borceacristiann avatar Oct 03 '22 12:10 borceacristiann

Hi @borceacristiann,

thanks for submitting this issue. For enterText we are using the same functionality that OPA5 uses. So it could be an issue on their side. We will come back to you when we could clarify that.

Siolto avatar Oct 04 '22 10:10 Siolto

I just checked it myself and the suggestions are not triggered when we use enterText. @hmanchev is this something you and your team could look into?

Regards, Simon

Siolto avatar Oct 06 '22 14:10 Siolto

Hello @Siolto , @borceacristiann ,

I will take a look and notify you when I have any update.

BR, Hristo

hmanchev avatar Oct 18 '22 06:10 hmanchev

hey 👋 - silence for 30 days 🤐 ... anybody? 😀

github-actions[bot] avatar Dec 08 '22 02:12 github-actions[bot]

hey @hmanchev - were you able to research this?

vobu avatar Dec 08 '22 06:12 vobu

Hi colleagues,

after sync with OPA colleagues, I can conclude that this is not a bug. enterText is generic action and you can't expect that it will do all the expected events in all ui5 controls.

Actually such functionality (suggestions) could be subject of unit testing. In the case of E2E test, you probably want to automate scenario and just providing proper text should be enough.

Nevertheless, @borceacristiann could you please give more details about the use case or scenario which you want to automate? This will be helpful to extend some documentation and/or propose some solution.

hmanchev avatar Dec 08 '22 09:12 hmanchev

Hi @hmanchev,

I have the following scenario:

  1. In the filterbar there is an input that displays a suggestions list only after entering at least 2 characters image

  2. After entering at least two characters, you can choose an item from the suggestions list in order set a filter value. image image

Unfortunately, the suggest event is not triggered after calling the enterText method, respectively the suggestion list is not displayed and I cannot select any item from the list.

borceacristiann avatar Dec 09 '22 09:12 borceacristiann

hey 👋 - silence for 30 days 🤐 ... anybody? 😀

github-actions[bot] avatar Jan 09 '23 02:01 github-actions[bot]

Hi @borceacristiann,

Thanks for the details. I will discuss them with OPA colleagues will see whether we can improve docs. Looking at your scenario. I would recommend you not to seek for covering this suggestion functionality in your E2E test as the suggestions are already covered with different test in many use cases by UI5 controls tests.

hmanchev avatar Jan 09 '23 07:01 hmanchev

Hi @hmanchev, I'm not looking to cover this suggestion function.

I just need the suggestions list to be displayed(after calling the "enterText" method) so that I can select the filter values.

And it is necessary to choose the filter values to fulfill my test case which aims to check if the table can be filtered by multiple values and if it is filtered correctly.

borceacristiann avatar Jan 09 '23 12:01 borceacristiann

Hi @borceacristiann,

I'm trying to reproduce the issue and so far in my testing the "suggest" event does fire and the dropdown in displayed: https://jsbin.com/kicagezula/1/edit

Do you reproduce the same on the above sample? If yes, can you try to modify it a bit to resemble your setup where the issue can be reproduced?

Thanks

kineticjs avatar Jan 09 '23 15:01 kineticjs

Hi @borceacristiann,

I recalled now that you are reproducing the issue using the wdi5 API, while my sample https://jsbin.com/kicagezula/1/edit uses directly the OPA5 API (namely, the https://sapui5.hana.ondemand.com/#/api/sap.ui.test.actions.EnterText action) to enter the text.

Do you nevertheless see a way to reproduce the issue using the sample at https://jsbin.com/kicagezula/1/edit
or do you reproduce the issue using the wdi5 API only?

Thanks

kineticjs avatar Jan 09 '23 15:01 kineticjs

Hi @kineticjs, this can only be reproduced by writing and running the tests using wdio together with wdi5.

When I manually test the sapui5 application, the suggestions list is displayed properly, respectively the problem is thatentering text into a MultiInput using enterText method is not triggering suggest event and suggestion list is not rendered

borceacristiann avatar Jan 12 '23 07:01 borceacristiann

@dominikfeininger,

Sample https://jsbin.com/kicagezula/1/edit cannot reproduce the issue in the context of OPA5 only and @borceacristiann commented that so far it is only reproducible when using wdio together with wdi5. Would you look at the issue again from wdi5 side?

kineticjs avatar Jan 16 '23 12:01 kineticjs

Hi @kineticjs,

sorry for the late response. With your snippet I could figure out what the problem is. In this specific case the pressEnterKey of the EnterText function is missing. By looking further into this, I encountered the problem that in the current state of the RecordReplay API we can not provide any additional information to the RecordReplay.interactWithControl function.

On the one hand wdi5 has to pass more information and on the other hand interactWithControl has to understand the additional information

press needs an optional parameter for the interaction type to be passed. enterText needs an optional config object to pass information like clearTextFirst keepFocus pressEnterKey to the recordReplay API.

Maybe it would be good to sync on this topic. @hmanchev and @vobu what do you think?

Siolto avatar Feb 03 '23 15:02 Siolto

Maybe it would be good to sync on this topic. @hmanchev and @vobu what do you think?

yes, let's align the APIs also in the core implementation! @hmanchev please send out a meeting request to those concerned. btw: you're clearly on a killer debugging spree here @Siolto 👍 🐛 💯 re-spec-t

vobu avatar Feb 03 '23 16:02 vobu

Hello, We planned to enhance the API of the RecordReplay.interactWithControl function to allow pass information like keepFocus pressEnterKey, idSuffix. That would allow the display the suggestions list as requested in this issue. We will update when the new implementation is available.

kineticjs avatar Feb 09 '23 14:02 kineticjs

Hello @borceacristiann, which version of UI5 are you using and if it is not latest what are you plans to upgrade? Thanks

jdichev avatar Feb 09 '23 16:02 jdichev

Hi @jdichev we are using 1.96.0 UI5 version.

In the near future we do not plan to change the version because according SAPUI5 Versions Maintenance Status 1.96.0 will be maintained until the end of 2024.

Thanks.

borceacristiann avatar Feb 17 '23 10:02 borceacristiann

hey 👋 - silence for 30 days 🤐 ... anybody? 😀

github-actions[bot] avatar Mar 20 '23 02:03 github-actions[bot]

Hi @kineticjs,

sorry for the late response. With your snippet I could figure out what the problem is. In this specific case the pressEnterKey of the EnterText function is missing. By looking further into this, I encountered the problem that in the current state of the RecordReplay API we can not provide any additional information to the RecordReplay.interactWithControl function.

On the one hand wdi5 has to pass more information and on the other hand interactWithControl has to understand the additional information

press needs an optional parameter for the interaction type to be passed. enterText needs an optional config object to pass information like clearTextFirst keepFocus pressEnterKey to the recordReplay API.

Maybe it would be good to sync on this topic. @hmanchev and @vobu what do you think?


@hmanchev and @vobu

I ran into another issue where a table row cannot be selected. The reason is because the interaction rowsel doesn't work properly. Here, I see that it is already mentioned that the press function doesn't process the passed interaction.

Just wanted to add my +1 vote for the resolution of this issue.

Thanks.

zaid-tariq avatar Mar 20 '23 10:03 zaid-tariq

Hello Colleagues

I faced an issue, that I am not able to find control by id and interaction

I send screenshot of my locator: image

Thanks

MikhailDryk avatar Apr 11 '23 09:04 MikhailDryk

hey 👋 - silence for 30 days 🤐 ... anybody? 😀

github-actions[bot] avatar May 12 '23 02:05 github-actions[bot]

closed 📴 because silencio 🤫 since an additional 14 days after staleness 📠

github-actions[bot] avatar May 26 '23 02:05 github-actions[bot]

closed 📴 because silencio 🤫 since an additional 14 days after staleness 📠

github-actions[bot] avatar Jul 20 '23 02:07 github-actions[bot]

closed 📴 because silencio 🤫 since an additional 14 days after staleness 📠

github-actions[bot] avatar Aug 04 '23 02:08 github-actions[bot]

reopened live during the wdi5 steering committee :)

vobu avatar Dec 14 '23 12:12 vobu

Hello @borceacristiann,

Can you give us a reason what prevents you from using a newer version? Unfortunately, the change in OPA was introduced as a new feature with version 1.113 and features are not allowed to be down-ported as per UI5 policy. If newer version cannot be used and down-port cannot be done seems this cannot be solved for version 1.96 and really sorry about it.

Best regards, Jordan

jdichev avatar Dec 14 '23 12:12 jdichev