kiwix-js
kiwix-js copied to clipboard
Re-enable Unit Tests on IE11
This arises from #736. Having polyfilled Promises, it should now be possible to re-enable (online) Unit Tests on IE11. #736 fixes local (browser-run) tests for IE11, so there is no reason, on the face of it, why they should not be able to run automatically as well, assuming Sauce Labs provides an IE11 instance.
SauceLabs does provide an IE11 instance (and even older versions : https://saucelabs.com/resources/articles/testing-on-internet-explorer). And we already run the UI tests on IE11.
It should only be a matter of uncommenting line 63 in tests/karma.conf.saucelabs.js (and pray for a good result)
When running the tests locally on IE11 (on the Promise Polyfill PR), only 16 out of the 22 tests run (it is as if the other 6 tests don't exist: there is no failure). I could not see anything in tests.js that prevents tests from running. Perhaps there is a configuration somewhere?
This blog could be useful if we ever want to run tests on Internet Exploerer via GitHub actions in a Windows-latest instance:. This uses IE Mode in Edge:
https://blogs.windows.com/msedgedev/2022/02/01/test-ie-mode-in-microsoft-edge-internet-explorer-driver/
The examples use Selenium, but it's not required, and other frameworks can be used.
I've re-enabled End-to-end tests with IE11 Mode for Edge. These now run on GitHub actions. It's not possible to re-enable Unit tests, because these now use ES6 modules which IE11 doesn't support. However, automatic e2e tests seem like a better way of testing IE11 compatibility in any case. So we can close this now.