fix router tests and create seaparate package ui-tests

This commit is contained in:
Sebastian Sdorra
2019-10-10 15:05:17 +02:00
parent 72afcf0f23
commit 9d50ed05e1
19 changed files with 109 additions and 75 deletions

12
scm-ui/ui-tests/enzyme.js Normal file
View File

@@ -0,0 +1,12 @@
import "raf/polyfill";
import { configure } from "enzyme";
import Adapter from "enzyme-adapter-react-16";
// Temporary hack to suppress error
// https://github.com/facebook/create-react-app/issues/3199#issuecomment-345024029
window.requestAnimationFrame = function(callback) {
setTimeout(callback, 0);
return 0;
};
configure({ adapter: new Adapter() });