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

result of async controller functions are not transported correctly from browser- to Node.js-scope #657

Open
vobu opened this issue Feb 6, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@vobu
Copy link
Contributor

vobu commented Feb 6, 2025

Describe the bug
Async functions in a UI5 controller (browser-scope) don't resolve correctly in Node.js-scope: instead of the atomic result, a wdi5 Object with (partly) a Promise signature is returned.

To Reproduce
Steps to reproduce the behavior:

Test in question: examples/ui5-ts-app/test/e2e/Basic.test.ts

$> cd examples/ui5-ts-app
$> npm run authentication:basic-auth -- --spec Basic

# (...)
[0-0] Error in "Basic.should resolve an async Controller function"
Error: expect(received).toEqual(expected) // deep equality

Expected: 10
Received: {"_aProtoFunctions": ["then", "catch", "finally", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "toString", "valueOf", "toLocaleString"], "_baseObject": {}, "_uuid": "f60ae34b-7c1c-4df0-ab04-09b4c0e06370", "catch": [Function bound _excuteObjectMethod], "finally": [Function bound _excuteObjectMethod], "hasOwnProperty": [Function bound _excuteObjectMethod], "isPrototypeOf": [Function bound _excuteObjectMethod], "propertyIsEnumerable": [Function bound _excuteObjectMethod], "then": [Function bound _excuteObjectMethod], "toLocaleString": [Function bound _excuteObjectMethod], "toString": [Function bound _excuteObjectMethod], "valueOf": [Function bound _excuteObjectMethod]}

Expected behavior
10 should be returned

Logs/Console Output
-see above-

Runtime Env (please complete the following information):

  • wdi5/wdio-ui5-service-version: 2.1.1
  • UI5 version: 1.132.1
  • wdio-version (output of wdio --version): 8.41.0
  • node-version (output of node --version): v20.16.0
  • OS: macOS 15.3
  • Browser + Version: Chrome for Testing 133.0.6943.54
@vobu vobu added the bug Something isn't working label Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant