Skip to content

Move mock data into apollo

Miranda Fluharty requested to merge 424453-apollo-setup into master

What does this MR do and why?

Move the secrets mock data that we added in Add routing to secrets page (!134459 - merged) into apollo:

  • Write mock data to apollo cache in index.js and use queries in group and project app components to get it
  • Provide props from router to components to decouple components from this.$route.params
  • Update tests to match

For Frontend (Tanu-Key): Create root Vue component ... (#424453 - closed)

🎏 This page is behind the ci_tanukey_ui feature flag

Screenshots or screen recordings

There should be no changes to the UI - here's what the skeleton of the secrets app should look like for now:

Screen_Recording_2023-12-06_at_12.19.06

How to set up and validate locally

git checkout 424453-apollo-setup
echo "Feature.enable(:ci_tanukey_ui)" | gdk rails c
  1. navigate to a group, for example: http://gdk.test:3000/gitlab-org
  2. insert /groups into the url and add /-/secrets onto the end of the url: http://gdk.test:3000/groups/gitlab-org/-/secrets
  3. click around and verify that the links and buttons do what you would expect (and that the breadcrumbs are correct)
  4. navigate to a project, for example: http://gdk.test:3000/gitlab-org/gitlab-test
  5. add /-/secrets onto the end of the url: http://gdk.test:3000/gitlab-org/gitlab-test/-/secrets
  6. click around and verify that the links and buttons do what you would expect (and that the breadcrumbs are correct)

to run tests

yarn install
yarn jest ci/secrets

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 Miranda Fluharty

Merge request reports