Commit 84c244c3 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'jnnkl-gl-table-lite-pipelines-table' into 'master'

Replace GlTable with GlTablelite for pipelines table

See merge request gitlab-org/gitlab!74381
parents 07ede393 e7994dda
<script> <script>
import { GlTable, GlTooltipDirective } from '@gitlab/ui'; import { GlTableLite, GlTooltipDirective } from '@gitlab/ui';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import eventHub from '../../event_hub'; import eventHub from '../../event_hub';
import PipelineMiniGraph from './pipeline_mini_graph.vue'; import PipelineMiniGraph from './pipeline_mini_graph.vue';
...@@ -18,7 +18,7 @@ const DEFAULT_TH_CLASSES = ...@@ -18,7 +18,7 @@ const DEFAULT_TH_CLASSES =
export default { export default {
components: { components: {
GlTable, GlTableLite,
LinkedPipelinesMiniList: () => LinkedPipelinesMiniList: () =>
import('ee_component/vue_shared/components/linked_pipelines_mini_list.vue'), import('ee_component/vue_shared/components/linked_pipelines_mini_list.vue'),
PipelinesCommit, PipelinesCommit,
...@@ -156,7 +156,7 @@ export default { ...@@ -156,7 +156,7 @@ export default {
</script> </script>
<template> <template>
<div class="ci-table"> <div class="ci-table">
<gl-table <gl-table-lite
:fields="tableFields" :fields="tableFields"
:items="pipelines" :items="pipelines"
tbody-tr-class="commit" tbody-tr-class="commit"
...@@ -225,7 +225,7 @@ export default { ...@@ -225,7 +225,7 @@ export default {
<template #cell(actions)="{ item }"> <template #cell(actions)="{ item }">
<pipeline-operations :pipeline="item" :canceling-pipeline="cancelingPipeline" /> <pipeline-operations :pipeline="item" :canceling-pipeline="cancelingPipeline" />
</template> </template>
</gl-table> </gl-table-lite>
<pipeline-stop-modal :pipeline="pipeline" @submit="onSubmit" /> <pipeline-stop-modal :pipeline="pipeline" @submit="onSubmit" />
</div> </div>
......
import { GlEmptyState, GlLoadingIcon, GlModal, GlTable } from '@gitlab/ui'; import { GlEmptyState, GlLoadingIcon, GlModal, GlTableLite } from '@gitlab/ui';
import { mount } from '@vue/test-utils'; import { mount } from '@vue/test-utils';
import MockAdapter from 'axios-mock-adapter'; import MockAdapter from 'axios-mock-adapter';
import fixture from 'test_fixtures/pipelines/pipelines.json'; import fixture from 'test_fixtures/pipelines/pipelines.json';
...@@ -22,7 +22,7 @@ describe('Pipelines table in Commits and Merge requests', () => { ...@@ -22,7 +22,7 @@ describe('Pipelines table in Commits and Merge requests', () => {
const findRunPipelineBtnMobile = () => wrapper.findByTestId('run_pipeline_button_mobile'); const findRunPipelineBtnMobile = () => wrapper.findByTestId('run_pipeline_button_mobile');
const findLoadingState = () => wrapper.findComponent(GlLoadingIcon); const findLoadingState = () => wrapper.findComponent(GlLoadingIcon);
const findEmptyState = () => wrapper.findComponent(GlEmptyState); const findEmptyState = () => wrapper.findComponent(GlEmptyState);
const findTable = () => wrapper.findComponent(GlTable); const findTable = () => wrapper.findComponent(GlTableLite);
const findTableRows = () => wrapper.findAllByTestId('pipeline-table-row'); const findTableRows = () => wrapper.findAllByTestId('pipeline-table-row');
const findModal = () => wrapper.findComponent(GlModal); const findModal = () => wrapper.findComponent(GlModal);
......
import '~/commons'; import '~/commons';
import { GlTable } from '@gitlab/ui'; import { GlTableLite } from '@gitlab/ui';
import { mount } from '@vue/test-utils'; import { mount } from '@vue/test-utils';
import fixture from 'test_fixtures/pipelines/pipelines.json'; import fixture from 'test_fixtures/pipelines/pipelines.json';
import { extendedWrapper } from 'helpers/vue_test_utils_helper'; import { extendedWrapper } from 'helpers/vue_test_utils_helper';
...@@ -44,7 +44,7 @@ describe('Pipelines Table', () => { ...@@ -44,7 +44,7 @@ describe('Pipelines Table', () => {
); );
}; };
const findGlTable = () => wrapper.findComponent(GlTable); const findGlTableLite = () => wrapper.findComponent(GlTableLite);
const findStatusBadge = () => wrapper.findComponent(CiBadge); const findStatusBadge = () => wrapper.findComponent(CiBadge);
const findPipelineInfo = () => wrapper.findComponent(PipelineUrl); const findPipelineInfo = () => wrapper.findComponent(PipelineUrl);
const findTriggerer = () => wrapper.findComponent(PipelineTriggerer); const findTriggerer = () => wrapper.findComponent(PipelineTriggerer);
...@@ -77,7 +77,7 @@ describe('Pipelines Table', () => { ...@@ -77,7 +77,7 @@ describe('Pipelines Table', () => {
}); });
it('displays table', () => { it('displays table', () => {
expect(findGlTable().exists()).toBe(true); expect(findGlTableLite().exists()).toBe(true);
}); });
it('should render table head with correct columns', () => { it('should render table head with correct columns', () => {
......
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