test-compat.js 920 B

123456789101112131415161718192021222324252627282930
  1. const createTestCafe = require('testcafe');
  2. // Testcafe cannot test on IE < 11
  3. // Testcafe testing on Chrome Android is currently broken (https://github.com/DevExpress/testcafe/issues/3948)
  4. const browsers = [
  5. 'saucelabs:Internet Explorer@11.285:Windows 10',
  6. 'saucelabs:MicrosoftEdge@16.16299:Windows 10',
  7. 'saucelabs:iPhone XS Simulator@12.2',
  8. 'saucelabs:Safari@12.0:macOS 10.14',
  9. 'chrome:headless',
  10. 'firefox:headless'
  11. ];
  12. let testcafe;
  13. let runner;
  14. let failedCount;
  15. createTestCafe(null, 8000, 8001).then((tc) => {
  16. testcafe = tc;
  17. runner = tc.createRunner();
  18. return runner
  19. .src('./tests/Sortable.compat.test.js')
  20. .browsers(browsers)
  21. .run();
  22. }).then((actualFailedCount) => {
  23. // https://testcafe-discuss.devexpress.com/t/why-circleci-marked-build-as-green-even-if-this-build-contain-failed-test/726/2
  24. failedCount = actualFailedCount;
  25. return testcafe.close();
  26. }).then(() => process.exit(failedCount));