Closed Bug 1186462 Opened 9 years ago Closed 9 years ago

Failures in self.keyboard.dismiss as in test_import_contacts_from_gmail.py

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: martijn.martijn, Assigned: martijn.martijn)

References

()

Details

Attachments

(1 file)

While running test_import_contacts_from_gmail.py, I'm seeing this failure:
TEST-UNEXPECTED-ERROR | test_import_contacts_from_gmail.py TestImportContactsFromGmail.test_import_contacts_from_gmail | TimeoutException: TimeoutException: Timed out after 9.7 seconds with message: Keyboard was not dismissed. Debug is_displayed(): True, class: inputWindow top-most active.


Traceback (most recent call last):
  File "/Users/mwargers/.virtualenvs/gaia-py-latest/lib/python2.7/site-packages/marionette_client-0.16-py2.7.egg/marionette/marionette_test.py", line 296, in run
    testMethod()
  File "/Users/mwargers/B2G/gaia_clean/tests/python/gaia-ui-tests/gaiatest/tests/functional/contacts/test_import_contacts_from_gmail.py", line 40, in test_import_contacts_from_gmail
    gmail.gmail_login(email, password)
  File "/Users/mwargers/B2G/gaia_clean/tests/python/gaia-ui-tests/gaiatest/apps/contacts/regions/gmail.py", line 35, in gmail_login
    self.keyboard.dismiss()
  File "/Users/mwargers/B2G/gaia_clean/tests/python/gaia-ui-tests/gaiatest/apps/keyboard/app.py", line 348, in dismiss
    %(input_window.is_displayed(), input_window.get_attribute('class')))
  File "/Users/mwargers/.virtualenvs/gaia-py-latest/lib/python2.7/site-packages/marionette_driver-0.9-py2.7.egg/marionette_driver/wait.py", line 143, in until
    cause=last_exc)
TEST-INFO took 102517ms

SUMMARY
-------
passed: 0
failed: 1
todo: 0
Comment on attachment 8637277 [details] [review]
[gaia] mwargers:1186462 > mozilla-b2g:master

I also saw this failure in tap_settings, which this pull rquest contains a fix for.
Also, I removed the message part, because that part was actually lying about the state we were in, because the message is compiled at the beginning of the Wait() call.
Attachment #8637277 - Flags: review?(npark)
Attachment #8637277 - Flags: review?(jlorenzo)
Comment on attachment 8637277 [details] [review]
[gaia] mwargers:1186462 > mozilla-b2g:master

fix looks good to me
Attachment #8637277 - Flags: review?(npark) → review+
We could also remove this line completely:
           lambda m: 'active' not in input_window.get_attribute('class') and
I think the is_displayed() and the keyboard position check (perhaps that should be a size check?) should be enough to say whether the keyboard is displayed or not.
Comment on attachment 8637277 [details] [review]
[gaia] mwargers:1186462 > mozilla-b2g:master

Looks great! Nice catch on the wait message being compiled at the beginning.

Concerning the removal of
> lambda m: 'active' not in input_window.get_attribute('class')
I checked the history of these lines and we've always checked on the content of the class. is_displayed() was added in bug 974966. Hence, I think we can try to remove it, and see how it goes.
Attachment #8637277 - Flags: review?(jlorenzo) → review+
Merged: https://github.com/mozilla-b2g/gaia/commit/8ae6d84976b70311e90dfe4e75406cc9978de1a0(In reply to 

Johan Lorenzo [:jlorenzo] (QA) from comment #5)
> Concerning the removal of
> > lambda m: 'active' not in input_window.get_attribute('class')
> I checked the history of these lines and we've always checked on the content
> of the class. is_displayed() was added in bug 974966. Hence, I think we can
> try to remove it, and see how it goes.

Actually, it turns out there is a whole bunch more code that could be improved (and I suspect this is not working right at all: http://mxr.mozilla.org/gaia/source/tests/python/gaia-ui-tests/gaiatest/apps/keyboard/app.py#442 )
So I'll file a new bug about this, for which this removal will be a part of that code improving.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
(In reply to Martijn Wargers [:mwargers] (QA) from comment #6)
> Actually, it turns out there is a whole bunch more code that could be
> improved (and I suspect this is not working right at all:
> http://mxr.mozilla.org/gaia/source/tests/python/gaia-ui-tests/gaiatest/apps/
> keyboard/app.py#442 )
> So I'll file a new bug about this, for which this removal will be a part of
> that code improving.

I filed bug 1186893 for this.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: