Commit 821efd72 authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch '216492-fix-two-spinners' into 'master'

Remove the manual loading icon

See merge request gitlab-org/gitlab!31075
parents 574191a4 6852373e
<script> <script>
import { GlPopover, GlIcon, GlLink, GlButton, GlTooltipDirective, GlLoadingIcon } from '@gitlab/ui'; import { GlPopover, GlIcon, GlLink, GlButton, GlTooltipDirective } from '@gitlab/ui';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import createFlash from '~/flash'; import createFlash from '~/flash';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
...@@ -14,7 +14,6 @@ export default { ...@@ -14,7 +14,6 @@ export default {
GlButton, GlButton,
GlPopover, GlPopover,
GlLink, GlLink,
GlLoadingIcon,
}, },
directives: { directives: {
GlTooltip: GlTooltipDirective, GlTooltip: GlTooltipDirective,
...@@ -77,7 +76,6 @@ export default { ...@@ -77,7 +76,6 @@ export default {
name="export" name="export"
class="mr-0 position-top-0" class="mr-0 position-top-0"
/> />
<gl-loading-icon v-else />
<gl-popover <gl-popover
ref="popover" ref="popover"
:target="() => $refs.csvExportButton.$el" :target="() => $refs.csvExportButton.$el"
......
...@@ -25,7 +25,6 @@ describe('Csv Button Export', () => { ...@@ -25,7 +25,6 @@ describe('Csv Button Export', () => {
const findPopoverButton = () => wrapper.find({ ref: 'popoverButton' }); const findPopoverButton = () => wrapper.find({ ref: 'popoverButton' });
const findPopover = () => wrapper.find({ ref: 'popover' }); const findPopover = () => wrapper.find({ ref: 'popover' });
const findCsvExportButton = () => wrapper.find({ ref: 'csvExportButton' }); const findCsvExportButton = () => wrapper.find({ ref: 'csvExportButton' });
const findLoadingIcon = () => wrapper.find(GlLoadingIcon);
const findExportIcon = () => wrapper.find({ ref: 'exportIcon' }); const findExportIcon = () => wrapper.find({ ref: 'exportIcon' });
const createComponent = () => { const createComponent = () => {
...@@ -103,7 +102,7 @@ describe('Csv Button Export', () => { ...@@ -103,7 +102,7 @@ describe('Csv Button Export', () => {
it('displays the export icon when not loading and the loading icon when loading', () => { it('displays the export icon when not loading and the loading icon when loading', () => {
expect(findExportIcon().props('name')).toBe('export'); expect(findExportIcon().props('name')).toBe('export');
expect(findLoadingIcon().exists()).toBe(false); expect(findCsvExportButton().props('loading')).toBe(false);
wrapper.setData({ wrapper.setData({
isPreparingCsvExport: true, isPreparingCsvExport: true,
...@@ -111,7 +110,7 @@ describe('Csv Button Export', () => { ...@@ -111,7 +110,7 @@ describe('Csv Button Export', () => {
return wrapper.vm.$nextTick(() => { return wrapper.vm.$nextTick(() => {
expect(findExportIcon().exists()).toBe(false); expect(findExportIcon().exists()).toBe(false);
expect(findLoadingIcon().exists()).toBe(true); expect(findCsvExportButton().props('loading')).toBe(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