Skip to content

Component test fixes

Erwan Rouchet requested to merge test-fixes into master

These are all the test fixes that I made when I tried (unsuccessfully) to rebase #730 and add tests on it. After this MR, #1051 (closed) will be the only, and the largest, issue with component tests.

  • Add all the missing RouterLinkStubs that were causing warnings, close #1050 (closed)
  • Switch from the deprecated this.$nextTick() to calling the global nextTick helper
  • Use findAllComponents, getComponent and findComponent to get specific classes from vue-test-utils that allow us to test a stubbed component's props, which unskips some tests
  • Fix some TypeErrors that were showing up in the test logs but were not thrown, because Vue loves to be as unfriendly as possible in unit tests
  • Unskip some tests by using Chai's isDefined and isUndefined helpers to look for the disabled attribute, since the handling of this attribute changed in Vue 3
  • Unskip some more tests that now work just fine 🤷

This un-skips 23 tests, leaving 43 still skipped.

Merge request reports

Loading