diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-17 09:08:24 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-17 09:08:24 +0000 |
commit | 728a207ea6a99a4bddc16dbbe82294d3fdb60fe4 (patch) | |
tree | 4bc3b6a859681de3bbeabd7bf2ec5ffd756f3a0a /spec/frontend | |
parent | ea20020f71c7226d57b6449b1d9b6c6f1298223e (diff) | |
download | gitlab-ce-728a207ea6a99a4bddc16dbbe82294d3fdb60fe4.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend')
7 files changed, 36 insertions, 8 deletions
diff --git a/spec/frontend/boards/issue_card_spec.js b/spec/frontend/boards/issue_card_spec.js index b9a88324763..df55a106945 100644 --- a/spec/frontend/boards/issue_card_spec.js +++ b/spec/frontend/boards/issue_card_spec.js @@ -50,7 +50,6 @@ describe('Issue card component', () => { rootPath: '/', }, store, - attachToDocument: true, }); }); diff --git a/spec/frontend/create_cluster/eks_cluster/components/service_credentials_form_spec.js b/spec/frontend/create_cluster/eks_cluster/components/service_credentials_form_spec.js index 92a5f5116ac..c58638f5c80 100644 --- a/spec/frontend/create_cluster/eks_cluster/components/service_credentials_form_spec.js +++ b/spec/frontend/create_cluster/eks_cluster/components/service_credentials_form_spec.js @@ -47,7 +47,6 @@ describe('ServiceCredentialsForm', () => { const findCopyExternalIdButton = () => vm.find('.js-copy-external-id-button'); const findInvalidCredentials = () => vm.find('.js-invalid-credentials'); const findSubmitButton = () => vm.find(LoadingButton); - const findForm = () => vm.find('form[name="service-credentials-form"]'); it('displays provided account id', () => { expect(findAccountIdInput().attributes('value')).toBe(accountId); @@ -77,8 +76,10 @@ describe('ServiceCredentialsForm', () => { }); }); - it('dispatches createRole action when form is submitted', () => { - findForm().trigger('submit'); + it('dispatches createRole action when submit button is clicked', () => { + vm.setData({ roleArn: '123' }); // set role ARN to enable button + + findSubmitButton().vm.$emit('click', new Event('click')); expect(createRoleAction).toHaveBeenCalled(); }); diff --git a/spec/frontend/cycle_analytics/limit_warning_component_spec.js b/spec/frontend/cycle_analytics/limit_warning_component_spec.js index a4606099b06..e712dea67cb 100644 --- a/spec/frontend/cycle_analytics/limit_warning_component_spec.js +++ b/spec/frontend/cycle_analytics/limit_warning_component_spec.js @@ -10,7 +10,6 @@ const createComponent = props => propsData: { ...props, }, - attachToDocument: true, }); describe('Limit warning component', () => { diff --git a/spec/frontend/error_tracking/components/error_details_spec.js b/spec/frontend/error_tracking/components/error_details_spec.js index e876a6da922..e19cb1fd3c1 100644 --- a/spec/frontend/error_tracking/components/error_details_spec.js +++ b/spec/frontend/error_tracking/components/error_details_spec.js @@ -246,5 +246,37 @@ describe('ErrorDetails', () => { }); }); }); + + describe('GitLab commit link', () => { + const gitlabCommit = '7975be0116940bf2ad4321f79d02a55c5f7779aa'; + const gitlabCommitPath = + '/gitlab-org/gitlab-test/commit/7975be0116940bf2ad4321f79d02a55c5f7779aa'; + const findGitLabCommitLink = () => wrapper.find(`[href$="${gitlabCommitPath}"]`); + + it('should display a link', () => { + mocks.$apollo.queries.GQLerror.loading = false; + wrapper.setData({ + GQLerror: { + gitlabCommit, + gitlabCommitPath, + }, + }); + return wrapper.vm.$nextTick().then(() => { + expect(findGitLabCommitLink().exists()).toBe(true); + }); + }); + + it('should display a link', () => { + mocks.$apollo.queries.GQLerror.loading = false; + wrapper.setData({ + GQLerror: { + gitlabCommit: null, + }, + }); + return wrapper.vm.$nextTick().then(() => { + expect(findGitLabCommitLink().exists()).toBe(false); + }); + }); + }); }); }); diff --git a/spec/frontend/jobs/components/erased_block_spec.js b/spec/frontend/jobs/components/erased_block_spec.js index 29a7676abe5..d66ee71df6a 100644 --- a/spec/frontend/jobs/components/erased_block_spec.js +++ b/spec/frontend/jobs/components/erased_block_spec.js @@ -13,7 +13,6 @@ describe('Erased block', () => { const createComponent = props => { wrapper = mount(ErasedBlock, { propsData: props, - attachToDocument: true, }); }; diff --git a/spec/frontend/notes/components/discussion_actions_spec.js b/spec/frontend/notes/components/discussion_actions_spec.js index 7e30e166d65..2d95a86d8a6 100644 --- a/spec/frontend/notes/components/discussion_actions_spec.js +++ b/spec/frontend/notes/components/discussion_actions_spec.js @@ -35,7 +35,6 @@ describe('DiscussionActions', () => { shouldShowJumpToNextDiscussion: true, ...props, }, - attachToDocument: true, }); }; diff --git a/spec/frontend/releases/detail/components/app_spec.js b/spec/frontend/releases/detail/components/app_spec.js index 09f348018f4..fd5239ad44e 100644 --- a/spec/frontend/releases/detail/components/app_spec.js +++ b/spec/frontend/releases/detail/components/app_spec.js @@ -31,7 +31,6 @@ describe('Release detail component', () => { wrapper = mount(ReleaseDetailApp, { store, - attachToDocument: true, }); return wrapper.vm.$nextTick(); |