Closed Bug 1201248 Opened 7 years ago Closed 7 years ago

[Aries] Failures on the Aries device running test_add_new_contact.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)

I was testing out bug 1201211 on my Aries device and I noticed failures unrelated to the issue there.
Comment on attachment 8656195 [details] [review]
[gaia] mwargers:1201248 > mozilla-b2g:master

This fixes it. I guess these failures happened on Aries, because it is quicker.
Attachment #8656195 - Flags: review?(npark)
Attachment #8656195 - Flags: review?(jlorenzo)
Comment on attachment 8656195 [details] [review]
[gaia] mwargers:1201248 > mozilla-b2g:master

LGTM.

In a related topic, I was thinking whether we should have a pre-set method for tap() in gaiatest, that does the following:
- wait until the tappable element is visible
- taps the element
- wait until some other indicator (as the result of the tap) is visible

what do you think?   Or is it too late for that since we do this anyways in our scripts already?
Attachment #8656195 - Flags: review?(npark) → review+
Comment on attachment 8656195 [details] [review]
[gaia] mwargers:1201248 > mozilla-b2g:master

I agree with No-Jun. One way to achieve it could be to separate the functions that return HTMLElements and functions that use these elements. From here, we can create a Base class for the classes using the HTMLElement, and we can put the function No-Jun propose there. 

However, that's some big work. It's better to do it in another task.

Regarding this PR, I prefer to not r+, because I think we can factorize each function this way:
>    def type_phone(self, value):
>        self._type_in_field(self._add_new_phone_locator, self._phone_locator, value)
> 
>    def _type_in_field(self, add_locator, field_locator, value):
>        Wait(self.marionette).until(
>            expected.element_present(*add_locator)).tap()
>        element = Wait(self.marionette).until(
>            expected.element_present(*field_locator))
>        Wait(self.marionette).until(expected.element_displayed(element))
>        element.clear()
>        element.send_keys(value)
Attachment #8656195 - Flags: review?(jlorenzo)
Comment on attachment 8656195 [details] [review]
[gaia] mwargers:1201248 > mozilla-b2g:master

Ok, updated with the suggestion in comment 4. Tested on the Aries 10 times and all passed.
Attachment #8656195 - Flags: review?(jlorenzo)
Comment on attachment 8656195 [details] [review]
[gaia] mwargers:1201248 > mozilla-b2g:master

Looks good to me!
Attachment #8656195 - Flags: review?(jlorenzo) → review+
Merged: https://github.com/mozilla-b2g/gaia/commit/192d458727219a79631c8b12124d04e9c4ef2575

I still saw failures on b2g desktop. I'm not sure where those are coming from.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
(In reply to Martijn Wargers [:mwargers] (QA) from comment #7)
> I still saw failures on b2g desktop. I'm not sure where those are coming
> from.

Intermittent failures, that is.
You need to log in before you can comment on or make changes to this bug.