diff options
Diffstat (limited to 'spec/frontend/projects/compare')
-rw-r--r-- | spec/frontend/projects/compare/components/app_spec.js | 3 | ||||
-rw-r--r-- | spec/frontend/projects/compare/components/mock_data.js | 25 |
2 files changed, 18 insertions, 10 deletions
diff --git a/spec/frontend/projects/compare/components/app_spec.js b/spec/frontend/projects/compare/components/app_spec.js index 18e7f2e0f6e..c9ffdf20c32 100644 --- a/spec/frontend/projects/compare/components/app_spec.js +++ b/spec/frontend/projects/compare/components/app_spec.js @@ -34,7 +34,8 @@ describe('CompareApp component', () => { expect(wrapper.props()).toEqual( expect.objectContaining({ projectCompareIndexPath: defaultProps.projectCompareIndexPath, - refsProjectPath: defaultProps.refsProjectPath, + sourceProjectRefsPath: defaultProps.sourceProjectRefsPath, + targetProjectRefsPath: defaultProps.targetProjectRefsPath, paramsFrom: defaultProps.paramsFrom, paramsTo: defaultProps.paramsTo, }), diff --git a/spec/frontend/projects/compare/components/mock_data.js b/spec/frontend/projects/compare/components/mock_data.js index 61309928c26..81d64469a2a 100644 --- a/spec/frontend/projects/compare/components/mock_data.js +++ b/spec/frontend/projects/compare/components/mock_data.js @@ -1,7 +1,12 @@ -const refsProjectPath = 'some/refs/path'; +const sourceProjectRefsPath = 'some/refs/path'; +const targetProjectRefsPath = 'some/refs/path'; const paramsName = 'to'; const paramsBranch = 'main'; -const defaultProject = { +const sourceProject = { + name: 'some-to-name', + id: '2', +}; +const targetProject = { name: 'some-to-name', id: '1', }; @@ -9,29 +14,31 @@ const defaultProject = { export const appDefaultProps = { projectCompareIndexPath: 'some/path', projectMergeRequestPath: '', - projects: [defaultProject], + projects: [sourceProject], paramsFrom: 'main', paramsTo: 'target/branch', createMrPath: '', - refsProjectPath, - defaultProject, + sourceProjectRefsPath, + targetProjectRefsPath, + sourceProject, + targetProject, }; export const revisionCardDefaultProps = { - selectedProject: defaultProject, + selectedProject: targetProject, paramsBranch, revisionText: 'Source', - refsProjectPath, + refsProjectPath: sourceProjectRefsPath, paramsName, }; export const repoDropdownDefaultProps = { - selectedProject: defaultProject, + selectedProject: targetProject, paramsName, }; export const revisionDropdownDefaultProps = { - refsProjectPath, + refsProjectPath: sourceProjectRefsPath, paramsBranch, paramsName, }; |