Commit 7745bf3a authored by Illya Klymov's avatar Illya Klymov

Merge branch '217987-make-all-of-the-project-selector-vue-component-s-props-required' into 'master'

Make all of the project selector vue component's props required

See merge request gitlab-org/gitlab!33746
parents 8bbccfad c63d6532
......@@ -24,28 +24,23 @@ export default {
},
showNoResultsMessage: {
type: Boolean,
required: false,
default: false,
required: true,
},
showMinimumSearchQueryMessage: {
type: Boolean,
required: false,
default: false,
required: true,
},
showLoadingIndicator: {
type: Boolean,
required: false,
default: false,
required: true,
},
showSearchErrorMessage: {
type: Boolean,
required: false,
default: false,
required: true,
},
totalResults: {
type: Number,
required: false,
default: 0,
required: true,
},
},
data() {
......
import Vuex from 'vuex';
import { shallowMount, createLocalVue } from '@vue/test-utils';
import { merge } from 'lodash';
import createDefaultState from 'ee/security_dashboard/store/modules/project_selector/state';
......@@ -42,8 +43,7 @@ describe('Project Manager component', () => {
isUpdatingProjects: jest.fn().mockReturnValue(isUpdatingProjects),
},
state: {
...createDefaultState(),
...state,
...merge(createDefaultState(), state),
},
},
},
......@@ -155,11 +155,11 @@ describe('Project Manager component', () => {
});
it('passes the list of projects to the project-list component', () => {
const projects = [{}];
const projects = [{ foo: true }];
factory({ state: { projects } });
expect(getProjectList().props('projects')).toBe(projects);
expect(getProjectList().props('projects')).toEqual(projects);
});
it.each([false, true])(
......
......@@ -29,6 +29,7 @@ describe('ProjectSelector component', () => {
showMinimumSearchQueryMessage: false,
showLoadingIndicator: false,
showSearchErrorMessage: false,
totalResults: searchResults.length,
},
attachToDocument: true,
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment