Files
payload/cypress/plugins/index.js
Dan Ribbens 8813bc7695 chore: e2e running in CI (#559)
* chore: e2e ci testing with mongo-memory-server
2022-05-11 21:49:11 -04:00

18 lines
414 B
JavaScript

require('isomorphic-fetch');
const { credentials } = require('../integration/common/credentials');
/**
* @type {Cypress.PluginConfig}
*/
module.exports = (on) => {
on('before:run', () => {
return fetch('http://localhost:3000/api/admins/first-register', {
body: JSON.stringify(credentials),
headers: {
'Content-Type': 'application/json',
},
method: 'post',
});
});
};