Add routing to secrets page
What does this MR do and why?
Inside the feature-flagged secrets vue app, this MR sets up vue-router routing and breadcrumbs (and adds some mock data so that we can navigate around for testing).
Screenshots or screen recordings
Before | After |
---|---|
![]() |
Screen_Recording_2023-11-06_at_14.48.14 Screen_Recording_2023-11-06_at_14.46.38 |
route | expected view/breadcrumbs |
---|---|
/-/secrets/ |
![]() |
/-/secrets/new |
![]() |
/-/secrets/:key/details |
![]() |
/-/secrets/:key/auditlog |
![]() |
/-/secrets/:key/edit |
![]() |
How to set up and validate locally
Check out the branch and enable the feature flag for a root group:
git checkout 424453-tanukey-ui-vue-router
echo "Feature.enable(:ci_tanukey_ui, Group.find_by_full_path(\"gitlab-org\"))" | gdk rails c
- have developer-or-higher access to a root group and enable the feature flag for that group
-
note: make sure this is a root group - enabling the flag for a subgroup will have no effect because we check for the flag on the
project.group.root_ancestor
/project.root_ancestor
-
note: make sure this is a root group - enabling the flag for a subgroup will have no effect because we check for the flag on the
- navigate to the root group, for example: http://gdk.test:3000/gitlab-org
- insert
/groups
into the url and add/-/secrets
onto the end of the url: http://gdk.test:3000/groups/gitlab-org/-/secrets - click around and verify that the links and buttons do what you would expect (and that the breadcrumbs are correct)
- all descendants of the group for which the feature flag is enabled should show secrets pages - navigate to any subgroup or project that belongs to the group (that you also have developer-or-higher access to) and repeat the process:
- navigate to some project: http://gdk.test:3000/gitlab-org/gitlab-test
- add
/-/secrets
onto the end of the url: http://gdk.test:3000/gitlab-org/gitlab-test/-/secrets - click around and verify that the links and buttons do what you would expect (and that the breadcrumbs are correct)
- navigate to some subgroup: http://gdk.test:3000/gitlab-org/gitlab-test/some-subgroup
- insert
/groups
into the url and add/-/secrets
onto the end of the url: http://gdk.test:3000/groups/gitlab-org/gitlab-test/some-subgroup/-/secrets - 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #424453 (closed)
Edited by Miranda Fluharty