Skip to content

Fix a few specs under Vue 3

What does this MR do and why?

Describe in detail what your merge request does and why. Please keep this description updated with any discussion that takes place so that reviewers can understand your intent. Keeping the description updated is especially important if they didn't participate in the discussion.

There were several problems here:

  1. Use of arguments in an inline event handler. This fails in Vue 3, since inline function bodies are compiled to arrow functions, which don't define arguments. Vue 2 presumably compiles these to regular functions, which do define arguments.
  2. Something in the Vue 3 stack doesn't like the store being spread over the test component definition. Instead, we just pass the store as-is.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

***NO VISUAL CHANGES***

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Run the specs under Vue 3:

   VUE_VERSION=3 yarn jest ee/spec/frontend/geo_site_form/components/geo_site_form_selective_sync_spec.js

template sourced from https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/merge_request_templates/Default.md

Related to #487018 (closed)

Edited by Artur Fedorov

Merge request reports

Loading