Commit c89209a1 authored by Illya Klymov's avatar Illya Klymov

Merge branch 'jnnkl-table-lite-merge-request-analytics' into 'master'

Replace GlTable with GlTableLite for merge-request-analytics-table

See merge request gitlab-org/gitlab!77185
parents 78c321f2 62643e3b
<script> <script>
import { GlTable, GlLink, GlIcon, GlAvatarLink, GlAvatar, GlTooltipDirective } from '@gitlab/ui';
import { escape } from 'lodash';
import { mapState } from 'vuex'; import { mapState } from 'vuex';
import { escape } from 'lodash';
import {
GlTableLite,
GlLink,
GlIcon,
GlAvatarLink,
GlAvatar,
GlTooltipDirective,
} from '@gitlab/ui';
import { getTimeago } from '~/lib/utils/datetime_utility'; import { getTimeago } from '~/lib/utils/datetime_utility';
import { __, sprintf, n__ } from '~/locale'; import { __, sprintf, n__ } from '~/locale';
import ApproversColumn from './approvers_column.vue'; import ApproversColumn from './approvers_column.vue';
...@@ -9,7 +16,7 @@ import ApproversColumn from './approvers_column.vue'; ...@@ -9,7 +16,7 @@ import ApproversColumn from './approvers_column.vue';
export default { export default {
name: 'MergeRequestTable', name: 'MergeRequestTable',
components: { components: {
GlTable, GlTableLite,
GlLink, GlLink,
GlIcon, GlIcon,
GlAvatarLink, GlAvatarLink,
...@@ -88,7 +95,7 @@ export default { ...@@ -88,7 +95,7 @@ export default {
</script> </script>
<template> <template>
<gl-table <gl-table-lite
class="my-3" class="my-3"
:fields="$options.tableHeaderFields" :fields="$options.tableHeaderFields"
:items="mergeRequests" :items="mergeRequests"
...@@ -140,5 +147,5 @@ export default { ...@@ -140,5 +147,5 @@ export default {
<span class="font-weight-bold cgreen"> +{{ items.item.diff_stats.additions }} </span> <span class="font-weight-bold cgreen"> +{{ items.item.diff_stats.additions }} </span>
<span class="font-weight-bold cred"> -{{ items.item.diff_stats.deletions }} </span> <span class="font-weight-bold cred"> -{{ items.item.diff_stats.deletions }} </span>
</template> </template>
</gl-table> </gl-table-lite>
</template> </template>
import { GlTable } from '@gitlab/ui'; import { GlTableLite } from '@gitlab/ui';
import { mount } from '@vue/test-utils'; import { mount } from '@vue/test-utils';
import Vue from 'vue'; import Vue from 'vue';
import Vuex from 'vuex'; import Vuex from 'vuex';
...@@ -39,7 +39,7 @@ describe('MergeRequestTable component', () => { ...@@ -39,7 +39,7 @@ describe('MergeRequestTable component', () => {
wrapper.destroy(); wrapper.destroy();
}); });
const findTable = () => wrapper.findComponent(GlTable); const findTable = () => wrapper.findComponent(GlTableLite);
const findTableRow = (index) => findTable().findAll('tbody tr').at(index); const findTableRow = (index) => findTable().findAll('tbody tr').at(index);
const findReviewTimeCol = (rowIndex) => findTableRow(rowIndex).findAll('td').at(1); const findReviewTimeCol = (rowIndex) => findTableRow(rowIndex).findAll('td').at(1);
......
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