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