Commit 9841f1c5 authored by Brandon Labuschagne's avatar Brandon Labuschagne

Merge branch 'jnnkl-gl-table-lite-mr-analytics' into 'master'

Replace GlTable with GlTablelite for Merge Request throughput table

See merge request gitlab-org/gitlab!75359
parents 287fcdb1 5f92b84f
<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