Closed
Bug 1170653
Opened 10 years ago
Closed 10 years ago
[Music] [Front-end] Add unit tests for ui/tab_bar.js
Categories
(Firefox OS Graveyard :: Gaia::Music, defect)
Tracking
(b2g-v2.2 wontfix, b2g-master fixed)
RESOLVED
FIXED
FxOS-S2 (10Jul)
People
(Reporter: dkuo, Assigned: hub)
References
Details
Attachments
(1 file)
Currently ui/tab_bar.js lacks for the unit tests so let's add them.
Assignee | ||
Comment 1•10 years ago
|
||
This should be the first one. While this are really "unit" the are run by the marionette tests because I need the UI to be set up.
Assignee | ||
Comment 2•10 years ago
|
||
Bug 1161492 will break this. So the order of landing will impact.
Reporter | ||
Comment 3•10 years ago
|
||
Hub,
In fact, I don't know what's a suitable way to write unit tests that html involved, so I tried to look what's existing in the gaia repository then found a similar case in clock app [1], do you think we can also use this approach or keep what you have in your patch? thanks.
[1] https://github.com/mozilla-b2g/gaia/blob/master/apps/clock/test/unit/tabs_test.js
Flags: needinfo?(hub)
Assignee | ||
Comment 4•10 years ago
|
||
I missed that example. That's a valid approach, but I don't think, that for us, it provides any more coverage than what I did using our actual HTML. My approach test also the fact we still match the document model with the code.
I'm not opposed to use the other approach. Let's see if that can be done,
Flags: needinfo?(hub)
Reporter | ||
Comment 5•10 years ago
|
||
Comment on attachment 8623918 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/30639
Let's have Jim to also comment on this :)
Attachment #8623918 -
Flags: review?(dkuo)
Reporter | ||
Updated•10 years ago
|
Flags: needinfo?(squibblyflabbetydoo)
Assignee | ||
Comment 6•10 years ago
|
||
I have updated the pull request to provide an alternative test done as suggested in comment 3. Only minor caveat: I had to change the widget to actually listen to the 'click' events as well.
Assignee | ||
Comment 7•10 years ago
|
||
Comment on attachment 8623918 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/30639
Dominic,
This is the alternative testing method you suggested. I think it is better too.
Thanks.
Attachment #8623918 -
Flags: review?(dkuo)
Assignee | ||
Comment 8•10 years ago
|
||
Comment on attachment 8623918 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/30639
Cancelling review. I found out I have added duplicated mocks.... I'll rework it to use the existing ones.
Attachment #8623918 -
Flags: review?(dkuo)
Assignee | ||
Comment 9•10 years ago
|
||
Comment on attachment 8623918 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/30639
This time we should be alright.
Attachment #8623918 -
Flags: review?(dkuo)
Reporter | ||
Comment 10•10 years ago
|
||
Comment on attachment 8623918 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/30639
Hub, thanks for working on this. The patch looks good to me with some minor issues, I have left the comments on github and please address them before landing it.
Attachment #8623918 -
Flags: review?(dkuo) → review+
Assignee | ||
Comment 11•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-b2g-v2.2:
--- → wontfix
status-b2g-master:
--- → fixed
Flags: needinfo?(squibblyflabbetydoo) → in-testsuite+
Resolution: --- → FIXED
Assignee | ||
Updated•10 years ago
|
Target Milestone: --- → FxOS-S2 (10Jul)
You need to log in
before you can comment on or make changes to this bug.
Description
•