Allow MockContact properties to be None

RESOLVED FIXED

Status

Firefox OS
Gaia::UI Tests
P3
normal
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: zac, Assigned: Gonzalo Martinez, Mentored)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [lang=py])

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
When we initialise a MockContact, we should be able to pass in None for a property and in turn have that property not set.

For example, currently if we want a Contact without an email address, passing in " email = None " causes the email address to be zero length string, rather than no email address present.

Updated

3 years ago
Mentor: zcampbell@mozilla.com
Whiteboard: [mentor=zac][lang=py] → [lang=py]
(Assignee)

Comment 1

3 years ago
Hello! How i can start with this? THis behavior is needed for all the properties?
"givenName, familyName, name, email, tel, adr, note"
Flags: needinfo?(zcampbell)
(Reporter)

Comment 2

3 years ago
Yes, all properties!

I've assigned you to the task. Ping us here or in #mozwebqa if you need some more help.

Cheers
Assignee: nobody → gonzafirewall
Status: NEW → ASSIGNED
Flags: needinfo?(zcampbell)
Gonzalo Martinez do you need help with the task?
Flags: needinfo?(gonzafirewall)
(Assignee)

Comment 4

3 years ago
Yes please, i need know how start, or where is the code? i think that is this https://github.com/mozilla-b2g/gaia but i need confirm what is the procedure to resolve. If i make a Push to git repo directly or how i start with this.
Thanks a lot!
you are right the code is in  https://github.com/mozilla-b2g/gaia

To be more exact you are interested in: https://github.com/mozilla-b2g/gaia/tree/master/tests/python/gaia-ui-tests this is our tests dir.

To get your code in you need first to make a "Fork" of the gaia repo; commit your code in a separate branch in your fork and then submit a pull request for review 

Make sure you add the pull to this bug and submit a review request to us
you can find the MockContact code in 
 https://github.com/mozilla-b2g/gaia/tree/master/tests/python/gaia-ui-tests/gaiatest/mocks
(Assignee)

Comment 7

3 years ago
Thanks i am downloading the code from my fork. Soon i resolve this! Thanks
Flags: needinfo?(gonzafirewall)
(Assignee)

Comment 8

3 years ago
I make my pull requests. I am Happy
https://github.com/mozilla-b2g/gaia/pull/21455
Thanks for all!
Created attachment 8452210 [details] [review]
Pull request

I added a pull request attachment to the bug and asked for reviews
Attachment #8452210 - Flags: review?(zcampbell)
Attachment #8452210 - Flags: review?(florin.strugariu)
Comment on attachment 8452210 [details] [review]
Pull request

Can you update the commit message pls
Attachment #8452210 - Flags: review?(florin.strugariu) → review-
(Reporter)

Comment 11

3 years ago
Comment on attachment 8452210 [details] [review]
Pull request

It works well, thanks!

r+, but as Bebe suggested you just need to update the commit message and have just 1 commit in the pull request.

if you make the commit message " Bug 1028190 - Allow MockContact properties to be None" that is perfect!
Attachment #8452210 - Flags: review?(zcampbell) → review+
(Assignee)

Comment 12

3 years ago
Here is the new commit message :D 
https://github.com/gonzafirewall/gaia/commit/1729c5d64594396909929358d675005971070e86
Sorry for late, but i dont touch my PC during yesterday!
Thanks i am happy to make my first contribution to the Mozilla community!
Y por que Argentina está en la final! Sorry :D
In your pull request you have 3 commits now :(((

Can you squash the commits to get one commit message with the "Bug 1028190 - Allow MockContact properties to be None" text
here is a simple way to do that:
http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html


GO Argentina!!!!
(Assignee)

Comment 15

3 years ago
Now take 2 but the merge commit :S i dont know how to resolve :S
(Reporter)

Comment 16

3 years ago
I will pick just the correct commit Gonzalo.
(Reporter)

Comment 17

3 years ago
Merged it directly:
https://github.com/mozilla-b2g/gaia/commit/33f386bacbb2654b9669e0f93470d02174e1226a

Thanks Gonzalo and good luck in the final ;)
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.