e2e.js 543 B

12345678910111213141516171819202122
  1. import './commands';
  2. beforeEach(() => {
  3. cy.server({
  4. ignore: (xhr) => {
  5. // Ignore the webpack dev server calls that interfere in the tests
  6. // when testing with `yarn serve`.
  7. if (xhr.url.indexOf('sockjs-node/') > -1) {
  8. return true;
  9. }
  10. if (xhr.url.indexOf('api/health') > -1) {
  11. return true;
  12. }
  13. // Return the default cypress whitelist filer.
  14. return xhr.method === 'GET' && /\.(jsx?|html|css)(\?.*)?$/.test(xhr.url);
  15. },
  16. });
  17. cy.intercept('GET', '/api/health', {});
  18. });