Write test to check the Contacts App checks and notifies the user when no network is available during a import contacts app

RESOLVED FIXED

Status

defect
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Bebe, Assigned: Bebe)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

https://moztrap.mozilla.org/manage/case/8986/

    Open the Contacts App

    Contacts list is displayed

    Tap the Settings icon (Gear in top right corner)

    Settings screen is displayed

    Pull down the notifications tab>Disconnect from the connected network (Wi-Fi or Cellular "E" icon)

    Gmail and Outlook icons become greyed out. Facebook selector is removed and a message appears instructing to connect to a network.

    Pull down the notifications tab>Connect to the desired network (Wi-Fi or Cellular)

    Gmail, Outlook and Facebook can now be selected.

    Tap the Gmail Import Contacts option

    User is brought to a Gmail login page

    Enter valid email and password credentials.

    User is brought to a confirmation screen

    Accept the confirmation message

    A message appears stating "Please hold on. We are connecting to obtain a list of your friends"

    While message is displayed, pull down the notifications bar and disconnect from the network.

    User receives the error "Error retrieving friends. Do you want to retry?"
QA Whiteboard: [fxosqa-auto-s6]
Comment on attachment 8537847 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/26850

Dave I added a new method in gaiatest can you take a look
Attachment #8537847 - Flags: feedback?(dave.hunt)
This pull requires more than 1 contact in your account.

I would say around 10 contacts.
Attachment #8537847 - Flags: feedback?(dave.hunt) → feedback+
Comment on attachment 8537847 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/26850

Comments in the PR.
Attachment #8537847 - Flags: review?(robert.chira) → review-
Comment on attachment 8537847 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/26850

We need to update the automation account, it only have 1 contact.

Even though the manual test[1] says to do all these checks in the same test, I would split it into two. The first one would be to check that GMail and Outlook can't be imported when you don't have an Internet connection. The second would be the see what happens if you cut the connection in the middle. If you agree with that, I can update the Moztrap test case accordingly.

I left some additional comments in the PR.

[1] https://moztrap.mozilla.org/manage/case/8986/
Attachment #8537847 - Flags: review?(jlorenzo) → review-
Comment on attachment 8537847 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/26850

I updated the pull

I like Johan's idea of splitting the tests.
Attachment #8537847 - Flags: review?(robert.chira)
Attachment #8537847 - Flags: review?(jlorenzo)
Attachment #8537847 - Flags: review-
Like discussed over Vidyo, I'll update the Moztrap test case. NI myself to remember that.
Flags: needinfo?(jlorenzo)
https://moztrap.mozilla.org/manage/case/8986/ has been updated to cut the connection only during the importation.
https://moztrap.mozilla.org/manage/case/15183/ has been created to check that you can't tap on the import button if you have no connection.
Flags: needinfo?(jlorenzo)
Comment on attachment 8537847 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/26850

The test looks way better as is :) A couple of issues though, like the function `is_gmail_import_service_in_error` which seems to return the opposite of the status.

After these small nits corrected, they'll look good to me.
Attachment #8537847 - Flags: review?(jlorenzo) → review-
Attachment #8537847 - Flags: review- → review?(jlorenzo)
The patch is great. I create 9 other contacts in the Gmail test account. It doesn't have enough time to cut off the connection. Can you look into it?
Flags: needinfo?(florin.strugariu)
I use my google account for this so we need to add more contacts to the gmail account

I will create new contacts on the account
Flags: needinfo?(florin.strugariu)
Attachment #8537847 - Flags: review?(robert.chira) → review?(npark)
Attachment #8537847 - Flags: review?(npark) → review+
Comment on attachment 8537847 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/26850

LGTM
Attachment #8537847 - Flags: review?(jlorenzo) → review+
Merged in master: https://github.com/mozilla-b2g/gaia/commit/bf0316419d91cdfa37d8648086397444e3c0f091
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.