Skip to content

Fix spec test_case_sidebar_spec

Samantha Ming requested to merge 391165-fix-spec-test-case-sidebar into master

What does this MR do and why?

This is part of the Vue 3 migration > &5102

  • Detected spy on Vue instance method.
  • .setData() usage
  • wrapper.vm usage

Refactor Notes

I ended up rewriting a significant portion of this spec file during the migration process. The original structure was challenging to migrate over due to its heavy reliance on testing implementation details through the use of wrapper.vm, which didn't have corresponding user interactions that could be triggered.

// Original
describe('computed', () => {
describe('methods', () => {
describe('template', () => {

I restructured the tests so it more closely aligns with our follow the user principle. Now, the grouping of tests (describe blocks) mirrors the actual UI components and user interactions of the feature, rather than the internal implementation details.

// Updated
describe('To Do section', () => {
describe('Label select widget', () => {
describe('Project select', () => {

Docs to test cases > https://docs.gitlab.com/ee/ci/test_cases/


Screenshots or screen recordings

n/a

How to set up and validate locally

Test pass, profit 💰

MR acceptance checklist

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

Related to #391165 (closed)

Edited by Samantha Ming

Merge request reports