Commit b5fa12d7 authored by Tom Quirk's avatar Tom Quirk

Rename design item isLoading prop

Rename isLoading => isUploading
parent f3d1915e
......@@ -37,10 +37,10 @@ export default {
required: false,
default: null,
},
isLoading: {
isUploading: {
type: Boolean,
required: false,
default: false,
default: true,
},
},
data() {
......
......@@ -269,7 +269,7 @@ export default {
</li>
<li v-for="design in designs" :key="design.id" class="col-md-6 col-lg-4 mb-3">
<design-dropzone @change="onExistingDesignDropzoneChange($event, design.filename)"
><design v-bind="design" :is-loading="isDesignToBeSaved(design.filename)"
><design v-bind="design" :is-uploading="isDesignToBeSaved(design.filename)"
/></design-dropzone>
<input
......
......@@ -263,7 +263,7 @@ exports[`Design management list item component with no notes renders item with n
</router-link-stub>
`;
exports[`Design management list item component with no notes renders loading spinner when isLoading is true 1`] = `
exports[`Design management list item component with no notes renders loading spinner when isUploading is true 1`] = `
<router-link-stub
class="card cursor-pointer text-plain js-design-list-item design-list-item"
to="[object Object]"
......
......@@ -19,7 +19,7 @@ describe('Design management list item component', () => {
function createComponent({
notesCount = 0,
event = DESIGN_VERSION_EVENT.NO_CHANGE,
isLoading = false,
isUploading = false,
imageLoading = false,
} = {}) {
wrapper = shallowMount(Item, {
......@@ -29,7 +29,7 @@ describe('Design management list item component', () => {
id: 1,
filename: 'test',
image: 'http://via.placeholder.com/300',
isLoading,
isUploading,
event,
notesCount,
updatedAt: '01-01-2019',
......@@ -86,8 +86,8 @@ describe('Design management list item component', () => {
expect(wrapper.element).toMatchSnapshot();
});
it('renders loading spinner when isLoading is true', () => {
createComponent({ isLoading: true });
it('renders loading spinner when isUploading is true', () => {
createComponent({ isUploading: true });
expect(wrapper.element).toMatchSnapshot();
});
......
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