-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
Problem getting selected keys from MultiComboBox-control #160
Comments
hi! all looking good on your code (except the |
Thanks for your reply! Yes, I'll close this issue. Just want to add one final thing: I did a little investigation myself. I think the issue is related to this part in executeControlMethod.js: if (Array.isArray(result)) {
// expect the method call delivers non-primitive results (like getId())
// but delivers a complex/structured type
// -> currenlty, only getAggregation(...) is supported
result = window.wdi5.createControlIdMap(result)
done(["success", result, "aggregation"])
} It seems that when the returned value of one of the get$Shorthand-methods is an array, wdi5 assumes its an array of objects, but in case of getSelectedKeys its an array of strings. Perhaps you already know, but sharing my knowledge just in case 😃 |
excellent, thanks for the hint! i'm just writing the dev time setup/onboarding doc (see #163), but here's the gist: # you need npm 7+ → we're using npm's workspaces feature
$> npm --version
# will also install all deps in workspaces + setup pre-commit hooks
$> npm i
# build entire proj once
$> npm run build
# turn on build watcher
$> npm run build:watch Then to work on a test: # start the sample js app
$> npm run _startApp:js ...in terminal 2: # run a single test with wdi5/wdio
### runs the "test:websever" script from /examples/ui5-js-app/package.json
### in workspace "examples/ui5-js-app"
### but only any test file in /examples/ui5-js-app/webapp/test/e2e/**/* that
### matches "basic" in the filename
### and run in watch mode (browser stays open, test reruns when file changes)
### for true TDD
$> npm run test:webserver -w examples/ui5-js-app -- --spec basic --watch |
Sure! I'll try to fix it 😄 |
Hello folks!
So I have an app with a MultiComboBox control with string-valued keys. I've written a simple test in wdi5 which gets this control and checks if a certain key is preset. The test looks like this:
I get the control without issue, but when calling the getSelectedKeys-method on it, it fails with a timeout-error.
Inspecting the console in the browser reveals that there is a type error in the code running in the client:
Have I written the test wrong or is this a bug?
If something is unclear with this issue, just let me know.
Thank you!
The text was updated successfully, but these errors were encountered: