Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enterText method does not trigger Suggest Event #355

Open
borceacristiann opened this issue Oct 3, 2022 · 28 comments
Open

enterText method does not trigger Suggest Event #355

borceacristiann opened this issue Oct 3, 2022 · 28 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@borceacristiann
Copy link

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
@Siolto
Copy link
Collaborator

Siolto commented Oct 4, 2022

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
Copy link
Collaborator

Siolto commented Oct 6, 2022

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

@hmanchev
Copy link
Collaborator

Hello @Siolto , @borceacristiann ,

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

BR,
Hristo

@kineticjs kineticjs self-assigned this Oct 18, 2022
@dominikfeininger dominikfeininger added the bug Something isn't working label Nov 7, 2022
@github-actions
Copy link

github-actions bot commented Dec 8, 2022

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

@github-actions github-actions bot added the stale label Dec 8, 2022
@vobu
Copy link
Contributor

vobu commented Dec 8, 2022

hey @hmanchev - were you able to research this?

@hmanchev
Copy link
Collaborator

hmanchev commented Dec 8, 2022

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.

@github-actions github-actions bot removed the stale label Dec 9, 2022
@borceacristiann
Copy link
Author

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.

@github-actions
Copy link

github-actions bot commented Jan 9, 2023

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

@github-actions github-actions bot added the stale label Jan 9, 2023
@hmanchev
Copy link
Collaborator

hmanchev commented Jan 9, 2023

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.

@borceacristiann
Copy link
Author

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.

@kineticjs
Copy link
Collaborator

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
Copy link
Collaborator

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

@github-actions github-actions bot removed the stale label Jan 10, 2023
@borceacristiann
Copy link
Author

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

@kineticjs
Copy link
Collaborator

kineticjs commented Jan 16, 2023

@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 kineticjs removed their assignment Jan 16, 2023
@Siolto
Copy link
Collaborator

Siolto commented Feb 3, 2023

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?

@vobu
Copy link
Contributor

vobu commented Feb 3, 2023

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

@kineticjs
Copy link
Collaborator

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.

@jdichev
Copy link
Collaborator

jdichev commented Feb 9, 2023

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

@borceacristiann
Copy link
Author

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.

@github-actions
Copy link

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

@github-actions github-actions bot added the stale label Mar 20, 2023
@zaid-tariq
Copy link

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.

@github-actions github-actions bot removed the stale label Mar 21, 2023
@MikhailDryk
Copy link

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

@github-actions
Copy link

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

@github-actions github-actions bot added the stale label May 12, 2023
@github-actions
Copy link

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

@github-actions
Copy link

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

@Siolto Siolto reopened this Jul 20, 2023
@github-actions
Copy link

github-actions bot commented Aug 4, 2023

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

@github-actions github-actions bot closed this as completed Aug 4, 2023
@vobu vobu reopened this Dec 14, 2023
@vobu vobu added enhancement New feature or request and removed stale labels Dec 14, 2023
@vobu
Copy link
Contributor

vobu commented Dec 14, 2023

reopened live during the wdi5 steering committee :)

@jdichev
Copy link
Collaborator

jdichev commented Dec 14, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

9 participants