Loading
Add a spec for the policy store Apollo provider
What does this MR do and why?
Adds apollo_spec.js for the policy store Apollo provider. The spec asserts that each call to the provider factory builds its own client. For both the organization and the group container, it also asserts that the cache keeps a policies read when a catalogs read writes the same policyStore, and when a later read of the same policyStore comes back null. With the type policies removed from apollo.js, four of the five tests fail. 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 new spec:
yarn jest ee/spec/frontend/policy_store/apollo_spec.js - Run the whole folder:
yarn jest ee/spec/frontend/policy_store - Read the spec next to
ee/app/assets/javascripts/policy_store/apollo.js. To see it fail, remove thepolicyStoretype policies there and rerun the spec.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist.