Skip to content

Fix remaining Vue.js 2/3 snapshot specs differences

Illya Klymov requested to merge xanf-fix-serializer-follow-up into master

What does this MR do and why?

Related issue: Port custom snapshot serializer for Vue from gi... (#386757 - closed)

This is a follow-up of Implement custom snapshot serializer for Vue.js v3 (!128551 - merged) fixing remaining specs differences

How to set up and validate locally

  1. Let's prepare required version of gitlab-ui and merge all required branches (if you're receiving message that some of them does not exists - just skip it)
git merge origin/xanf-fix-ugly-vue
git merge origin/xanf-fix-router-v2
git merge origin/xanf-improve-stubbing-once-again-v2

# install version of gitlab-ui with all needed fixes
yarn add https://gitlab.com/gitlab-org/gitlab-ui/-/jobs/4809835526/artifacts/raw/gitlab-ui.xanf-fix-emptiness-check.tgz

# since this one alters compiler in node_modules drop jest caches 
rm -rf tmp/cache/jest

yarn
  1. Run
yarn jest --maxWorkers 6 -u $(grep -rlE 'toMatchSnapshot|toMatchInlineSnapshot' spec/frontend ee/spec/frontend)

This will update all snapshots with latest Vue.js 2 version

  1. Run
VUE_VERSION=3 yarn jest --maxWorkers 6 $(grep -rlE 'toMatchSnapshot|toMatchInlineSnapshot' spec/frontend ee/spec/frontend)

Observe jest output where all snapshots matches 🎉

Snapshots:   376 passed, 376 total

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Illya Klymov

Merge request reports