This fixes the issues with retriggering and add-new-jobs that the
original PR introduced. It also adds a few unit tests to catch
this potential mistake in the future.
This reverts commit ffd871ae34.
Up until now we were not testing the same code path that Heroku follows to
generate the front-end build.
Heroku runs the `yarn install` command under `NODE_ENV=production` which causes
only the production dependencies to be installed. In the case of
[PR 5283](#5283), we moved `neutrino`
from `dependencies` to `devDependencies` and went unnoticed until Heroku tried to deploy
the change. See output [1].
This change adds one more entry for Travis where we only install the production dependencies
before running `yarn build`.
[1]
```shell
2019-08-16 19:34:49 -----> Build
2019-08-16 19:34:49 Detected both "build" and "heroku-postbuild" scripts
2019-08-16 19:34:49 Running heroku-postbuild (yarn)
2019-08-16 19:34:50 yarn run v1.17.3
2019-08-16 19:34:50 $ yarn build
2019-08-16 19:34:50 $ node ./node_modules/webpack/bin/webpack.js --mode production
/tmp/build_375161ca12e2f192c2c9b1caab8276cd/node_modules/webpack-cli/bin/cli.js:93
throw err;
^
Error: Cannot find module 'neutrino'
```
Up until now we were not testing the same code path that Heroku follows to
generate the front-end build.
Heroku runs the `yarn install` command under `NODE_ENV=production` which causes
only the production dependencies to be installed. In the case of
[PR 5283](https://github.com/mozilla/treeherder/pull/5283), we moved `neutrino`
from `dependencies` to `devDependencies` and went unnoticed until Heroku tried to deploy
the change. See output [1].
This change adds one more entry for Travis where we only install the production dependencies
before running `yarn build`.
[1]
```shell
2019-08-16 19:34:49 -----> Build
2019-08-16 19:34:49 Detected both "build" and "heroku-postbuild" scripts
2019-08-16 19:34:49 Running heroku-postbuild (yarn)
2019-08-16 19:34:50 yarn run v1.17.3
2019-08-16 19:34:50 $ yarn build
2019-08-16 19:34:50 $ node ./node_modules/webpack/bin/webpack.js --mode production
/tmp/build_375161ca12e2f192c2c9b1caab8276cd/node_modules/webpack-cli/bin/cli.js:93
throw err;
^
Error: Cannot find module 'neutrino'
```
`jest-dom` has moved to `@testing-library/jest-dom`. Please uninstall jest-dom and install `@testing-library/jest-dom` instead,
or use an older version of `jest-dom`. If you do upgrade to `@testing-library/jest-dom`, make sure to update your usage of `jest-dom`
to use `@testing-library/jest-dom/extend-expect` rather than simply `jest-dom/extend-expect`. Learn more about this change here:
https://github.com/testing-library/dom-testing-library/issues/260 Thanks!