Use mocked Apollo Client instead of $apollo in agents_spec.js

What does this MR do and why?

Use mocked Apollo Client in spec/frontend/clusters_list/components/agents_spec.js

Related to &7436

Convert $apollo mocks in tests to using mocked Apollo Client

Our recommended strategy for testing Vue components with Apollo operations now is mocking Apollo Client in tests. However, there are a few specs where we still mock $apollo with mocks property when mounting a component. These tests should be refactored to using mocked Apollo client. This would also allow us to remove the unnecessary createLocalVue calls from tests

Screenshots or screen recordings

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

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.

Related to #384585

Edited by Miguel Rincon

Merge request reports

Loading