Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Bug 934480 - [v1.2] Write a test for Messages app matching with contacts #13660

Merged
merged 1 commit into from Nov 20, 2013

Conversation

AndreiH
Copy link

@AndreiH AndreiH commented Nov 13, 2013

No description provided.

@AndreiH
Copy link
Author

AndreiH commented Nov 13, 2013

I got the following traceback on this

Traceback (most recent call last):
File "/home/andreihutusoru/.virtualenvs/b2g-gaia/local/lib/python2.7/site-packages/marionette_client-0.6.2-py2.7.egg/marionette/marionette_test.py", line 143, in run
testMethod()
File "/home/andreihutusoru/webQA/b2g-gaia/gaia/tests/python/gaia-ui-tests/gaiatest/tests/functional/messages/test_sms_contact_match.py", line 33, in test_contact_match
self.assertEqual(self.contact['tel'][0]['value'], new_message.first_recipient_number_attribute)

TEST-UNEXPECTED-FAIL | test_sms_contact_match.py test_sms_contact_match.TestContactMatch.test_contact_match | AssertionError: '55559774929' != u'g'

Ran 1 test in 48.882s

FAILED (failures=1)

SUMMARY

passed: 0
failed: 1

@teodosia
Copy link
Contributor

I got the same stack trace. We should update the locators to match v1.2.

@AndreiH
Copy link
Author

AndreiH commented Nov 13, 2013

looks like send method is not typing the whole contact name, it's only typing "g" and then it taps enter key

@bobsilverberg
Copy link
Contributor

The test seems to be running fine, but it's getting the wrong thing back from new_message.first_recipient_name [1], so I think @teodosia may be right about needing a different locator.

@AndreiH please try to resolve this and get the test passing.

[1] https://github.com/mozilla-b2g/gaia/pull/13660/files#diff-0885d50dc94967f8339442a24e243559R32

@teodosia
Copy link
Contributor

And also please fix the merge conflicts.

@AndreiH
Copy link
Author

AndreiH commented Nov 14, 2013

@bobsilverberg the locators are ok, the send method seems to be the problem
It is only typing the first letter of the contact name ("g"), then the test goes to the next step (tapping enter) and the autocomplete inserts the whole name of the contact in the recipient.
So that's why the assert is failing
But I don't really know why the send method is doing that

@AlinT
Copy link
Contributor

AlinT commented Nov 19, 2013

please fix the merge conflicts

@@ -13,3 +13,5 @@ skip-if = device == "desktop"

[test_sms_to_dialer.py]
skip-if = device == "desktop"

[test_sms_contact_match.py]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no new line at the end of the file

# verify that contacts and tel number match
self.assertEqual(self.contact['name'], new_message.first_recipient_name)
self.assertEqual(self.contact['tel'][0]['value'], new_message.first_recipient_number_attribute)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pep8 issue: 34:1: W391 blank line at end of file

@teodosia
Copy link
Contributor

Besides the small pep8 issue, lgtm and the test passes on v1.2.

@bobsilverberg
Copy link
Contributor

LGTM and passes for me too. r+ with the pep8 fix.

Bug 934480 - Write a test for Messages app matching with contacts
@AndreiH
Copy link
Author

AndreiH commented Nov 20, 2013

Ready to be merged!

@bobsilverberg
Copy link
Contributor

Looks good now. Thanks @AndreiH!

bobsilverberg added a commit that referenced this pull request Nov 20, 2013
Bug 934480 - [v1.2] Write a test for Messages app matching with contacts
@bobsilverberg bobsilverberg merged commit 71b9eef into mozilla-b2g:v1.2 Nov 20, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants