diff options
author | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 22:34:23 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 22:34:23 +0300 |
commit | 6438df3a1e0fb944485cebf07976160184697d72 (patch) | |
tree | 00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /spec/frontend/issuable | |
parent | 42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff) |
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'spec/frontend/issuable')
4 files changed, 13 insertions, 22 deletions
diff --git a/spec/frontend/issuable/related_issues/components/add_issuable_form_spec.js b/spec/frontend/issuable/related_issues/components/add_issuable_form_spec.js index 17a195df494..de2671816d8 100644 --- a/spec/frontend/issuable/related_issues/components/add_issuable_form_spec.js +++ b/spec/frontend/issuable/related_issues/components/add_issuable_form_spec.js @@ -22,13 +22,14 @@ const issuable2 = { const pathIdSeparator = PathIdSeparator.Issue; -const findFormInput = wrapper => wrapper.find('.js-add-issuable-form-input').element; +const findFormInput = (wrapper) => wrapper.find('.js-add-issuable-form-input').element; -const findRadioInput = (inputs, value) => inputs.filter(input => input.element.value === value)[0]; +const findRadioInput = (inputs, value) => + inputs.filter((input) => input.element.value === value)[0]; -const findRadioInputs = wrapper => wrapper.findAll('[name="linked-issue-type-radio"]'); +const findRadioInputs = (wrapper) => wrapper.findAll('[name="linked-issue-type-radio"]'); -const constructWrapper = props => { +const constructWrapper = (props) => { return shallowMount(AddIssuableForm, { propsData: { inputValue: '', @@ -192,7 +193,7 @@ describe('AddIssuableForm', () => { }); describe('when the form is submitted', () => { - it('emits an event with a "relates_to" link type when the "relates to" radio input selected', done => { + it('emits an event with a "relates_to" link type when the "relates to" radio input selected', (done) => { jest.spyOn(wrapper.vm, '$emit').mockImplementation(() => {}); wrapper.vm.linkedIssueType = linkedIssueTypesMap.RELATES_TO; @@ -207,7 +208,7 @@ describe('AddIssuableForm', () => { }); }); - it('emits an event with a "blocks" link type when the "blocks" radio input selected', done => { + it('emits an event with a "blocks" link type when the "blocks" radio input selected', (done) => { jest.spyOn(wrapper.vm, '$emit').mockImplementation(() => {}); wrapper.vm.linkedIssueType = linkedIssueTypesMap.BLOCKS; @@ -222,7 +223,7 @@ describe('AddIssuableForm', () => { }); }); - it('emits an event with a "is_blocked_by" link type when the "is blocked by" radio input selected', done => { + it('emits an event with a "is_blocked_by" link type when the "is blocked by" radio input selected', (done) => { jest.spyOn(wrapper.vm, '$emit').mockImplementation(() => {}); wrapper.vm.linkedIssueType = linkedIssueTypesMap.IS_BLOCKED_BY; @@ -237,7 +238,7 @@ describe('AddIssuableForm', () => { }); }); - it('shows error message when error is present', done => { + it('shows error message when error is present', (done) => { const itemAddFailureMessage = 'Something went wrong while submitting.'; wrapper.setProps({ hasError: true, diff --git a/spec/frontend/issuable/related_issues/components/related_issues_block_spec.js b/spec/frontend/issuable/related_issues/components/related_issues_block_spec.js index dd05f49b458..c0889b09adc 100644 --- a/spec/frontend/issuable/related_issues/components/related_issues_block_spec.js +++ b/spec/frontend/issuable/related_issues/components/related_issues_block_spec.js @@ -130,11 +130,8 @@ describe('RelatedIssuesBlock', () => { describe('showCategorizedIssues prop', () => { const issueList = () => wrapper.findAll('.js-related-issues-token-list-item'); const categorizedHeadings = () => wrapper.findAll('h4'); - const headingTextAt = index => - categorizedHeadings() - .at(index) - .text(); - const mountComponent = showCategorizedIssues => { + const headingTextAt = (index) => categorizedHeadings().at(index).text(); + const mountComponent = (showCategorizedIssues) => { wrapper = mount(RelatedIssuesBlock, { propsData: { pathIdSeparator: PathIdSeparator.Issue, diff --git a/spec/frontend/issuable/related_issues/components/related_issues_list_spec.js b/spec/frontend/issuable/related_issues/components/related_issues_list_spec.js index 39bc244297b..ffd9683cd6b 100644 --- a/spec/frontend/issuable/related_issues/components/related_issues_list_spec.js +++ b/spec/frontend/issuable/related_issues/components/related_issues_list_spec.js @@ -182,12 +182,7 @@ describe('RelatedIssuesList', () => { }); it('shows due date', () => { - expect( - wrapper - .find(IssueDueDate) - .find('.board-card-info-text') - .text(), - ).toBe('Nov 22, 2010'); + expect(wrapper.find(IssueDueDate).find('.board-card-info-text').text()).toBe('Nov 22, 2010'); }); }); }); diff --git a/spec/frontend/issuable/related_issues/components/related_issues_root_spec.js b/spec/frontend/issuable/related_issues/components/related_issues_root_spec.js index 2c02e1e1de4..93fe321957c 100644 --- a/spec/frontend/issuable/related_issues/components/related_issues_root_spec.js +++ b/spec/frontend/issuable/related_issues/components/related_issues_root_spec.js @@ -315,9 +315,7 @@ describe('RelatedIssuesRoot', () => { const input = 23; wrapper.vm.onInput({ - untouchedRawReferences: String(input) - .trim() - .split(/\s/), + untouchedRawReferences: String(input).trim().split(/\s/), touchedReference: input, }); |