From 07ec2ab8f438c7d8647d4ea0a433bd65e452b2ab Mon Sep 17 00:00:00 2001 From: Mark Bouslog Date: Wed, 6 Dec 2023 11:38:53 -0600 Subject: [PATCH] app-project: Fix ProjectStatistics project stats href (#5751) * Refactor test for ProjectStatistics project stats href * Add /projects to ProjectsStatistics project stats href --- .../components/ProjectStatistics/ProjectStatisticsContainer.js | 2 +- .../ProjectStatistics/ProjectStatisticsContainer.spec.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/app-project/src/shared/components/ProjectStatistics/ProjectStatisticsContainer.js b/packages/app-project/src/shared/components/ProjectStatistics/ProjectStatisticsContainer.js index cdedcfbfb7..2b3a73b17d 100644 --- a/packages/app-project/src/shared/components/ProjectStatistics/ProjectStatisticsContainer.js +++ b/packages/app-project/src/shared/components/ProjectStatistics/ProjectStatisticsContainer.js @@ -22,7 +22,7 @@ class ProjectStatisticsContainer extends Component { const owner = router?.query?.owner const project = router?.query?.project return { - href: `/${owner}/${project}/stats` + href: `/projects/${owner}/${project}/stats` } } diff --git a/packages/app-project/src/shared/components/ProjectStatistics/ProjectStatisticsContainer.spec.js b/packages/app-project/src/shared/components/ProjectStatistics/ProjectStatisticsContainer.spec.js index 69d8fff246..d1e3ff81cf 100644 --- a/packages/app-project/src/shared/components/ProjectStatistics/ProjectStatisticsContainer.spec.js +++ b/packages/app-project/src/shared/components/ProjectStatistics/ProjectStatisticsContainer.spec.js @@ -48,7 +48,7 @@ describe('Component > ProjectStatisticsContainer', function () { it('should pass through a `linkProps` prop', function () { expect(projectStatisticsWrapper.prop('linkProps')).to.deep.equal({ - href: `/foo/bar/stats` + href: `/projects/foo/bar/stats` }) })