Commit 5f92b84f authored by Jannik Lehmann's avatar Jannik Lehmann Committed by Brandon Labuschagne

Replace GlTable with GlTablelite for Merge Request throughput table

parent 2559a9d1
<script> <script>
import { import {
GlTable, GlTableLite,
GlLink, GlLink,
GlAvatarLink, GlAvatarLink,
GlAvatar, GlAvatar,
...@@ -42,7 +42,7 @@ const initialPaginationState = { ...@@ -42,7 +42,7 @@ const initialPaginationState = {
export default { export default {
name: 'ThroughputTable', name: 'ThroughputTable',
components: { components: {
GlTable, GlTableLite,
GlLink, GlLink,
GlAvatarLink, GlAvatarLink,
GlAvatar, GlAvatar,
...@@ -264,7 +264,7 @@ export default { ...@@ -264,7 +264,7 @@ export default {
<template> <template>
<gl-loading-icon v-if="tableDataLoading" size="md" /> <gl-loading-icon v-if="tableDataLoading" size="md" />
<div v-else-if="tableDataAvailable"> <div v-else-if="tableDataAvailable">
<gl-table <gl-table-lite
:fields="$options.tableHeaderFields" :fields="$options.tableHeaderFields"
:items="throughputTableData.list" :items="throughputTableData.list"
stacked="sm" stacked="sm"
...@@ -376,7 +376,7 @@ export default { ...@@ -376,7 +376,7 @@ export default {
</gl-avatars-inline> </gl-avatars-inline>
</div> </div>
</template> </template>
</gl-table> </gl-table-lite>
<gl-pagination <gl-pagination
v-if="showPaginationControls" v-if="showPaginationControls"
:value="pagination.currentPage" :value="pagination.currentPage"
......
import { GlAlert, GlLoadingIcon, GlTable, GlIcon, GlAvatarsInline, GlPagination } from '@gitlab/ui'; import {
GlAlert,
GlLoadingIcon,
GlTableLite,
GlIcon,
GlAvatarsInline,
GlPagination,
} from '@gitlab/ui';
import { mount, shallowMount, createLocalVue } from '@vue/test-utils'; import { mount, shallowMount, createLocalVue } from '@vue/test-utils';
import Vuex from 'vuex'; import Vuex from 'vuex';
import ThroughputTable from 'ee/analytics/merge_request_analytics/components/throughput_table.vue'; import ThroughputTable from 'ee/analytics/merge_request_analytics/components/throughput_table.vue';
...@@ -66,7 +73,7 @@ describe('ThroughputTable', () => { ...@@ -66,7 +73,7 @@ describe('ThroughputTable', () => {
}); });
}; };
const findTable = () => wrapper.find(GlTable); const findTable = () => wrapper.find(GlTableLite);
const findCol = (testId) => findTable().find(`[data-testid="${testId}"]`); const findCol = (testId) => findTable().find(`[data-testid="${testId}"]`);
...@@ -104,7 +111,7 @@ describe('ThroughputTable', () => { ...@@ -104,7 +111,7 @@ describe('ThroughputTable', () => {
}); });
it('does not display the table', () => { it('does not display the table', () => {
displaysComponent(GlTable, false); displaysComponent(GlTableLite, false);
}); });
it('does not display the pagination', () => { it('does not display the pagination', () => {
...@@ -130,7 +137,7 @@ describe('ThroughputTable', () => { ...@@ -130,7 +137,7 @@ describe('ThroughputTable', () => {
}); });
it('does not display the table', () => { it('does not display the table', () => {
displaysComponent(GlTable, false); displaysComponent(GlTableLite, false);
}); });
it('does not display the no data message', () => { it('does not display the no data message', () => {
...@@ -150,7 +157,7 @@ describe('ThroughputTable', () => { ...@@ -150,7 +157,7 @@ describe('ThroughputTable', () => {
}); });
it('displays the table', () => { it('displays the table', () => {
displaysComponent(GlTable, true); displaysComponent(GlTableLite, true);
}); });
it('does not display a loading icon', () => { it('does not display a loading icon', () => {
...@@ -429,7 +436,7 @@ describe('ThroughputTable', () => { ...@@ -429,7 +436,7 @@ describe('ThroughputTable', () => {
}); });
it('does not display the table', () => { it('does not display the table', () => {
displaysComponent(GlTable, false); displaysComponent(GlTableLite, false);
}); });
it('does not display a loading icon', () => { it('does not display a loading icon', () => {
......
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