Closed Bug 1207646 Opened 9 years ago Closed 9 years ago

test_delete_call_log.py : AssertionError: 'Edit' != u''

Categories

(Firefox OS Graveyard :: Gaia::UI Tests, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: MaxIvanov, Assigned: martijn.martijn)

References

Details

Attachments

(1 file)

Description: Test case fails with "Assertion" error or JavascriptException

Steps:
1. Update a flame device to 20150923030227
2. Run this test case http://lxr.mozilla.org/gaia/source/tests/python/gaia-ui-tests/gaiatest/tests/functional/dialer/test_delete_call_log.py

Actual result:
"Assertion" error or JavascriptException

Expected result:
Test completes successfully.

Repro Rate: Reproducible via Jenkins (0/5 passing, unable to reproduce manually.
http://jenkins1.qa.scl3.mozilla.com/job/flame-kk.ui.adhoc.bitbar/247/HTML_Report/
Test case fails with two different errors:
Traceback (most recent call last):
File "/var/lib/jenkins/jobs/flame-kk.ui.adhoc.bitbar/workspace/.env/lib/python2.7/site-packages/marionette_client-0.17-py2.7.egg/marionette/marionette_test.py", line 277, in run
self.setUp()
File "/var/lib/jenkins/jobs/flame-kk.ui.adhoc.bitbar/workspace/tests/python/gaia-ui-tests/gaiatest/tests/functional/dialer/test_delete_call_log.py", line 20, in setUp
self.data_layer.insert_call_entry(MockCall(call_type='dialing'))
File "/var/lib/jenkins/jobs/flame-kk.ui.adhoc.bitbar/workspace/tests/python/gaia-ui-tests/gaiatest/gaia_test.py", line 461, in insert_call_entry
self.marionette.execute_script('window.wrappedJSObject.CallLogDBManager.add(%s);' % (json.dumps(call)))
File "/var/lib/jenkins/jobs/flame-kk.ui.adhoc.bitbar/workspace/.env/lib/python2.7/site-packages/marionette_driver-0.13-py2.7.egg/marionette_driver/marionette.py", line 1500, in execute_script
rv = self._send_message("executeScript", body, key="value")
File "/var/lib/jenkins/jobs/flame-kk.ui.adhoc.bitbar/workspace/.env/lib/python2.7/site-packages/marionette_driver-0.13-py2.7.egg/marionette_driver/decorators.py", line 36, in _
return func(*args, **kwargs)
File "/var/lib/jenkins/jobs/flame-kk.ui.adhoc.bitbar/workspace/.env/lib/python2.7/site-packages/marionette_driver-0.13-py2.7.egg/marionette_driver/marionette.py", line 711, in _send_message
    self._handle_error(resp)
  File "/var/lib/jenkins/jobs/flame-kk.ui.adhoc.bitbar/workspace/.env/lib/python2.7/site-packages/marionette_driver-0.13-py2.7.egg/marionette_driver/marionette.py", line 752, in _handle_error
    raise errors.lookup(error)(message, stacktrace=stacktrace)
JavascriptException: JavascriptException: DataError: Data provided to an operation does not meet requirements.
stacktrace:
execute_script @gaia_test.py, line 461
inline javascript, line 490
src: ""
----------------------------------------------------------------------------

Traceback (most recent call last):
File "/var/lib/jenkins/jobs/flame-kk.ui.adhoc.bitbar/workspace/.env/lib/python2.7/site-packages/marionette_client-0.17-py2.7.egg/marionette/marionette_test.py", line 296, in run
testMethod()
File "/var/lib/jenkins/jobs/flame-kk.ui.adhoc.bitbar/workspace/tests/python/gaia-ui-tests/gaiatest/tests/functional/dialer/test_delete_call_log.py", line 31, in test_delete_call_log
self.assertEqual('Edit', call_log.header_text)
AssertionError: 'Edit' != u''
Blocks: 1207675
I suspect this is caused by the pull request in bug 1151627: https://github.com/mozilla-b2g/gaia/pull/31706/files
Assignee: nobody → martijn.martijn
Blocks: 1151627
Comment on attachment 8665400 [details] [review]
[gaia] mwargers:1207646 > mozilla-b2g:master

I don't really understand the Python datetime methods. It seems what I'm doing here is awfully complicated, but it works. Perhaps it could be done in a simpler way?
Attachment #8665400 - Flags: review?(npark)
Attachment #8665400 - Flags: review?(jdorlus)
Hrm, that pull request gives a date somewhere in 1970, that's not what we want.
Ok, I just updated the pull request with something that works and has the correct date. I also removed the expected = fail line in the manifest.ini file of test_call_log_groups, because bug 1117804 seems fixed with the fix of bug 1151627.
Comment on attachment 8665400 [details] [review]
[gaia] mwargers:1207646 > mozilla-b2g:master

Looks good to me
Attachment #8665400 - Flags: review?(npark) → review+
Just updated the pull request with a suggestion from No-Jun, which made the line much smaller.
Blocks: 1096385
Comment on attachment 8665400 [details] [review]
[gaia] mwargers:1207646 > mozilla-b2g:master

I also removed the disabled = rule for test_call_log_all_calls.py, that test might now be fixed too, see bug 1096385, comment 10.
I had to make a small adjustment to the test to get it working, btw, see pull request.
Attachment #8665400 - Flags: review+ → review?(npark)
Comment on attachment 8665400 [details] [review]
[gaia] mwargers:1207646 > mozilla-b2g:master

this works locally for me, and looks good.
Attachment #8665400 - Flags: review?(npark) → review+
Comment on attachment 8665400 [details] [review]
[gaia] mwargers:1207646 > mozilla-b2g:master

Awesome patch. Works for me.
Attachment #8665400 - Flags: review?(jdorlus) → review+
Merged: https://github.com/mozilla-b2g/gaia/commit/e77e57957f6b90ea04ac9ffd863d401c3c02886e
Status: NEW → RESOLVED
Closed: 9 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: