Skip to content

Remove calls to `wrapper.vm` in ci_variable_list specs

Mireya Andres requested to merge ma/ci-vars-remove-vm-calls into master

What does this MR do and why?

Resolves #396827 (closed). This was done as a follow-up to !113171 (comment 1313848453) and as part of grouppipeline security's FCL Plan to improve reliability.

By removing calls to wrapper.vm, this makes our specs more robust since we're making more explicit assertions without mocking or viewing the internals of our Vue components as if they're a public interface. This is also in line with our frontend initiative to gear up for Vue 3 migration and improve our frontend testing suite (such as Remove spying on Vue components methods (&5106)).

This MR updates all affected spec files for CI Variables.

Context for the reviewer: There are three different levels of CI Variables (Instance/Admin, Group, and Project). You can manage these variables separately through the Admin, Group, and Project CI/CD settings. Since they have a similar foundation, the code is structured so that all three views use the same shared components. We only just need to pass the context from the top-level, such as which queries and mutations to use, etc.

Screenshots or screen recordings

N/A

How to set up and validate locally

Specs/Pipeline should still pass.

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 Mireya Andres

Merge request reports