openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

Misleading mobile device detection

Open whydrae opened this issue 4 years ago • 2 comments

OpenUI5 version: 1.100.0

Browser/version (+device/version): Edge

Any other tested browsers/devices(OK/FAIL): Chrome, Firefox - FAIL

URL (minimal example if possible): https://github.com/SAP/openui5-sample-app

Steps to reproduce the problem:

  1. Use a laptop with touch support;
  2. Run integration tests using npm run karma for application openui5-sample-app.

What is the expected result?

Integration tests complete without errors.

What happens instead?

Integration tests fail, because UI5 identifies the laptop with touch support as a mobile device and OPA can't find the button. UI5 either incorrectly identify the device and set the mobile property, or documentation is misleading.

I've created a linked issue in the target app repository: https://github.com/SAP/openui5-sample-app/issues/150.

whydrae avatar Apr 08 '22 05:04 whydrae

Hello @whydrae,

Thank you for sharing this finding. I've created an internal incident 2270079894. The status of the issue will be updated here in GitHub.

JumpNRun avatar Apr 26 '22 09:04 JumpNRun

Hello @whydrae,

laptops with touch support are detected as Device.system.tablet = true Device.system.desktop = true Device.system.hybrid = true

and therefore also as Device.browser.mobile.

I extended the documentation and added some additional references to explain the impact of touch devices more in detail.

Regarding the test there was a pull request which is also already merged. https://github.com/SAP/openui5-sample-app/pull/151 The PR skips the test which are not executable on mobile devices.

Kind regards

H4ze avatar May 05 '22 15:05 H4ze