Closed Bug 1112583 Opened 10 years ago Closed 10 years ago

Add a test to verify that a received call notification is deleted when the SMS is deleted

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: viorela, Assigned: viorela)

Details

Attachments

(1 file)

Add a test to automate the moztrap testcase: https://moztrap.mozilla.org/manage/case/8778/

When user receives a notification for SMS but deletes the SMS in app, the SMS notification is removed.

Open Messages application
	Messages are displayed
Send an SMS to test device
	SMS notification is recieved and slides up from UI
Open message thread with the new SMS in the Messages app
	Message thread is open
Delete the latest (new) SMS
	SMS is deleted
Slide down notification menu
	SMS notification no longer appears.
I opened PR
QA Whiteboard: [fxosqa-auto-s6]
I worked on automating this testcase, and I encountered an issue. 
The test is failing permanently after tapping the delete button: https://github.com/mozilla-b2g/gaia/pull/26849/files#diff-77fba7c38d010676221555d824891125R64
Delete message confirmation window is displayed after doing tap() on delete button: https://github.com/mozilla-b2g/gaia/blob/4cfa6039e17b5e3c3ae756d5f2cfe342a90235f0/apps/system/js/app_modal_dialog.js
I can't interact with any element of this page, in order to confirm/cancel message deletion. 
The phone gets stuck to that page for a few minutes (~5), then I get the failure pasted below. 

Delete button is among the Message options menu(Forward, Select test, View message report). I performed tap() on each of this options and I encountered no issue, I was able to easily interact with any element of the pages returned after the tap. 

The behavior of the test looks similar to the one described in Bug 1065933. 

The test is failing with:

The B2G process has restarted after crashing during  the tests so Marionette can't respond due to either a Gecko, Gaia or Marionette error. Above, the 5 most recent errors are listed. Check logcat for all errors if these errors are not the cause of the failure.
TEST-UNEXPECTED-ERROR | test_sms_notification_removed_when_sms_deleted.py TestSmsNotification.test_sms_notification | TimeoutException: TimeoutException: Connection timed out
 

Traceback (most recent call last):
  File "/home/viorelaioia/.virtualenvs/gaia_tests/local/lib/python2.7/site-packages/marionette_client-0.8.5-py2.7.egg/marionette/marionette_test.py", line 273, in run
    testMethod()
  File "/home/viorelaioia/gaia/tests/python/gaia-ui-tests/gaiatest/tests/functional/messages/test_sms_notification_removed_when_sms_deleted.py", line 39, in test_sms_notification
    activities.tap_delete_message()
  File "/home/viorelaioia/gaia/tests/python/gaia-ui-tests/gaiatest/apps/messages/regions/activities.py", line 65, in tap_delete_message
    self.marionette.find_element(*self._delete_message_button_locator).tap()
  File "/home/viorelaioia/.virtualenvs/gaia_tests/local/lib/python2.7/site-packages/marionette_client-0.8.5-py2.7.egg/marionette/marionette.py", line 89, in tap
    return self.marionette._send_message('singleTap', 'ok', id=self.id, x=x, y=y)
  File "/home/viorelaioia/.virtualenvs/gaia_tests/local/lib/python2.7/site-packages/marionette_client-0.8.5-py2.7.egg/marionette/decorators.py", line 36, in _
    return func(*args, **kwargs)
  File "/home/viorelaioia/.virtualenvs/gaia_tests/local/lib/python2.7/site-packages/marionette_client-0.8.5-py2.7.egg/marionette/marionette.py", line 611, in _send_message
    "Connection timed out", status=errors.ErrorCodes.TIMEOUT)
TEST-INFO took 438210ms
test_end for test_sms_notification_removed_when_sms_deleted.py TestSmsNotification.test_sms_notification logged while not in progress. Logged with data: {"status": "ERROR", "extra": {}, "expected": "PASS", "test": "test_sms_notification_removed_when_sms_deleted.py TestSmsNotification.test_sms_notification", "message": "MarionetteException: MarionetteException: {u'message': u'this.curBrowser is null', u'error': u\"error occurred while processing 'executeScript\"}\n\n", "stack": "Traceback (most recent call last):\n  File \"/home/viorelaioia/.virtualenvs/gaia_tests/local/lib/python2.7/site-packages/marionette_client-0.8.5-py2.7.egg/marionette/marionette_test.py\", line 301, in run\n    self.tearDown()\n  File \"/home/viorelaioia/gaia/tests/python/gaia-ui-tests/gaiatest/gaia_test.py\", line 955, in tearDown\n    MarionetteTestCase.tearDown(self)\n  File \"/home/viorelaioia/.virtualenvs/gaia_tests/local/lib/python2.7/site-packages/marionette_client-0.8.5-py2.7.egg/marionette/marionette_test.py\", line 521, in tearDown\n    (self.filepath.replace('\\\\', '\\\\\\\\'), self.methodName))\n  File \"/home/viorelaioia/.virtualenvs/gaia_tests/local/lib/python2.7/site-packages/marionette_client-0.8.5-py2.7.egg/marionette/marionette.py\", line 1237, in execute_script\n    filename=os.path.basename(frame[0]))\n  File \"/home/viorelaioia/.virtualenvs/gaia_tests/local/lib/python2.7/site-packages/marionette_client-0.8.5-py2.7.egg/marionette/decorators.py\", line 36, in _\n    return func(*args, **kwargs)\n  File \"/home/viorelaioia/.virtualenvs/gaia_tests/local/lib/python2.7/site-packages/marionette_client-0.8.5-py2.7.egg/marionette/marionette.py\", line 630, in _send_message\n    self._handle_error(response)\n  File \"/home/viorelaioia/.virtualenvs/gaia_tests/local/lib/python2.7/site-packages/marionette_client-0.8.5-py2.7.egg/marionette/marionette.py\", line 707, in _handle_error\n    raise errors.MarionetteException(message=response, status=500)\n"} 

Logcat of the test run: https://pastebin.mozilla.org/8048875

Malini, can you please take a look over this, as it looks like a marionette issue? Thanks!
Flags: needinfo?(mdas)
Assignee: nobody → viorela.ioia
QA Whiteboard: [fxosqa-auto-s6] → [fxosqa-auto-s6][fxosqa-auto-dropped-s6]
This definitely looks like a Marionette issue, but it's not one I can fix today, I'll be going on leave for a bit. rwood, are you interested in this? It seems like there's a timeout bug when closing a window, likely because we don't switch back into the right frame after.

If not, perhaps davehunt can take a look?
Flags: needinfo?(mdas) → needinfo?(rwood)
Yes I can have a look at this.
Flags: needinfo?(rwood)
I started working on this again, and I no longer encountered the issue described in comment 0.
I noticed that there were some elements changed, as I had to update a few locators.
I will open a patch to add the new automated test
Attachment #8557833 - Flags: review?(robert.chira)
Attachment #8557833 - Flags: review?(florin.strugariu)
QA Whiteboard: [fxosqa-auto-s6][fxosqa-auto-dropped-s6] → [fxosqa-auto-dropped-s6][fxosqa-auto-s9]
Comment on attachment 8557833 [details] [review]
Github PR: https://github.com/mozilla-b2g/gaia/pull/26849

The Jenkins addhoc is failing: 

Ran 11 tests
03:22:21 Expected results: 10
03:22:21 Unexpected results: 1 (ERROR: 1)
Attachment #8557833 - Flags: review?(florin.strugariu) → review-
Comment on attachment 8557833 [details] [review]
Github PR: https://github.com/mozilla-b2g/gaia/pull/26849

Updated, please take a look again! Thanks!
Attachment #8557833 - Flags: review- → review?(florin.strugariu)
Attachment #8557833 - Flags: review?(robert.chira) → review+
Attachment #8557833 - Flags: review?(florin.strugariu) → review-
Attachment #8557833 - Flags: review- → review?(florin.strugariu)
Attachment #8557833 - Flags: review?(florin.strugariu) → review+
https://github.com/mozilla-b2g/gaia/commit/be6bfc6ee1d5cc459744d2735bfb24c32c7fd117
Status: NEW → RESOLVED
Closed: 10 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: