Add test for toolbox's DebugTargetInfo component
Categories
(DevTools :: about:debugging, enhancement, P1)
Tracking
(firefox68 fixed)
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: ladybenko, Assigned: jdescottes)
References
(Blocks 1 open bug)
Details
Attachments
(3 files, 1 obsolete file)
We need to test that the DebugTargetInfo
in the toolbox renders the right information according to UX specs (see: https://mozilla.invisionapp.com/share/7BPLWRTPKCH#/)
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
The goal of this bug is to write a UI unit test using Jest, to avoid having to setup a complex mochitests.
In our codebase today, only the debugger has Jest unit tests written I believe. They are currently working on running them on try.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
This is more of a feedback request, I have not really written component unit tests before.
Assignee | ||
Comment 3•5 years ago
|
||
Depends on D24145. Just attaching for now as a POC. Will discuss on the bug to see how we want to organize this.
Assignee | ||
Comment 4•5 years ago
|
||
Some questions for Andrew and Jason about running additional Jest tests on try:
We are adding a new Jest test in devtools, outside of the debugger/ directory. For now I haven't really tried to merge this at all with what is done for the debugger. In https://phabricator.services.mozilla.com/D24146, I added another CI task to run this other test, similar to the debugger one.
I imagine we want to limit the number of tasks here? Should we aim for:
- a single task that runs all DevTools tests (debugger tests/flow/lint included)
- keep Debugger and DevTools tasks separated
Since the debugger is still developed both in m-c and Github, maybe the second option is preferable?
We should also start thinking about how we organize our package.json files inside /devtools as more panels will start writing Jest tests. But I think this can wait for a follow up.
Comment 5•5 years ago
|
||
I would prefer keeping the debugger and devtools separate for now.
- our runner/reporter needs some work (https://bugzilla.mozilla.org/show_bug.cgi?id=1535113)
- the debugger jest tests have some interesting config (see jest.config.js), which include the babel step
There is nothing keeping us from consolidating this in the future.
Comment 6•5 years ago
|
||
Another benefit of keeping them separate is that the tasks are set to run only when certain files change, so we can run fewer tests this way (though setup/teardown might negate some of this). I don't think we need to worry about limiting tasks too much.
Otherwise I don't really have much of a preference here.
Assignee | ||
Comment 7•5 years ago
|
||
Thanks for the feedback! Happy to keep debugger & devtools separate for now. Will update the patch shortly.
Additional question: I am trying to add a small developer documentation. I know how to select the debugger/devtools jest tests when pushing to try via ./mach try fuzzy
. But I don't know how to do it when using the classic try syntax? Any idea?
Assignee | ||
Comment 8•5 years ago
|
||
Depends on D24146. We are adding new devtools unit tests using jest.
They share a list of globals made available in the environment by Jest, so using a shared eslintrc would make sense here.
Assignee | ||
Comment 9•5 years ago
|
||
Depends on D24718
Example of a try run with tests running:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=cca3978c6e3eb042c59e62b25b1946219cf3d74a&selectedJob=235873038
Updated•5 years ago
|
Comment 10•5 years ago
|
||
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/93e944fe7234 Add jest test for framework component DebugTargetInfo;r=ladybenko https://hg.mozilla.org/integration/autoland/rev/2aea0bb2df47 Run other DevTools jest tests on try;r=jlast,ahal https://hg.mozilla.org/integration/autoland/rev/188ea7716008 Create jest test for aboutdebugging-new Message component;r=ladybenko
Comment 11•5 years ago
|
||
No, I'm not sure what the syntax is. I think you'd have to use the largely unknown -j option.
Comment 12•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/93e944fe7234
https://hg.mozilla.org/mozilla-central/rev/2aea0bb2df47
https://hg.mozilla.org/mozilla-central/rev/188ea7716008
Comment 13•5 years ago
|
||
https://hg.mozilla.org/projects/ash/rev/93e944fe7234e57f5ff59ea9e84231924c863c05 Bug 1521752 - Add jest test for framework component DebugTargetInfo;r=ladybenko https://hg.mozilla.org/projects/ash/rev/2aea0bb2df47f349364638e691d481a26c0f9f70 Bug 1521752 - Run other DevTools jest tests on try;r=jlast,ahal https://hg.mozilla.org/projects/ash/rev/188ea77160086a0c99044485d7834c27b185103c Bug 1521752 - Create jest test for aboutdebugging-new Message component;r=ladybenko
Description
•