Commit 763e98b6 authored by Miguel Rincon's avatar Miguel Rincon

Merge branch 'image-check-disable' into 'master'

Conditionally render Docker row checkbox

See merge request gitlab-org/gitlab!36000
parents d340b6b9 a3114b49
......@@ -64,7 +64,12 @@ export default {
<template>
<list-item v-bind="$attrs" :selected="selected">
<template #left-action>
<gl-form-checkbox class="gl-m-0" :checked="selected" @change="$emit('select')" />
<gl-form-checkbox
v-if="Boolean(tag.destroy_path)"
class="gl-m-0"
:checked="selected"
@change="$emit('select')"
/>
</template>
<template #left-primary>
<div class="gl-display-flex gl-align-items-center">
......
title: Conditionally render Docker row checkbox
merge_request: 36000
author: gfyoung
type: fixed
......@@ -54,6 +54,14 @@ describe('tags list row', () => {
expect(findCheckbox().exists()).toBe(true);
});
it("does not exist when the row can't be deleted", () => {
const customTag = { ...tag, destroy_path: '' };
mountComponent({ ...defaultProps, tag: customTag });
expect(findCheckbox().exists()).toBe(false);
});
it('is wired to the selected prop', () => {
mountComponent({ ...defaultProps, selected: true });
......
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