Closed
Bug 1201870
Opened 9 years ago
Closed 9 years ago
Remove is_element_displayed and is_element_present from gaia_test.py
Categories
(Firefox OS Graveyard :: Gaia::UI Tests, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: martijn.martijn, Assigned: martijn.martijn)
References
()
Details
Attachments
(1 file)
See here for current usage (there is the same method in base.py and gaia_test.py: http://mxr.mozilla.org/gaia/search?string=is_element_ Instead, expected.element_present and expected.element_displayed should be used.
Assignee | ||
Comment 1•9 years ago
|
||
Ok, I just tested myself: print(datetime.datetime.now()) print(expected.element_displayed(*self._nobody_locator)(self.marionette)) print(datetime.datetime.now()) print(expected.element_not_displayed(*self._nobody_locator)(self.marionette)) print(datetime.datetime.now()) print(expected.element_present(*self._nobody_locator)(self.marionette)) print(datetime.datetime.now()) print(expected.element_not_present(*self._nobody_locator)(self.marionette)) print(datetime.datetime.now()) ..where the _nobody_locator doesn't point to any existing element. What I get as result is this: 2015-09-04 19:28:19.761356 False 2015-09-04 19:28:29.789223 True 2015-09-04 19:28:39.914137 False 2015-09-04 19:28:50.041975 True 2015-09-04 19:29:00.170700 So for everyone of those commands, I still get the marionette timeout of 10s. From the Gaia UI automation mailing list from Dave Hunt: " Personally, I feel that is_element_displayed should be removed and the search timeout should be zero. Doing this will likely cause a lot of tests to fail though, as they’ve been written with the safety net of these implicit waits present. " So I guess that means we could only remove is_element_displayed when the search timeout can be set to zero also.
Assignee | ||
Comment 2•9 years ago
|
||
But I think it would be good to at least remove these methods from gaia_test.py, it's not used a lot and sometimes inappropriate and when it's used appropriate, it can just use the app object method.
Assignee: nobody → martijn.martijn
Summary: Remove is_element_displayed and is_element_present → Remove is_element_displayed and is_element_present from gaia_test.py
Comment 3•9 years ago
|
||
Assignee | ||
Comment 4•9 years ago
|
||
Comment on attachment 8660455 [details] [review] [gaia] mwargers:1201870 > mozilla-b2g:master Like this, I checked that the tests are still working with these changes.
Attachment #8660455 -
Flags: review?(npark)
Attachment #8660455 -
Flags: review?(jdorlus)
Comment 5•9 years ago
|
||
Just to confirm, we're only removing methods within gaia_test.py right? If so. it looks good to me.
Updated•9 years ago
|
Attachment #8660455 -
Flags: review?(npark) → review+
Assignee | ||
Comment 6•9 years ago
|
||
(In reply to No-Jun Park [:njpark] from comment #5) > Just to confirm, we're only removing methods within gaia_test.py right? If > so. it looks good to me. Yes, the same methods are there on the app objects, so no functionality is lost if one wants to use it.
Updated•9 years ago
|
Attachment #8660455 -
Flags: review?(jdorlus) → review+
Assignee | ||
Comment 7•9 years ago
|
||
Merged: https://github.com/mozilla-b2g/gaia/commit/6d0afb71d0fe7185fbec2690d7716632083cc504
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•