Commit 17b2450f authored by Natalia Tepluhina's avatar Natalia Tepluhina Committed by Phil Hughes

Resolve "Hide "Delete selected" in designs when viewing an old version"

parent 997a786e
---
title: Resolve Hide Delete selected in designs when viewing an old version
merge_request: 19889
author:
type: fixed
......@@ -267,6 +267,7 @@ export default {
@done="onDesignDelete"
>
<delete-button
v-if="isLatestVersion"
:is-deleting="loading"
button-class="btn-danger btn-inverted mr-2"
:has-selected-designs="hasSelectedDesigns"
......
......@@ -233,7 +233,7 @@ describe('Design management index page', () => {
createFlash.mockReset();
});
it('doesn not warn when the max files are uploaded', () => {
it('does not warn when the max files are uploaded', () => {
createComponent();
wrapper.vm.onUploadDesign(new Array(MAXIMUM_FILE_UPLOAD_LIMIT).fill(mockDesigns[0]));
......@@ -260,6 +260,10 @@ describe('Design management index page', () => {
expect(findDesignCheckboxes().length).toBe(mockDesigns.length);
});
it('renders Delete selected button', () => {
expect(findDeleteButton().exists()).toBe(true);
});
it('renders a button with Select all text', () => {
expect(findSelectAllButton().exists()).toBe(true);
expect(findSelectAllButton().text()).toBe('Select all');
......@@ -325,6 +329,10 @@ describe('Design management index page', () => {
expect(findDesignCheckboxes().length).toBe(0);
});
it('does not render Delete selected button', () => {
expect(findDeleteButton().exists()).toBe(false);
});
it('does not render Select All button', () => {
expect(findSelectAllButton().exists()).toBe(false);
});
......
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