Loading
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
- Run the specs:
yarn jest ee/spec/frontend/policy_store - Review
ee/spec/frontend/policy_store/mock_apollo.jsand its use incomponents/list/app_spec.js,components/detail/app_spec.jsandcomponents/editor/app_spec.js.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist.