summaryrefslogtreecommitdiff
path: root/spec/frontend/ide/components/ide_side_bar_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/ide/components/ide_side_bar_spec.js')
-rw-r--r--spec/frontend/ide/components/ide_side_bar_spec.js34
1 files changed, 17 insertions, 17 deletions
diff --git a/spec/frontend/ide/components/ide_side_bar_spec.js b/spec/frontend/ide/components/ide_side_bar_spec.js
index 4469c3fc901..4784d6c516f 100644
--- a/spec/frontend/ide/components/ide_side_bar_spec.js
+++ b/spec/frontend/ide/components/ide_side_bar_spec.js
@@ -47,32 +47,32 @@ describe('IdeSidebar', () => {
await nextTick();
- expect(wrapper.findAll(GlSkeletonLoader)).toHaveLength(3);
+ expect(wrapper.findAllComponents(GlSkeletonLoader)).toHaveLength(3);
});
describe('deferred rendering components', () => {
it('fetches components on demand', async () => {
wrapper = createComponent();
- expect(wrapper.find(IdeTree).exists()).toBe(true);
- expect(wrapper.find(IdeReview).exists()).toBe(false);
- expect(wrapper.find(RepoCommitSection).exists()).toBe(false);
+ expect(wrapper.findComponent(IdeTree).exists()).toBe(true);
+ expect(wrapper.findComponent(IdeReview).exists()).toBe(false);
+ expect(wrapper.findComponent(RepoCommitSection).exists()).toBe(false);
store.state.currentActivityView = leftSidebarViews.review.name;
await waitForPromises();
await nextTick();
- expect(wrapper.find(IdeTree).exists()).toBe(false);
- expect(wrapper.find(IdeReview).exists()).toBe(true);
- expect(wrapper.find(RepoCommitSection).exists()).toBe(false);
+ expect(wrapper.findComponent(IdeTree).exists()).toBe(false);
+ expect(wrapper.findComponent(IdeReview).exists()).toBe(true);
+ expect(wrapper.findComponent(RepoCommitSection).exists()).toBe(false);
store.state.currentActivityView = leftSidebarViews.commit.name;
await waitForPromises();
await nextTick();
- expect(wrapper.find(IdeTree).exists()).toBe(false);
- expect(wrapper.find(IdeReview).exists()).toBe(false);
- expect(wrapper.find(RepoCommitSection).exists()).toBe(true);
+ expect(wrapper.findComponent(IdeTree).exists()).toBe(false);
+ expect(wrapper.findComponent(IdeReview).exists()).toBe(false);
+ expect(wrapper.findComponent(RepoCommitSection).exists()).toBe(true);
});
it.each`
view | tree | review | commit
@@ -86,23 +86,23 @@ describe('IdeSidebar', () => {
await waitForPromises();
await nextTick();
- expect(wrapper.find(IdeTree).exists()).toBe(tree);
- expect(wrapper.find(IdeReview).exists()).toBe(review);
- expect(wrapper.find(RepoCommitSection).exists()).toBe(commit);
+ expect(wrapper.findComponent(IdeTree).exists()).toBe(tree);
+ expect(wrapper.findComponent(IdeReview).exists()).toBe(review);
+ expect(wrapper.findComponent(RepoCommitSection).exists()).toBe(commit);
});
});
it('keeps the current activity view components alive', async () => {
wrapper = createComponent();
- const ideTreeComponent = wrapper.find(IdeTree).element;
+ const ideTreeComponent = wrapper.findComponent(IdeTree).element;
store.state.currentActivityView = leftSidebarViews.commit.name;
await waitForPromises();
await nextTick();
- expect(wrapper.find(IdeTree).exists()).toBe(false);
- expect(wrapper.find(RepoCommitSection).exists()).toBe(true);
+ expect(wrapper.findComponent(IdeTree).exists()).toBe(false);
+ expect(wrapper.findComponent(RepoCommitSection).exists()).toBe(true);
store.state.currentActivityView = leftSidebarViews.edit.name;
@@ -110,6 +110,6 @@ describe('IdeSidebar', () => {
await nextTick();
// reference to the elements remains the same, meaning the components were kept alive
- expect(wrapper.find(IdeTree).element).toEqual(ideTreeComponent);
+ expect(wrapper.findComponent(IdeTree).element).toEqual(ideTreeComponent);
});
});