Commit 2a9294e7 authored by Jacques Erasmus's avatar Jacques Erasmus

Merge branch...

Merge branch '342269-app-assets-javascripts-jobs-components-trigger_block-vue-consider-using-gltablelite' into 'master'

Update jobs/components/trigger_block.vue to use GlTableLite

See merge request gitlab-org/gitlab!84380
parents d74bef76 3378baf0
<script>
import { GlButton, GlTable } from '@gitlab/ui';
import { GlButton, GlTableLite } from '@gitlab/ui';
import { __ } from '~/locale';
const DEFAULT_TD_CLASSES = 'gl-w-half gl-font-sm! gl-border-gray-200!';
......@@ -25,7 +25,7 @@ export default {
],
components: {
GlButton,
GlTable,
GlTableLite,
},
props: {
trigger: {
......@@ -84,7 +84,7 @@ export default {
>
</p>
<gl-table :items="trigger.variables" :fields="$options.fields" small bordered fixed>
<gl-table-lite :items="trigger.variables" :fields="$options.fields" small bordered fixed>
<template #cell(key)="{ item }">
<span class="gl-overflow-break-word">{{ item.key }}</span>
</template>
......@@ -92,7 +92,7 @@ export default {
<template #cell(value)="data">
<span class="gl-overflow-break-word">{{ getDisplayValue(data.value) }}</span>
</template>
</gl-table>
</gl-table-lite>
</template>
</div>
</template>
import { GlButton, GlTable } from '@gitlab/ui';
import { GlButton, GlTableLite } from '@gitlab/ui';
import { mount } from '@vue/test-utils';
import TriggerBlock from '~/jobs/components/trigger_block.vue';
describe('Trigger block', () => {
let wrapper;
const findRevealButton = () => wrapper.find(GlButton);
const findVariableTable = () => wrapper.find(GlTable);
const findRevealButton = () => wrapper.findComponent(GlButton);
const findVariableTable = () => wrapper.findComponent(GlTableLite);
const findShortToken = () => wrapper.find('[data-testid="trigger-short-token"]');
const findVariableValue = (index) =>
wrapper.findAll('[data-testid="trigger-build-value"]').at(index);
......@@ -22,7 +22,6 @@ describe('Trigger block', () => {
afterEach(() => {
wrapper.destroy();
wrapper = null;
});
describe('with short token and no variables', () => {
......
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