Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-09-21 18:14:09 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-09-21 18:14:09 +0300
commite87220d9c1a7878a4cb2bb86554c5951371e340b (patch)
treefa8d81c8463cf97362f441f81dfef890df34ebbd /spec/frontend/repository
parentc0a3d287c0d613cc439a31683d06dd70f3411f8c (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/repository')
-rw-r--r--spec/frontend/repository/components/table/index_spec.js2
-rw-r--r--spec/frontend/repository/components/table/parent_row_spec.js4
-rw-r--r--spec/frontend/repository/components/table/row_spec.js16
-rw-r--r--spec/frontend/repository/components/tree_content_spec.js4
-rw-r--r--spec/frontend/repository/components/upload_blob_modal_spec.js12
-rw-r--r--spec/frontend/repository/pages/blob_spec.js2
-rw-r--r--spec/frontend/repository/pages/index_spec.js2
7 files changed, 21 insertions, 21 deletions
diff --git a/spec/frontend/repository/components/table/index_spec.js b/spec/frontend/repository/components/table/index_spec.js
index 697d2dcc7f5..2180f78a8df 100644
--- a/spec/frontend/repository/components/table/index_spec.js
+++ b/spec/frontend/repository/components/table/index_spec.js
@@ -159,7 +159,7 @@ describe('Repository table component', () => {
});
describe('Show more button', () => {
- const showMoreButton = () => vm.find(GlButton);
+ const showMoreButton = () => vm.findComponent(GlButton);
it.each`
hasMore | expectButtonToExist
diff --git a/spec/frontend/repository/components/table/parent_row_spec.js b/spec/frontend/repository/components/table/parent_row_spec.js
index 9daae8c36ef..03fb4242e40 100644
--- a/spec/frontend/repository/components/table/parent_row_spec.js
+++ b/spec/frontend/repository/components/table/parent_row_spec.js
@@ -39,7 +39,7 @@ describe('Repository parent row component', () => {
`('renders link in $path to $to', ({ path, to }) => {
factory(path);
- expect(vm.find(RouterLinkStub).props().to).toEqual({
+ expect(vm.findComponent(RouterLinkStub).props().to).toEqual({
path: to,
});
});
@@ -69,6 +69,6 @@ describe('Repository parent row component', () => {
it('renders loading icon when loading parent', () => {
factory('app/assets', 'app');
- expect(vm.find(GlLoadingIcon).exists()).toBe(true);
+ expect(vm.findComponent(GlLoadingIcon).exists()).toBe(true);
});
});
diff --git a/spec/frontend/repository/components/table/row_spec.js b/spec/frontend/repository/components/table/row_spec.js
index 13b09e57473..64aa6d179a8 100644
--- a/spec/frontend/repository/components/table/row_spec.js
+++ b/spec/frontend/repository/components/table/row_spec.js
@@ -47,7 +47,7 @@ function factory(propsData = {}) {
}
describe('Repository table row component', () => {
- const findRouterLink = () => vm.find(RouterLinkStub);
+ const findRouterLink = () => vm.findComponent(RouterLinkStub);
const findIntersectionObserver = () => vm.findComponent(GlIntersectionObserver);
afterEach(() => {
@@ -124,7 +124,7 @@ describe('Repository table row component', () => {
});
await nextTick();
- expect(vm.find(component).exists()).toBe(true);
+ expect(vm.findComponent(component).exists()).toBe(true);
});
it.each`
@@ -141,7 +141,7 @@ describe('Repository table row component', () => {
});
await nextTick();
- expect(vm.find({ ref: 'link' }).props('to')).toEqual({
+ expect(vm.findComponent({ ref: 'link' }).props('to')).toEqual({
path: `/-/tree/main/${encodeURIComponent(path)}`,
});
});
@@ -197,7 +197,7 @@ describe('Repository table row component', () => {
});
await nextTick();
- expect(vm.find(GlBadge).exists()).toBe(true);
+ expect(vm.findComponent(GlBadge).exists()).toBe(true);
});
it('renders commit and web links with href for submodule', async () => {
@@ -213,7 +213,7 @@ describe('Repository table row component', () => {
await nextTick();
expect(vm.find('a').attributes('href')).toEqual('https://test.com');
- expect(vm.find(GlLink).attributes('href')).toEqual('https://test.com/commit');
+ expect(vm.findComponent(GlLink).attributes('href')).toEqual('https://test.com/commit');
});
it('renders lock icon', async () => {
@@ -226,8 +226,8 @@ describe('Repository table row component', () => {
});
await nextTick();
- expect(vm.find(GlIcon).exists()).toBe(true);
- expect(vm.find(GlIcon).props('name')).toBe('lock');
+ expect(vm.findComponent(GlIcon).exists()).toBe(true);
+ expect(vm.findComponent(GlIcon).props('name')).toBe('lock');
});
it('renders loading icon when path is loading', () => {
@@ -240,7 +240,7 @@ describe('Repository table row component', () => {
loadingPath: 'test',
});
- expect(vm.find(FileIcon).props('loading')).toBe(true);
+ expect(vm.findComponent(FileIcon).props('loading')).toBe(true);
});
describe('row visibility', () => {
diff --git a/spec/frontend/repository/components/tree_content_spec.js b/spec/frontend/repository/components/tree_content_spec.js
index 9d3a5394df8..352f4314232 100644
--- a/spec/frontend/repository/components/tree_content_spec.js
+++ b/spec/frontend/repository/components/tree_content_spec.js
@@ -38,7 +38,7 @@ function factory(path, data = () => ({})) {
}
describe('Repository table component', () => {
- const findFileTable = () => vm.find(FileTable);
+ const findFileTable = () => vm.findComponent(FileTable);
afterEach(() => {
vm.destroy();
@@ -53,7 +53,7 @@ describe('Repository table component', () => {
await nextTick();
- expect(vm.find(FilePreview).exists()).toBe(true);
+ expect(vm.findComponent(FilePreview).exists()).toBe(true);
});
it('trigger fetchFiles and resetRequestedCommits when mounted', async () => {
diff --git a/spec/frontend/repository/components/upload_blob_modal_spec.js b/spec/frontend/repository/components/upload_blob_modal_spec.js
index 505ff7f3dd6..30a24315338 100644
--- a/spec/frontend/repository/components/upload_blob_modal_spec.js
+++ b/spec/frontend/repository/components/upload_blob_modal_spec.js
@@ -47,12 +47,12 @@ describe('UploadBlobModal', () => {
});
};
- const findModal = () => wrapper.find(GlModal);
- const findAlert = () => wrapper.find(GlAlert);
- const findCommitMessage = () => wrapper.find(GlFormTextarea);
- const findBranchName = () => wrapper.find(GlFormInput);
- const findMrToggle = () => wrapper.find(GlToggle);
- const findUploadDropzone = () => wrapper.find(UploadDropzone);
+ const findModal = () => wrapper.findComponent(GlModal);
+ const findAlert = () => wrapper.findComponent(GlAlert);
+ const findCommitMessage = () => wrapper.findComponent(GlFormTextarea);
+ const findBranchName = () => wrapper.findComponent(GlFormInput);
+ const findMrToggle = () => wrapper.findComponent(GlToggle);
+ const findUploadDropzone = () => wrapper.findComponent(UploadDropzone);
const actionButtonDisabledState = () => findModal().props('actionPrimary').attributes[0].disabled;
const cancelButtonDisabledState = () => findModal().props('actionCancel').attributes[0].disabled;
const actionButtonLoadingState = () => findModal().props('actionPrimary').attributes[0].loading;
diff --git a/spec/frontend/repository/pages/blob_spec.js b/spec/frontend/repository/pages/blob_spec.js
index 41ab4d616b8..4fe6188370e 100644
--- a/spec/frontend/repository/pages/blob_spec.js
+++ b/spec/frontend/repository/pages/blob_spec.js
@@ -7,7 +7,7 @@ jest.mock('~/repository/utils/dom');
describe('Repository blob page component', () => {
let wrapper;
- const findBlobContentViewer = () => wrapper.find(BlobContentViewer);
+ const findBlobContentViewer = () => wrapper.findComponent(BlobContentViewer);
const path = 'file.js';
beforeEach(() => {
diff --git a/spec/frontend/repository/pages/index_spec.js b/spec/frontend/repository/pages/index_spec.js
index c0afb7931b1..559257d414c 100644
--- a/spec/frontend/repository/pages/index_spec.js
+++ b/spec/frontend/repository/pages/index_spec.js
@@ -34,7 +34,7 @@ describe('Repository index page component', () => {
it('renders TreePage', () => {
factory();
- const child = wrapper.find(TreePage);
+ const child = wrapper.findComponent(TreePage);
expect(child.exists()).toBe(true);
expect(child.props()).toEqual({ path: '/' });