Commit c00ff2b4 authored by Paul Slaughter's avatar Paul Slaughter

Merge branch...

Merge branch '342268-app-assets-javascripts-jira_import-components-jira_import_form-vue-consider-using-gltablelite' into 'master'

Update jira_import_form.vue to use GlTableLite

See merge request gitlab-org/gitlab!84384
parents c53a8610 ac9545f5
...@@ -12,7 +12,7 @@ import { ...@@ -12,7 +12,7 @@ import {
GlLoadingIcon, GlLoadingIcon,
GlSearchBoxByType, GlSearchBoxByType,
GlSprintf, GlSprintf,
GlTable, GlTableLite,
} from '@gitlab/ui'; } from '@gitlab/ui';
import { debounce } from 'lodash'; import { debounce } from 'lodash';
import { getIdFromGraphQLId } from '~/graphql_shared/utils'; import { getIdFromGraphQLId } from '~/graphql_shared/utils';
...@@ -45,7 +45,7 @@ export default { ...@@ -45,7 +45,7 @@ export default {
GlLoadingIcon, GlLoadingIcon,
GlSearchBoxByType, GlSearchBoxByType,
GlSprintf, GlSprintf,
GlTable, GlTableLite,
}, },
currentUsername: gon.current_username, currentUsername: gon.current_username,
dropdownLabel, dropdownLabel,
...@@ -295,7 +295,7 @@ export default { ...@@ -295,7 +295,7 @@ export default {
<p>{{ $options.userMappingMessage }}</p> <p>{{ $options.userMappingMessage }}</p>
<gl-table :fields="$options.tableConfig" :items="userMappings" fixed> <gl-table-lite :fields="$options.tableConfig" :items="userMappings" fixed>
<template #cell(arrow)> <template #cell(arrow)>
<gl-icon name="arrow-right" :aria-label="__('Will be mapped to')" /> <gl-icon name="arrow-right" :aria-label="__('Will be mapped to')" />
</template> </template>
...@@ -326,9 +326,9 @@ export default { ...@@ -326,9 +326,9 @@ export default {
</gl-dropdown-text> </gl-dropdown-text>
</gl-dropdown> </gl-dropdown>
</template> </template>
</gl-table> </gl-table-lite>
<gl-loading-icon v-if="isInitialLoadingState" size="sm" /> <gl-loading-icon v-if="isInitialLoadingState" size="md" />
<gl-button <gl-button
v-if="hasMoreUsers" v-if="hasMoreUsers"
...@@ -343,7 +343,7 @@ export default { ...@@ -343,7 +343,7 @@ export default {
<gl-button <gl-button
type="submit" type="submit"
category="primary" category="primary"
variant="success" variant="confirm"
class="js-no-auto-disable" class="js-no-auto-disable"
:loading="isSubmitting" :loading="isSubmitting"
data-qa-selector="jira_issues_import_button" data-qa-selector="jira_issues_import_button"
......
...@@ -20,6 +20,7 @@ export default function mountJiraImportApp() { ...@@ -20,6 +20,7 @@ export default function mountJiraImportApp() {
return new Vue({ return new Vue({
el, el,
name: 'JiraImportRoot',
apolloProvider, apolloProvider,
render(createComponent) { render(createComponent) {
return createComponent(App, { return createComponent(App, {
......
...@@ -6,7 +6,7 @@ import { ...@@ -6,7 +6,7 @@ import {
GlFormSelect, GlFormSelect,
GlLabel, GlLabel,
GlSearchBoxByType, GlSearchBoxByType,
GlTable, GlTableLite,
} from '@gitlab/ui'; } from '@gitlab/ui';
import { getByRole } from '@testing-library/dom'; import { getByRole } from '@testing-library/dom';
import { mount, shallowMount } from '@vue/test-utils'; import { mount, shallowMount } from '@vue/test-utils';
...@@ -34,19 +34,19 @@ describe('JiraImportForm', () => { ...@@ -34,19 +34,19 @@ describe('JiraImportForm', () => {
const currentUsername = 'mrgitlab'; const currentUsername = 'mrgitlab';
const getAlert = () => wrapper.find(GlAlert); const getAlert = () => wrapper.findComponent(GlAlert);
const getSelectDropdown = () => wrapper.find(GlFormSelect); const getSelectDropdown = () => wrapper.findComponent(GlFormSelect);
const getContinueButton = () => wrapper.find(GlButton); const getContinueButton = () => wrapper.findComponent(GlButton);
const getCancelButton = () => wrapper.findAll(GlButton).at(1); const getCancelButton = () => wrapper.findAllComponents(GlButton).at(1);
const getLabel = () => wrapper.find(GlLabel); const getLabel = () => wrapper.findComponent(GlLabel);
const getTable = () => wrapper.find(GlTable); const getTable = () => wrapper.findComponent(GlTableLite);
const getUserDropdown = () => getTable().find(GlDropdown); const getUserDropdown = () => getTable().findComponent(GlDropdown);
const getHeader = (name) => getByRole(wrapper.element, 'columnheader', { name }); const getHeader = (name) => getByRole(wrapper.element, 'columnheader', { name });
...@@ -107,14 +107,13 @@ describe('JiraImportForm', () => { ...@@ -107,14 +107,13 @@ describe('JiraImportForm', () => {
mutateSpy.mockRestore(); mutateSpy.mockRestore();
querySpy.mockRestore(); querySpy.mockRestore();
wrapper.destroy(); wrapper.destroy();
wrapper = null;
}); });
describe('select dropdown project selection', () => { describe('select dropdown project selection', () => {
it('is shown', () => { it('is shown', () => {
wrapper = mountComponent(); wrapper = mountComponent();
expect(wrapper.find(GlFormSelect).exists()).toBe(true); expect(getSelectDropdown().exists()).toBe(true);
}); });
it('contains a list of Jira projects to select from', () => { it('contains a list of Jira projects to select from', () => {
...@@ -273,7 +272,7 @@ describe('JiraImportForm', () => { ...@@ -273,7 +272,7 @@ describe('JiraImportForm', () => {
wrapper = mountComponent({ mountFunction: mount }); wrapper = mountComponent({ mountFunction: mount });
wrapper.find(GlSearchBoxByType).vm.$emit('input', 'fred'); wrapper.findComponent(GlSearchBoxByType).vm.$emit('input', 'fred');
}); });
it('makes a GraphQL call', () => { it('makes a GraphQL call', () => {
......
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