* Set baseUrl for Cypress tests. * Fixed login form for tests. * Added fixture data for initial admin credentials. * First e2e test. * Fixed a typo in a comment. * Using an input of type submit like the login previously had was fine. * Added a check to ensure user is redirected to the home page. * Forgot to commit adding @testing-library/cypress * Renamed and move login flow under loginFlows in integrations. * Added testing library to support files so it does not need to be imported into every test explicitly by the test writer. * Added some more Cypress related files that will be required for testing going forward. * Took onboarding into account when checking the URL post login.
51 lines
1.7 KiB
JavaScript
51 lines
1.7 KiB
JavaScript
/* eslint-env node */
|
|
|
|
const path = require('path');
|
|
const { environment } = require('@rails/webpacker');
|
|
const HoneybadgerSourceMapPlugin = require('@honeybadger-io/webpack');
|
|
const erb = require('./loaders/erb');
|
|
|
|
/*
|
|
The customizations below are to create the vendor chunk. The vendor chunk is no longer consumed like it was in webpacker 3.
|
|
There is no longer one vendor bundle. It gets code split based on what webpacker packs need. All the object spreading e.g. `...config.optimization` is to keep
|
|
the existing configuration and only override/add what is necessary.
|
|
|
|
The cache groups section is the default cache groups in webpack 4. See https://webpack.js.org/plugins/split-chunks-plugin/#optimizationsplitchunks.
|
|
It does not appear to be the default with webpacker 4.
|
|
*/
|
|
environment.splitChunks((config) => {
|
|
return {
|
|
...config,
|
|
resolve: {
|
|
...config.resolve,
|
|
alias: {
|
|
...(config.resolve ? config.resolve.alias : {}),
|
|
'@crayons': path.resolve(__dirname, '../../app/javascript/crayons'),
|
|
'@utilities': path.resolve(__dirname, '../../app/javascript/utilities'),
|
|
},
|
|
},
|
|
};
|
|
});
|
|
|
|
// We don't want babel-loader running on the node_modules folder.
|
|
environment.loaders.delete('nodeModules');
|
|
|
|
environment.loaders.append('erb', erb);
|
|
|
|
if (process.env.HONEYBADGER_API_KEY && process.env.ASSETS_URL) {
|
|
environment.plugins.append(
|
|
'HoneybadgerSourceMap',
|
|
new HoneybadgerSourceMapPlugin({
|
|
apiKey: process.env.HONEYBADGER_API_KEY,
|
|
assetsUrl: process.env.ASSETS_URL,
|
|
silent: false,
|
|
ignoreErrors: false,
|
|
revision:
|
|
process.env.RELEASE_FOOTPRINT ||
|
|
process.env.HEROKU_SLUG_COMMIT ||
|
|
'master',
|
|
}),
|
|
);
|
|
}
|
|
|
|
module.exports = environment;
|