Simplify global gon clean up in tests

What does this MR do and why?

This change improves the way we set up our tests so the window.gon object is instantiated in every test.

The setup is done globally at: spec/frontend/__helpers__/shared_test_setup.js

Some tests were modified so their setups were not overridden breaking the tests.

Why?

Currently modifications made to the gon object can potentially be carried from one test suite to the other. Test authors are responsible for cleaning up their gon modifications after each test.

This change lets developers worry less about set up and tear down of tests.

Screenshots or screen recordings

NA

How to set up and validate locally

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

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 Miguel Rincon

Merge request reports

Loading