Commit 332815d6 authored by Paul Slaughter's avatar Paul Slaughter

fixup! Add/remove snippet files in the edit view

parent 6e7b56e2
......@@ -15,7 +15,7 @@ export default {
canDelete: {
type: Boolean,
required: false,
default: false,
default: true,
},
showDelete: {
type: Boolean,
......
......@@ -14,8 +14,6 @@ export default {
},
mixins: [glFeatureFlagsMixin()],
props: {
// TODO: Build reactivity for initBlobs.
// What happens if this changes (i.e. blobs are being loaded through pages)?
initBlobs: {
type: Array,
required: true,
......
......@@ -57,8 +57,8 @@ describe('Blob Header Editing', () => {
describe.each`
props | expectedDisabled
${{ showDelete: true }} | ${true}
${{ showDelete: true, canDelete: true }} | ${false}
${{ showDelete: true }} | ${false}
${{ showDelete: true, canDelete: false }} | ${true}
`('with $props', ({ props, expectedDisabled }) => {
beforeEach(() => {
createComponent(props);
......
......@@ -217,7 +217,7 @@ describe('snippets/components/snippet_blob_actions_edit', () => {
describe('with 1 blob', () => {
beforeEach(() => {
createComponent({ initBlobs: [createBlobFromTestEntry(testEntries.created)], isReady: true });
createComponent({ initBlobs: [createBlobFromTestEntry(testEntries.created)] });
});
it('disables delete button', () => {
......@@ -253,7 +253,7 @@ describe('snippets/components/snippet_blob_actions_edit', () => {
describe('with 0 init blob', () => {
beforeEach(() => {
createComponent({ initBlobs: [], isReady: true });
createComponent({ initBlobs: [] });
});
it('shows 1 blob by default', () => {
......@@ -287,7 +287,7 @@ describe('snippets/components/snippet_blob_actions_edit', () => {
.fill(1)
.map(() => createBlobFromTestEntry(testEntries.created));
createComponent({ initBlobs, isReady: true });
createComponent({ initBlobs });
});
it('should have blobs', () => {
......
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