Migrate test_sms_contact_match.py to Gij

RESOLVED FIXED

Status

Firefox OS
Gaia::SMS
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: jlorenzo, Assigned: jlorenzo)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Created attachment 8613485 [details] [review]
[gaia] JohanLorenzo:bug-1168324 > mozilla-b2g:master
(Assignee)

Updated

3 years ago
Blocks: 1170151
(Assignee)

Updated

3 years ago
QA Whiteboard: [fxosqa-auto-s18]
(Assignee)

Comment 2

3 years ago
I have another problem with the Contact storage. No contact was detected when I entered his name in the recipient list[1]. The contact storage seems to be used after launching the app and after setting the message storage[2]. Is there any other condition I should respect to use it, Oleg?

[1] https://github.com/mozilla-b2g/gaia/pull/30345/files#diff-ec1e85749cbb823085766fba8037051aR328 
[2] https://github.com/mozilla-b2g/gaia/pull/30345/files#diff-ec1e85749cbb823085766fba8037051aR290
Flags: needinfo?(azasypkin)
Looks like it's because of the fact that our contacts mock is very simple and doesn't support "contains" filter operation yet (see the only supported search strategy at [1]);

We usually implement bare minimum and then add more cases only when needed.

So we need one more search strategy for "contains" filter operation, let me know if you want me to assist here - would be happy to provide the patch.

[1] https://github.com/mozilla-b2g/gaia/blob/9e10483c5808f94f4a0a9f6afe30aae2c5b42b4c/apps/sms/test/marionette/mocks/mock_navigator_moz_contacts.js#L62
Flags: needinfo?(azasypkin)
I went ahead and created a gist with updated filter strategy chooser that should help [1]. Just make sure that mock contact contains both "name" and "givenName/familyName" if you search by name.

[1] https://gist.github.com/azasypkin/e9f890e0f5728a707d5d
(Assignee)

Comment 5

3 years ago
Comment on attachment 8613485 [details] [review]
[gaia] JohanLorenzo:bug-1168324 > mozilla-b2g:master

Works great! I'll rebase the patch once bug 1168118 lands. In the meantime, the last commit shows the test migration and the contact mocks changes.
Attachment #8613485 - Flags: review?(azasypkin)
(Assignee)

Updated

3 years ago
No longer blocks: 1170151
Comment on attachment 8613485 [details] [review]
[gaia] JohanLorenzo:bug-1168324 > mozilla-b2g:master

PR for bug 1168118 is r+'ed, could you please rebase this PR on master once bug 1168118 lands and ask review again?

Thanks!
Attachment #8613485 - Flags: review?(azasypkin)
(Assignee)

Comment 7

3 years ago
Comment on attachment 8613485 [details] [review]
[gaia] JohanLorenzo:bug-1168324 > mozilla-b2g:master

Rebased. TH still green in Gij.
Attachment #8613485 - Flags: review?(azasypkin)
Comment on attachment 8613485 [details] [review]
[gaia] JohanLorenzo:bug-1168324 > mozilla-b2g:master

LGTM, just few nits at GitHub.

Thanks!
Attachment #8613485 - Flags: review?(azasypkin) → review+
(Assignee)

Comment 9

3 years ago
Gij is showing green, no new intermittent to report: https://treeherder.mozilla.org/#/jobs?repo=gaia&revision=b659b0a990673ca5afece76b88289e727ed063dc

Landed in master at: https://github.com/mozilla-b2g/gaia/commit/4cbd2316b5b08f384bfe806cfd5f67c128e82462
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
(Assignee)

Comment 10

3 years ago
Side note: JSHint was showing orange because of another commit than this one.
(Assignee)

Updated

3 years ago
Blocks: 1175110
You need to log in before you can comment on or make changes to this bug.