gallery.test_textinput.WriteAndClearTextInputTestCase.test_write_on_textfield_must_update_text fails for certain regional formats

Bug #1311907 reported by Tim Peeters
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu UI Toolkit
Fix Released
Critical
Cris Dywan
ubuntu-ui-toolkit (Ubuntu)
Fix Released
Undecided
Unassigned
Vivid
New
Undecided
Unassigned

Bug Description

I am running a relatively fresh installation of trusty inside vmware on a mac.
I branched staging, compiled it and then ran the test as shown below. I get the same error when I run it with autopilot and autopilot3. Apparently a dot is accepted as input when it should accept only integers.

tim@trusty:~/dev/ubuntu-ui-toolkit/staging$ source export_modules_dir.sh
tim@trusty:~/dev/ubuntu-ui-toolkit/staging$ cd tests/autopilot/
tim@trusty:~/dev/ubuntu-ui-toolkit/staging/tests/autopilot$ autopilot run ubuntuuitoolkit.tests.gallery.test_textinput.WriteAndClearTextInputTestCase.test_write_on_textfield_must_update_text
Loading tests from: /home/tim/dev/ubuntu-ui-toolkit/staging/tests/autopilot

Tests running...
======================================================================
FAIL: ubuntuuitoolkit.tests.gallery.test_textinput.WriteAndClearTextInputTestCase.test_write_on_textfield_must_update_text(only integers textfield)
----------------------------------------------------------------------
Empty attachments:
  /var/log/syslog
  process-stdout

process-return-code: {{{-15}}}
process-stderr: {{{
Testability driver loaded. Wire protocol version is "1.4".
unity::action::ActionManager::ActionManager(QObject*):
 Could not determine application identifier. HUD will not work properly.
 Provide your application identifier in $APP_ID environment variable.

** (qmlscene:12786): WARNING **: Unable to register app: GDBus.Error:org.freedesktop.DBus.Error.InvalidArgs: Invalid application ID
}}}

Traceback (most recent call last):
  File "/home/tim/dev/ubuntu-ui-toolkit/staging/tests/autopilot/ubuntuuitoolkit/tests/gallery/test_textinput.py", line 48, in test_write_on_textfield_must_update_text
    self.assertEqual(self.expected_text, textfield.text)
  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 321, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 406, in assertThat
    raise mismatch_error
MismatchError: '-100123' != u'-100.123'

Ran 3 tests in 20.788s
FAILED (failures=1)

Related branches

Tim Peeters (tpeeters)
description: updated
Changed in ubuntu-ui-toolkit:
assignee: nobody → Zsombor Egri (zsombi)
importance: Undecided → Critical
Revision history for this message
Zsombor Egri (zsombi) wrote :

Cannot reproduce. I cannot even see the dot typed.

Revision history for this message
Tim Peeters (tpeeters) wrote :

In System Settings > Language Support > Regional Formats > Display numbers... if my setting is "Nederlands" then I can enter the DOT and the test fails. Changing that setting to US makes it impossible to enter a dot (but a comma is allowed), and the test does not fail. So it depends on your number format.

summary: - ubuntuuitoolkit.tests.gallery.test_textinput.WriteAndClearTextInputTestCase.test_write_on_textfield_must_update_text
- failure
+ gallery.test_textinput.WriteAndClearTextInputTestCase.test_write_on_textfield_must_update_text
+ fails for certain regional formats
Cris Dywan (kalikiana)
Changed in ubuntu-ui-toolkit:
assignee: Zsombor Egri (zsombi) → Christian Dywan (kalikiana)
status: New → Confirmed
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/staging at revision 1030, scheduled for release in ubuntu-ui-toolkit, milestone Unknown

Changed in ubuntu-ui-toolkit:
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-ui-toolkit - 0.1.46+14.10.20140502.6-0ubuntu1

---------------
ubuntu-ui-toolkit (0.1.46+14.10.20140502.6-0ubuntu1) utopic; urgency=low

  [ Tarmac ]
  * [ Zoltán Balogh]   * Skip tests only for powerpc   [ Christian Dywan
    ]   * Use locale format specifier in textfield_numbers. (LP:
    #1311907, #1283236, #1285958, #1124071, #1256424, #1276172,
    #1228042, #1183255, #1283212, #1168914, #1273187, #1276821,
    #1308086, #1288937, #1292601)

  [ Zoltán Balogh ]
  * [ Zoltán Balogh]   * Skip tests only for powerpc   [ Christian Dywan
    ]   * Use locale format specifier in textfield_numbers. (LP:
    #1311907, #1283236, #1285958, #1124071, #1256424, #1276172,
    #1228042, #1183255, #1283212, #1168914, #1273187, #1276821,
    #1308086, #1288937, #1292601)

  [ tpeeters ]
  * [ Zoltán Balogh]   * Skip tests only for powerpc   [ Christian Dywan
    ]   * Use locale format specifier in textfield_numbers. (LP:
    #1311907, #1283236, #1285958, #1124071, #1256424, #1276172,
    #1228042, #1183255, #1283212, #1168914, #1273187, #1276821,
    #1308086, #1288937, #1292601)
 -- Ubuntu daily release <email address hidden> Fri, 02 May 2014 16:31:41 +0000

Changed in ubuntu-ui-toolkit (Ubuntu):
status: New → Fix Released
Zsombor Egri (zsombi)
Changed in ubuntu-ui-toolkit:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.