Closed Bug 1208625 Opened 4 years ago Closed 4 years ago

update _cell_broadcast_switch_locator since it's a gaia-switch now


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

Gonk (Firefox OS)
Not set


(Not tracked)



(Reporter: njpark, Assigned: njpark)



(1 file)

Assignee: nobody → npark
Attachment #8666196 - Flags: review?(martijn.martijn)
Comment on attachment 8666196 [details] [review]
[gaia] npark-mozilla:1208625 > mozilla-b2g:master

I'm fine with the change if this works.
I'm surprised you didn't have to update the code at:
Apparently, GaiaBinaryControl works for input and gaia-switch?

I'm already lost when I have to use GaiaBinaryControl, HtmlBinaryControl or InvisibleHtmlBinaryControl.
Perhaps we could get some example html code for the different cases in a comment at:
Attachment #8666196 - Flags: review?(martijn.martijn) → review+
Actually I was surprised as well when I saw this was working.  It looks like anything below gaia-switch is not visible to marionette, probably because of the shadow DOM issue.  Maybe jlorenzo is the best person to ask for the example (I'm sure the example already exists in our code). ni?ing him.
Flags: needinfo?(jlorenzo)
I also double checked that I can enable/disable the switch too at the gaia-switch level. awesome.
I haven't checked it until now, but the workaround we defined in GaiaBinaryControl[1] also works with a standard HTML checkbox. In this case, maybe we can remove the class called `HtmlBinaryControl`. It'd make the code simpler, we'd only need 2 classes (`BinaryControl` and `InvisibleHtmlBinaryControl`) instead of 4.

BinaryControl will implement `is_checked()` the way shown at [1] and InvisibleHtmlBinaryControl will handle the case where the element to tap is not the same as the element which holds the checked value, like we have at some place in the settings app[2].

What do you guys think?

Flags: needinfo?(jlorenzo)
I'm all for it to make the code simpler. I think some comment that explains what these controls stand for, would also be nice.
That sounds good to me as well.
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.