← Back to team overview

touch-packages team mailing list archive

[Bug 1483279] Re: Unit tests fail where mouseClick() is used to simulate a click event on a MouseArea which is a descendant of a TextField

 

** Branch linked: lp:ubuntu/wily-proposed/webbrowser-app

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to ubuntu-ui-toolkit in
Ubuntu.
https://bugs.launchpad.net/bugs/1483279

Title:
  Unit tests fail where mouseClick() is used to simulate a click event
  on a MouseArea which is a descendant of a TextField

Status in ubuntu-ui-toolkit package in Ubuntu:
  New

Bug description:
  This appears to be a regression in version 1.3 of the UITK.

  The browser has an AddressBar component which contains a TextField,
  and the secondaryItem for this TextField is a MouseArea (for toggling
  the bookmarked status of the current address). This component is unit
  tested, and there is a test that simulates a click on the
  secondaryItem to verify that the bookmarked status is correctly
  toggled.

  This test worked with version 1.2 of the UITK, but fails when I update the import of Ubuntu.Components to 1.3.
  It appears that the TextField itself intercepts the simulated mouse click event, thus getting active focus.

  Note that the component works as expected when used in an app by a
  normal user manipulating a mouse (i.e. the secondaryItem can be
  clicked and that toggles the bookmark status as expected). It’s only
  the unit tests that are failing.

  I’m suspecting that the way QtTest simulates a mouse click event
  doesn’t play well with Ubuntu.Mouse.forwardTo, although I’m not really
  sure how and why.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1483279/+subscriptions


References