diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-28 21:09:15 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-28 21:09:15 +0000 |
commit | 8831c2df7fa3f1bb567e284e4b8c0a4f441e74b3 (patch) | |
tree | 36b1b430075ff6e63524be14585dbb614e893e8c /spec/javascripts | |
parent | 1c8fa70f9d0818e2a82089c8643a6e455bca47fd (diff) | |
download | gitlab-ce-8831c2df7fa3f1bb567e284e4b8c0a4f441e74b3.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/javascripts')
-rw-r--r-- | spec/javascripts/blob_edit/blob_bundle_spec.js | 30 | ||||
-rw-r--r-- | spec/javascripts/vue_shared/components/issue/related_issuable_mock_data.js | 117 |
2 files changed, 1 insertions, 146 deletions
diff --git a/spec/javascripts/blob_edit/blob_bundle_spec.js b/spec/javascripts/blob_edit/blob_bundle_spec.js deleted file mode 100644 index 06c6a603155..00000000000 --- a/spec/javascripts/blob_edit/blob_bundle_spec.js +++ /dev/null @@ -1,30 +0,0 @@ -import $ from 'jquery'; -import blobBundle from '~/blob_edit/blob_bundle'; - -describe('BlobBundle', () => { - beforeEach(() => { - spyOnDependency(blobBundle, 'EditBlob').and.stub(); - setFixtures(` - <div class="js-edit-blob-form" data-blob-filename="blah"> - <button class="js-commit-button"></button> - <a class="btn btn-cancel" href="#"></a> - </div>`); - blobBundle(); - }); - - it('sets the window beforeunload listener to a function returning a string', () => { - expect(window.onbeforeunload()).toBe(''); - }); - - it('removes beforeunload listener if commit button is clicked', () => { - $('.js-commit-button').click(); - - expect(window.onbeforeunload).toBeNull(); - }); - - it('removes beforeunload listener when cancel link is clicked', () => { - $('.btn.btn-cancel').click(); - - expect(window.onbeforeunload).toBeNull(); - }); -}); diff --git a/spec/javascripts/vue_shared/components/issue/related_issuable_mock_data.js b/spec/javascripts/vue_shared/components/issue/related_issuable_mock_data.js index d3dc169ddab..3c42f0c2aa9 100644 --- a/spec/javascripts/vue_shared/components/issue/related_issuable_mock_data.js +++ b/spec/javascripts/vue_shared/components/issue/related_issuable_mock_data.js @@ -1,116 +1 @@ -export const defaultProps = { - endpoint: '/foo/bar/issues/1/related_issues', - currentNamespacePath: 'foo', - currentProjectPath: 'bar', -}; - -export const issuable1 = { - id: 200, - epicIssueId: 1, - confidential: false, - reference: 'foo/bar#123', - displayReference: '#123', - title: 'some title', - path: '/foo/bar/issues/123', - state: 'opened', - linkType: 'relates_to', - dueDate: '2010-11-22', - weight: 5, -}; - -export const issuable2 = { - id: 201, - epicIssueId: 2, - confidential: false, - reference: 'foo/bar#124', - displayReference: '#124', - title: 'some other thing', - path: '/foo/bar/issues/124', - state: 'opened', - linkType: 'blocks', -}; - -export const issuable3 = { - id: 202, - epicIssueId: 3, - confidential: false, - reference: 'foo/bar#125', - displayReference: '#125', - title: 'some other other thing', - path: '/foo/bar/issues/125', - state: 'opened', - linkType: 'is_blocked_by', -}; - -export const issuable4 = { - id: 203, - epicIssueId: 4, - confidential: false, - reference: 'foo/bar#126', - displayReference: '#126', - title: 'some other other other thing', - path: '/foo/bar/issues/126', - state: 'opened', -}; - -export const issuable5 = { - id: 204, - epicIssueId: 5, - confidential: false, - reference: 'foo/bar#127', - displayReference: '#127', - title: 'some other other other thing', - path: '/foo/bar/issues/127', - state: 'opened', -}; - -export const defaultMilestone = { - id: 1, - state: 'active', - title: 'Milestone title', - start_date: '2018-01-01', - due_date: '2019-12-31', -}; - -export const defaultAssignees = [ - { - id: 1, - name: 'Administrator', - username: 'root', - state: 'active', - avatar_url: `${gl.TEST_HOST}`, - web_url: `${gl.TEST_HOST}/root`, - status_tooltip_html: null, - path: '/root', - }, - { - id: 13, - name: 'Brooks Beatty', - username: 'brynn_champlin', - state: 'active', - avatar_url: `${gl.TEST_HOST}`, - web_url: `${gl.TEST_HOST}/brynn_champlin`, - status_tooltip_html: null, - path: '/brynn_champlin', - }, - { - id: 6, - name: 'Bryce Turcotte', - username: 'melynda', - state: 'active', - avatar_url: `${gl.TEST_HOST}`, - web_url: `${gl.TEST_HOST}/melynda`, - status_tooltip_html: null, - path: '/melynda', - }, - { - id: 20, - name: 'Conchita Eichmann', - username: 'juliana_gulgowski', - state: 'active', - avatar_url: `${gl.TEST_HOST}`, - web_url: `${gl.TEST_HOST}/juliana_gulgowski`, - status_tooltip_html: null, - path: '/juliana_gulgowski', - }, -]; +export * from '../../../../frontend/vue_shared/components/issue/related_issuable_mock_data'; |