Using head-*.js as the name of a test helper makes it automagically visible from all
tests in the suite thanks to the import-headjs-globals.js plugin.
Renaming them to helper-*.js forces to explicitly import them and get linting errors
if we forgot to do so.
All helpers have been consistently renamed to helper-*.js. One method from the
collapsibilities helper has been moved to the main head.js, because it doesn't
have any relation with collapsing target panes.
All ADB tests also now check that ADB is not running before starting. I tried forcing
ADB to stop in this case, but we can't kill it from the tests apparently, so the only
option is for the user to manually kill the process. At least now we get a somewhat
helpful error message, and no timeout.
Differential Revision: https://phabricator.services.mozilla.com/D15465
--HG--
rename : devtools/client/aboutdebugging-new/test/browser/head-addons-script.js => devtools/client/aboutdebugging-new/test/browser/helper-addons.js
rename : devtools/client/aboutdebugging-new/test/browser/debug-target-pane_collapsibilities_head.js => devtools/client/aboutdebugging-new/test/browser/helper-collapsibilities.js
rename : devtools/client/aboutdebugging-new/test/browser/head-mocks.js => devtools/client/aboutdebugging-new/test/browser/helper-mocks.js
rename : devtools/client/aboutdebugging-new/test/browser/head-serviceworker.js => devtools/client/aboutdebugging-new/test/browser/helper-serviceworker.js
rename : devtools/client/aboutdebugging-new/test/browser/mocks/head-client-wrapper-mock.js => devtools/client/aboutdebugging-new/test/browser/mocks/helper-client-wrapper-mock.js
rename : devtools/client/aboutdebugging-new/test/browser/mocks/head-runtime-client-factory-mock.js => devtools/client/aboutdebugging-new/test/browser/mocks/helper-runtime-client-factory-mock.js
rename : devtools/client/aboutdebugging-new/test/browser/mocks/head-usb-runtimes-mock.js => devtools/client/aboutdebugging-new/test/browser/mocks/helper-usb-runtimes-mock.js
extra : moz-landing-system : lando
I'm sorry this is just one commit, I should have split it :( I will submit tests in another patch.
- Vendored [react-router-dom](https://www.npmjs.com/package/react-router-dom) library.
- Removed `getSelectedPageComponent` from `App` component and changed it to use React Router's `Route` components.
- Made the sidebar links to point to proper URL's. Thanks to this we don't need a lot of code/props we were passing to these items to select the proper page.
Some considerations over the implementation:
- React Router's `Switch` is used to wrap our routes, to ensure only one is rendered. Right now is not strictly necessary, but I think it helps to clarify that the routes are _not_ nested.
- We need to pass a `key` prop to the `RuntimePage` rendered in the route, so when we change the actual runtime shown, the page gets updated.
- The action `selectPage` gets called on `componentWillMount`, so it doesn't change state while rendering.
- When we reload the page and a device runtime is selected, we redirect to "This Firefox" page.
(Click on this GIF to see navigation 👇)
{F1100903}
I'm sorry this has taken this long, it has been a bit of a headache 🙏
Differential Revision: https://phabricator.services.mozilla.com/D12147
--HG--
extra : moz-landing-system : lando
Still not sure what is the root issue here, but none of the regular connect tests are failing so I think the issue occurs when we remove tabs in the second step.
Differential Revision: https://phabricator.services.mozilla.com/D12332
--HG--
extra : moz-landing-system : lando
Selectable items now are wrapped into a `<a>` tag. Also made `SidebarItem`'s `onSelect` prop non mandatory if `selectable` is `false`.
Differential Revision: https://phabricator.services.mozilla.com/D9910
--HG--
extra : moz-landing-system : lando