diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-05 12:08:43 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-05 12:08:43 +0300 |
commit | 26384c9a61da9922b8fa4b8351d4e42d51661b37 (patch) | |
tree | ef3decbed644db3c97dcdbb5b71d4ade77f3155d /spec/frontend/diffs/components/diff_stats_spec.js | |
parent | 79cbe31b18159ea394c6f6e3027c1dc69bdabb75 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/diffs/components/diff_stats_spec.js')
-rw-r--r-- | spec/frontend/diffs/components/diff_stats_spec.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/frontend/diffs/components/diff_stats_spec.js b/spec/frontend/diffs/components/diff_stats_spec.js index 0dffc74f608..5956b478019 100644 --- a/spec/frontend/diffs/components/diff_stats_spec.js +++ b/spec/frontend/diffs/components/diff_stats_spec.js @@ -1,6 +1,6 @@ import { shallowMount } from '@vue/test-utils'; -import Icon from '~/vue_shared/components/icon.vue'; import DiffStats from '~/diffs/components/diff_stats.vue'; +import Icon from '~/vue_shared/components/icon.vue'; describe('diff_stats', () => { it('does not render a group if diffFileLengths is empty', () => { @@ -37,18 +37,18 @@ describe('diff_stats', () => { }, }); + const findFileLine = name => wrapper.find(name); const findIcon = name => wrapper .findAll(Icon) .filter(c => c.attributes('name') === name) .at(0).element.parentNode; - - const additions = findIcon('file-addition'); - const deletions = findIcon('file-deletion'); + const additions = findFileLine('.js-file-addition-line'); + const deletions = findFileLine('.js-file-deletion-line'); const filesChanged = findIcon('doc-code'); - expect(additions.textContent).toContain('100'); - expect(deletions.textContent).toContain('200'); + expect(additions.text()).toBe('100'); + expect(deletions.text()).toBe('200'); expect(filesChanged.textContent).toContain('300'); }); }); |