diff options
Diffstat (limited to 'spec/frontend/projects/compare')
5 files changed, 11 insertions, 11 deletions
diff --git a/spec/frontend/projects/compare/components/app_spec.js b/spec/frontend/projects/compare/components/app_spec.js index c9ffdf20c32..2dbecf7cc61 100644 --- a/spec/frontend/projects/compare/components/app_spec.js +++ b/spec/frontend/projects/compare/components/app_spec.js @@ -58,7 +58,7 @@ describe('CompareApp component', () => { }); it('render Source and Target BranchDropdown components', () => { - const revisionCards = wrapper.findAll(RevisionCard); + const revisionCards = wrapper.findAllComponents(RevisionCard); expect(revisionCards.length).toBe(2); expect(revisionCards.at(0).props('revisionText')).toBe('Source'); @@ -66,7 +66,7 @@ describe('CompareApp component', () => { }); describe('compare button', () => { - const findCompareButton = () => wrapper.find(GlButton); + const findCompareButton = () => wrapper.findComponent(GlButton); it('renders button', () => { expect(findCompareButton().exists()).toBe(true); diff --git a/spec/frontend/projects/compare/components/repo_dropdown_spec.js b/spec/frontend/projects/compare/components/repo_dropdown_spec.js index 98aec347e4b..21cca857c6a 100644 --- a/spec/frontend/projects/compare/components/repo_dropdown_spec.js +++ b/spec/frontend/projects/compare/components/repo_dropdown_spec.js @@ -21,7 +21,7 @@ describe('RepoDropdown component', () => { wrapper = null; }); - const findGlDropdown = () => wrapper.find(GlDropdown); + const findGlDropdown = () => wrapper.findComponent(GlDropdown); const findHiddenInput = () => wrapper.find('input[type="hidden"]'); describe('Source Revision', () => { @@ -73,7 +73,7 @@ describe('RepoDropdown component', () => { }); it('emits `selectProject` event when another target project is selected', async () => { - findGlDropdown().findAll(GlDropdownItem).at(0).vm.$emit('click'); + findGlDropdown().findAllComponents(GlDropdownItem).at(0).vm.$emit('click'); await nextTick(); expect(wrapper.emitted('selectProject')[0][0]).toEqual({ diff --git a/spec/frontend/projects/compare/components/revision_card_spec.js b/spec/frontend/projects/compare/components/revision_card_spec.js index a741393fcf3..b23bd91ceda 100644 --- a/spec/frontend/projects/compare/components/revision_card_spec.js +++ b/spec/frontend/projects/compare/components/revision_card_spec.js @@ -32,10 +32,10 @@ describe('RepoDropdown component', () => { }); it('renders RepoDropdown component', () => { - expect(wrapper.findAll(RepoDropdown).exists()).toBe(true); + expect(wrapper.findAllComponents(RepoDropdown).exists()).toBe(true); }); it('renders RevisionDropdown component', () => { - expect(wrapper.findAll(RevisionDropdown).exists()).toBe(true); + expect(wrapper.findAllComponents(RevisionDropdown).exists()).toBe(true); }); }); diff --git a/spec/frontend/projects/compare/components/revision_dropdown_legacy_spec.js b/spec/frontend/projects/compare/components/revision_dropdown_legacy_spec.js index 102f95f65da..f64af1aa994 100644 --- a/spec/frontend/projects/compare/components/revision_dropdown_legacy_spec.js +++ b/spec/frontend/projects/compare/components/revision_dropdown_legacy_spec.js @@ -38,7 +38,7 @@ describe('RevisionDropdown component', () => { axiosMock.restore(); }); - const findGlDropdown = () => wrapper.find(GlDropdown); + const findGlDropdown = () => wrapper.findComponent(GlDropdown); it('sets hidden input', () => { expect(wrapper.find('input[type="hidden"]').attributes('value')).toBe( @@ -99,7 +99,7 @@ describe('RevisionDropdown component', () => { }); it('emits a "selectRevision" event when a revision is selected', async () => { - const findGlDropdownItems = () => wrapper.findAll(GlDropdownItem); + const findGlDropdownItems = () => wrapper.findAllComponents(GlDropdownItem); const findFirstGlDropdownItem = () => findGlDropdownItems().at(0); // setData usage is discouraged. See https://gitlab.com/groups/gitlab-org/-/epics/7330 for details diff --git a/spec/frontend/projects/compare/components/revision_dropdown_spec.js b/spec/frontend/projects/compare/components/revision_dropdown_spec.js index c8a90848492..35e32fd3da0 100644 --- a/spec/frontend/projects/compare/components/revision_dropdown_spec.js +++ b/spec/frontend/projects/compare/components/revision_dropdown_spec.js @@ -35,8 +35,8 @@ describe('RevisionDropdown component', () => { axiosMock.restore(); }); - const findGlDropdown = () => wrapper.find(GlDropdown); - const findSearchBox = () => wrapper.find(GlSearchBoxByType); + const findGlDropdown = () => wrapper.findComponent(GlDropdown); + const findSearchBox = () => wrapper.findComponent(GlSearchBoxByType); it('sets hidden input', () => { createComponent(); @@ -144,7 +144,7 @@ describe('RevisionDropdown component', () => { wrapper.vm.branches = ['some-branch']; await nextTick(); - findGlDropdown().findAll(GlDropdownItem).at(0).vm.$emit('click'); + findGlDropdown().findAllComponents(GlDropdownItem).at(0).vm.$emit('click'); expect(wrapper.emitted('selectRevision')[0][0]).toEqual({ direction: 'to', |