[go: up one dir, main page]

Rewrite "align suggestions" test for filtered search to cypress

In Vue3 there is no clean way to spy or replace component methods. Both wrapper.vm.method = ... and jest.spyOn(wrapper.vm, '...') will not work due to the way proxy works in Vue3 (for same reason setMethods and methods mount option was removed in @vue/test-utils v2)

Luckily in gitlab-ui there are not that much occurrences of such dirty approach

One of them (introduced by me, lol) lives in filtered search

https://gitlab.com/gitlab-org/gitlab-ui/blob/main/src/components/base/filtered_search/filtered_search.spec.js#L532

I believe this (just this) test will benefit from rewriting to cypress