Closed Bug 980271 Opened 10 years ago Closed 10 years ago

deleteAllSms atom is not working

Categories

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

x86_64
Linux
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: zcampbell, Assigned: RobertC)

Details

Attachments

(1 file)

46 bytes, text/x-github-pull-request
zcampbell
: review+
Bebe
: review+
rwood
: review+
Details | Review
After working on the other SMS atoms I noticed that the deleteAllSms atom is not working.

This is only run by the endurance tests so it might not be affecting anything but if someone has free time it should be fixed up.
Assignee: nobody → robert.chira
Attached file Pull request
Attachment #8405383 - Flags: review?(zcampbell)
Attachment #8405383 - Flags: review?(florin.strugariu)
Attachment #8405383 - Flags: review?(andrei.hutusoru)
Attachment #8405383 - Flags: review?(florin.strugariu) → review-
Attachment #8405383 - Flags: review- → review?(florin.strugariu)
Comment on attachment 8405383 [details] [review]
Pull request

This is used by other test runs Dave can you take a look pls
Attachment #8405383 - Flags: review?(dave.hunt)
Comment on attachment 8405383 [details] [review]
Pull request

Rob: Would you mind taking this review? I suspect you're more familiar with the messages WebAPI. I compared this to http://hg.mozilla.org/mozilla-central/file/215080b813a7/dom/mobilemessage/tests/marionette/head.js#l162 and expected it to be closer, but not sure if that's an issue.
Attachment #8405383 - Flags: review?(dave.hunt) → review?(rwood)
Ah yes, the SMS API was updated to use promises. I'll have a look.
Comment on attachment 8405383 [details] [review]
Pull request

Please see comments in the PR, thanks!

(Note: Ignore comment 4, it is the WebTelephony API that was changed to use promises; not SMS).
Attachment #8405383 - Flags: review?(rwood) → review-
Comment on attachment 8405383 [details] [review]
Pull request

I updated the function to use the cursor itself as suggested.
Also modified getAllSms to do the same.
Attachment #8405383 - Flags: review- → review?(rwood)
Attachment #8405383 - Flags: review?(florin.strugariu) → review+
Comment on attachment 8405383 [details] [review]
Pull request

Looks good to me!
Attachment #8405383 - Flags: review?(andrei.hutusoru) → review+
Comment on attachment 8405383 [details] [review]
Pull request

gaiatest --testvars=/home/florinstrugariu/testvars.json --address=localhost:2828 --type=b2g --timeout=30000 --html-output=results/index.htm --restart /home/florinstrugariu/gaia/gaia/tests/python/gaia-ui-tests/gaiatest/tests/functional/messages/test_sms_notification.py
starting httpd
running webserver on http://192.168.77.192:46914/
TEST-START test_sms_notification.py
test_sms_notification (test_sms_notification.TestSmsNotification) ... ERROR

======================================================================
ERROR: None
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/florinstrugariu/.virtualenvs/sdvxzcvz/local/lib/python2.7/site-packages/marionette_client-0.7.5-py2.7.egg/marionette/marionette_test.py", line 163, in run
    testMethod()
  File "/home/florinstrugariu/gaia/gaia/tests/python/gaia-ui-tests/gaiatest/tests/functional/messages/test_sms_notification.py", line 23, in test_sms_notification
    message="Notification did not appear. SMS database dump: %s " % self.data_layer.get_all_sms())
  File "/home/florinstrugariu/gaia/gaia/tests/python/gaia-ui-tests/gaiatest/gaia_test.py", line 322, in get_all_sms
    return self.marionette.execute_async_script("return GaiaDataLayer.getAllSms();", special_powers=True)
  File "/home/florinstrugariu/.virtualenvs/sdvxzcvz/local/lib/python2.7/site-packages/marionette_client-0.7.5-py2.7.egg/marionette/marionette.py", line 1162, in execute_async_script
    filename=os.path.basename(frame[0]))
  File "/home/florinstrugariu/.virtualenvs/sdvxzcvz/local/lib/python2.7/site-packages/marionette_client-0.7.5-py2.7.egg/marionette/marionette.py", line 613, in _send_message
    self._handle_error(response)
  File "/home/florinstrugariu/.virtualenvs/sdvxzcvz/local/lib/python2.7/site-packages/marionette_client-0.7.5-py2.7.egg/marionette/marionette.py", line 648, in _handle_error
    raise JavascriptException(message=message, status=status, stacktrace=stacktrace)
JavascriptException: JavascriptException: ReferenceError: request is not defined
stacktrace:
	execute_async_script @gaia_test.py, line 322
	inline javascript, line 912
	src: "    request.onsuccess = function(event) {"
TEST-UNEXPECTED-FAIL | test_sms_notification.py test_sms_notification.TestSmsNotification.test_sms_notification | 
TEST-UNEXPECTED-FAIL | test_sms_notification.py test_sms_notification.TestSmsNotification.test_sms_notification | 
----------------------------------------------------------------------
Ran 1 test in 62.178s

FAILED (errors=1)

SUMMARY
-------
passed: 0
failed: 1
todo: 0

FAILED TESTS
-------
test_sms_notification.py test_sms_notification.TestSmsNotification.test_sms_notification
Attachment #8405383 - Flags: review+ → review-
Comment on attachment 8405383 [details] [review]
Pull request

I updated the PR, the error should no longer occur.
Attachment #8405383 - Flags: review?(florin.strugariu)
Attachment #8405383 - Flags: review?(andrei.hutusoru)
Attachment #8405383 - Flags: review-
Attachment #8405383 - Flags: review+
This is up fro a while can you rebase and re test this some of the tests had been changed
I did the rebase without any conflicts and the tests run as expected.
Comment on attachment 8405383 [details] [review]
Pull request

r+, it works
Attachment #8405383 - Flags: review?(zcampbell) → review+
Attachment #8405383 - Flags: review?(florin.strugariu) → review+
Comment on attachment 8405383 [details] [review]
Pull request

Looks great and works. Apologies for the review delay!
Attachment #8405383 - Flags: review?(rwood) → review+
https://github.com/mozilla-b2g/gaia/commit/7e4b9d0e9e334ed8ee3909e368d909512e6cf4a9
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Attachment #8405383 - Flags: review?(andrei.hutusoru)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: