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

Stable Test Execution for Launchpad Tiles #12

Closed
timostark opened this issue Jan 18, 2019 · 3 comments
Closed

Stable Test Execution for Launchpad Tiles #12

timostark opened this issue Jan 18, 2019 · 3 comments

Comments

@timostark
Copy link

timostark commented Jan 18, 2019

Hi All,

Sorry for an additional question (instead of issue). Fiori Launchpad tiles do not have static-ids. Additionally they don't have a static i18n text. The static key (Semantic Navigation) is hidden within a binding-context.
How are you internally solving that issue? Are you setting the browser-language to english, and select by the text property?

var genericTile = element(by.control( { controlType : "sap.m.GenericTile",
                 properties:[{ header : "Tile-Title" }] }));
genericTile.click();

Alternative way would be a jQuery selection $('a[href$="#Z_SEMANTIC#display"]')

I don't like both too much (Test shouldn't depend on translatable texts, I want to avoid "native" jQuery selectors where possible). Is there any way to make a by.control based on binding context values? So sth. like:

var genericTile = element(by.control( { controlType : "sap.ushell.ui.launchpad.Tile",
              context:{ propertyName: "target", model: null, value: "#Z_SEMANTIC#display" } }));
genericTile.click();

Especially for elements under control of the developer, such binding-context value checks could provided extended assertions tests, of stuff which is not directly visible on the UI.

In https://github.com/SAP/ui5-uiveri5/blob/master/docs/usage/locators.md I wasn't able to find anything about that. Also there doesn't seem to be any OPA5 matcher.

Thanks & Regards,
Timo

@tsaleksandrova
Copy link
Contributor

Hi Timo,

The BindingPath matcher can match binding context, but it currently can't match by property name.
The I18N matcher is intended for translatable texts and can match by property name.
Have you tried these matchers for your usecase?

Regards,
Tsvetelina

@timostark
Copy link
Author

Hi Tsvetelina,

Thanks for your answer. I don't really get what you are saying about BindingPath. Isn't that a matcher to ONLY match against the path of a binding, and not against the value/object behind the path?

Still closing the ticket, as there is an alternative solution for that issue (access property target, using the property matcher).

Thanks for any further help :-)
Timo

@maximnaidenov
Copy link
Contributor

Hi Timo,

the idea of the binding is to find the control that is bound to a specific backend data value. The typical use is to select a specific row from a table e.g. you select the row based on its binding to a model with specific binding context. Or you select one checkbox based on the binding path in the model.
Hope this helps, please check the openui5 data binding docs for further details

Maxim

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

No branches or pull requests

3 participants