Closed Bug 928922 Opened 11 years ago Closed 11 years ago

test_edit_contact.py cannot show edit screen

Categories

(Firefox OS Graveyard :: Gaia::Contacts, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bkelly, Assigned: bkelly)

References

Details

(Whiteboard: [xfail])

Attachments

(1 file)

The gaia-ui-test test_edit_contact.py is currently failing with: TEST-UNEXPECTED-FAIL | test_edit_contact.py test_edit_contact.TestContacts.test_edit_contact | TimeoutException: Element contact-form present but not displayed before timeout This is occurring because of the following line: (defObj && typeof(defObj) === 'object') ? defObj.toString() : defObj; Since `typeof null === 'object'`, this can incorrectly try to dereference null. This in turn stops the edit screen from showing. Its unclear to me if this is related to webidl or not. I was able to reproduce it on my phone with an imported contact from google, though.
Check for truthy value before using typeof to avoid the null issue.
Attachment #819716 - Flags: review?(francisco.jordano)
Whiteboard: [xfail]
Blocks: 850430
Comment on attachment 819716 [details] Pull request at https://github.com/mozilla-b2g/gaia/pull/12977 Thanks! Simple and effective as always.
Attachment #819716 - Flags: review?(francisco.jordano) → review+
Thanks. Merged: https://github.com/mozilla-b2g/gaia/commit/ea3a1cb1a0f47d82916bf5038081045e59113c0e Leaving open until we get the rest landed and can re-enable the tests.
Depends on: 929078
Tests re-enabled.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: