Share the mock Apollo cache config across policy store specs

What does this MR do and why?

Adds createPolicyStoreMockApollo(handlers) in a new mock_apollo.js. It spreads the ~/lib/graphql type policies under the page's own, which matches production's createCache. The list, detail and editor specs use it. The list spec used to pass the page's type policies alone, which replaced the global ones instead of adding to them. Follows up a review thread on !258733.

Related to #624217

References

Screenshots or screen recordings

No UI changes.

How to set up and validate locally

  1. Run the specs: yarn jest ee/spec/frontend/policy_store
  2. Review ee/spec/frontend/policy_store/mock_apollo.js and its use in components/list/app_spec.js, components/detail/app_spec.js and components/editor/app_spec.js.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist.

Merge request reports

Loading
Loading