Commit 5c356b7a authored by Fernando's avatar Fernando

Rename corpus_upload_modal to corpus_upload form

* Rename component, update specs
parent a2667b22
<script> <script>
import { GlButton, GlModal, GlModalDirective } from '@gitlab/ui'; import { GlButton, GlModal, GlModalDirective } from '@gitlab/ui';
import CorpusUploadModal from 'ee/security_configuration/corpus_management/components/corpus_upload_modal.vue'; import CorpusUploadForm from 'ee/security_configuration/corpus_management/components/corpus_upload_form.vue';
import { numberToHumanSize } from '~/lib/utils/number_utils'; import { numberToHumanSize } from '~/lib/utils/number_utils';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import addCorpusMutation from '../graphql/mutations/add_corpus.mutation.graphql'; import addCorpusMutation from '../graphql/mutations/add_corpus.mutation.graphql';
...@@ -11,7 +11,7 @@ export default { ...@@ -11,7 +11,7 @@ export default {
components: { components: {
GlButton, GlButton,
GlModal, GlModal,
CorpusUploadModal, CorpusUploadForm,
}, },
directives: { directives: {
GlModalDirective, GlModalDirective,
...@@ -107,7 +107,7 @@ export default { ...@@ -107,7 +107,7 @@ export default {
@primary="addCorpus" @primary="addCorpus"
@canceled="resetCorpus" @canceled="resetCorpus"
> >
<corpus-upload-modal /> <corpus-upload-form />
</gl-modal> </gl-modal>
</div> </div>
</template> </template>
...@@ -42,7 +42,7 @@ exports[`Corpus Upload component renders header 1`] = ` ...@@ -42,7 +42,7 @@ exports[`Corpus Upload component renders header 1`] = `
title="New corpus" title="New corpus"
titletag="h4" titletag="h4"
> >
<corpus-upload-modal-stub /> <corpus-upload-form-stub />
</gl-modal-stub> </gl-modal-stub>
</div> </div>
`; `;
import { createLocalVue, mount } from '@vue/test-utils'; import { createLocalVue, mount } from '@vue/test-utils';
import VueApollo from 'vue-apollo'; import VueApollo from 'vue-apollo';
import CorpusUploadModal from 'ee/security_configuration/corpus_management/components/corpus_upload_modal.vue'; import CorpusUploadForm from 'ee/security_configuration/corpus_management/components/corpus_upload_form.vue';
import createMockApollo from 'helpers/mock_apollo_helper'; import createMockApollo from 'helpers/mock_apollo_helper';
import waitForPromises from 'helpers/wait_for_promises'; import waitForPromises from 'helpers/wait_for_promises';
...@@ -51,7 +51,7 @@ describe('Corpus upload modal', () => { ...@@ -51,7 +51,7 @@ describe('Corpus upload modal', () => {
} }
const createComponent = (resolverMock, options = {}) => { const createComponent = (resolverMock, options = {}) => {
wrapper = mount(CorpusUploadModal, { wrapper = mount(CorpusUploadForm, {
localVue, localVue,
apolloProvider: createMockApolloProvider(resolverMock), apolloProvider: createMockApolloProvider(resolverMock),
provide: { provide: {
......
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