diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-04 10:03:30 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-04 10:03:30 +0000 |
commit | d35df0ad158c14cb28f583f4b26c4196ef23a3f7 (patch) | |
tree | 5a1992758772519104eacb5de2c231721876541c /spec/frontend | |
parent | 3c51da6f5782e53123a7ed5af98ba0828cbfa49f (diff) | |
download | gitlab-ce-d35df0ad158c14cb28f583f4b26c4196ef23a3f7.tar.gz |
Add latest changes from gitlab-org/gitlab@12-10-stable-ee
Diffstat (limited to 'spec/frontend')
-rw-r--r-- | spec/frontend/repository/components/table/row_spec.js | 2 | ||||
-rw-r--r-- | spec/frontend/repository/log_tree_spec.js | 28 | ||||
-rw-r--r-- | spec/frontend/repository/router_spec.js | 13 |
3 files changed, 22 insertions, 21 deletions
diff --git a/spec/frontend/repository/components/table/row_spec.js b/spec/frontend/repository/components/table/row_spec.js index cb2193e1d9a..800a7e586a8 100644 --- a/spec/frontend/repository/components/table/row_spec.js +++ b/spec/frontend/repository/components/table/row_spec.js @@ -26,7 +26,7 @@ function factory(propsData = {}) { }, }); - vm.setData({ ref: 'master' }); + vm.setData({ escapedRef: 'master' }); } describe('Repository table row component', () => { diff --git a/spec/frontend/repository/log_tree_spec.js b/spec/frontend/repository/log_tree_spec.js index 8da2f39f71f..5637d0be957 100644 --- a/spec/frontend/repository/log_tree_spec.js +++ b/spec/frontend/repository/log_tree_spec.js @@ -53,7 +53,7 @@ describe('fetchLogsTree', () => { client = { readQuery: () => ({ projectPath: 'gitlab-org/gitlab-foss', - ref: 'master', + escapedRef: 'master', commits: [], }), writeQuery: jest.fn(), @@ -86,16 +86,18 @@ describe('fetchLogsTree', () => { it('calls entry resolver', () => fetchLogsTree(client, '', '0', resolver).then(() => { - expect(resolver.resolve).toHaveBeenCalledWith({ - __typename: 'LogTreeCommit', - commitPath: 'https://test.com', - committedDate: '2019-01-01', - fileName: 'index.js', - filePath: '/index.js', - message: 'testing message', - sha: '123', - type: 'blob', - }); + expect(resolver.resolve).toHaveBeenCalledWith( + expect.objectContaining({ + __typename: 'LogTreeCommit', + commitPath: 'https://test.com', + committedDate: '2019-01-01', + fileName: 'index.js', + filePath: '/index.js', + message: 'testing message', + sha: '123', + type: 'blob', + }), + ); })); it('writes query to client', () => @@ -104,7 +106,7 @@ describe('fetchLogsTree', () => { query: expect.anything(), data: { commits: [ - { + expect.objectContaining({ __typename: 'LogTreeCommit', commitPath: 'https://test.com', committedDate: '2019-01-01', @@ -113,7 +115,7 @@ describe('fetchLogsTree', () => { message: 'testing message', sha: '123', type: 'blob', - }, + }), ], }, }); diff --git a/spec/frontend/repository/router_spec.js b/spec/frontend/repository/router_spec.js index 6944b23558a..f2f3dda41d9 100644 --- a/spec/frontend/repository/router_spec.js +++ b/spec/frontend/repository/router_spec.js @@ -4,13 +4,12 @@ import createRouter from '~/repository/router'; describe('Repository router spec', () => { it.each` - path | branch | component | componentName - ${'/'} | ${'master'} | ${IndexPage} | ${'IndexPage'} - ${'/tree/master'} | ${'master'} | ${TreePage} | ${'TreePage'} - ${'/-/tree/master'} | ${'master'} | ${TreePage} | ${'TreePage'} - ${'/-/tree/master/app/assets'} | ${'master'} | ${TreePage} | ${'TreePage'} - ${'/-/tree/feature/test-%23/app/assets'} | ${'feature/test-#'} | ${TreePage} | ${'TreePage'} - ${'/-/tree/123/app/assets'} | ${'master'} | ${null} | ${'null'} + path | branch | component | componentName + ${'/'} | ${'master'} | ${IndexPage} | ${'IndexPage'} + ${'/tree/master'} | ${'master'} | ${TreePage} | ${'TreePage'} + ${'/-/tree/master'} | ${'master'} | ${TreePage} | ${'TreePage'} + ${'/-/tree/master/app/assets'} | ${'master'} | ${TreePage} | ${'TreePage'} + ${'/-/tree/123/app/assets'} | ${'master'} | ${null} | ${'null'} `('sets component as $componentName for path "$path"', ({ path, component, branch }) => { const router = createRouter('', branch); |