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>2024-01-22 12:08:28 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2024-01-22 12:08:28 +0300
commit56865fdf95db03cc0ccd01a88d9457ba0a050153 (patch)
treecfa861e4b33f65c4fff2486b04abfe1127ee80f4 /spec/frontend/vue_shared/components
parent65d7736ff13e1f5c393f6723b7da0d1b2ddb94f5 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/vue_shared/components')
-rw-r--r--spec/frontend/vue_shared/components/registry/registry_search_spec.js13
1 files changed, 6 insertions, 7 deletions
diff --git a/spec/frontend/vue_shared/components/registry/registry_search_spec.js b/spec/frontend/vue_shared/components/registry/registry_search_spec.js
index f86406d05cb..fc18dc6e5e4 100644
--- a/spec/frontend/vue_shared/components/registry/registry_search_spec.js
+++ b/spec/frontend/vue_shared/components/registry/registry_search_spec.js
@@ -1,4 +1,4 @@
-import { GlSorting, GlSortingItem, GlFilteredSearch } from '@gitlab/ui';
+import { GlSorting, GlFilteredSearch } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils';
import { FILTERED_SEARCH_TERM } from '~/vue_shared/components/filtered_search_bar/constants';
import component from '~/vue_shared/components/registry/registry_search.vue';
@@ -7,7 +7,6 @@ describe('Registry Search', () => {
let wrapper;
const findPackageListSorting = () => wrapper.findComponent(GlSorting);
- const findSortingItems = () => wrapper.findAllComponents(GlSortingItem);
const findFilteredSearch = () => wrapper.findComponent(GlFilteredSearch);
const defaultProps = {
@@ -32,9 +31,6 @@ describe('Registry Search', () => {
const mountComponent = (propsData = defaultProps) => {
wrapper = shallowMount(component, {
propsData,
- stubs: {
- GlSortingItem,
- },
});
};
@@ -92,7 +88,10 @@ describe('Registry Search', () => {
it('has all the sortable items', () => {
mountComponent();
- expect(findSortingItems()).toHaveLength(defaultProps.sortableFields.length);
+ expect(findPackageListSorting().props().sortOptions).toMatchObject([
+ { text: 'name', value: 'name' },
+ { text: 'baz', value: 'bar' },
+ ]);
});
it('on sort change emits sorting:changed event', () => {
@@ -108,7 +107,7 @@ describe('Registry Search', () => {
it('on sort item click emits sorting:changed event', () => {
mountComponent();
- findSortingItems().at(1).vm.$emit('click');
+ findPackageListSorting().vm.$emit('sortByChange', 'bar');
expect(wrapper.emitted('sorting:changed')).toEqual([
[{ orderBy: defaultProps.sortableFields[1].orderBy }],