Commit 62718974 authored by Phil Hughes's avatar Phil Hughes

Merge branch '13426-bugfix-copyState-and-padding' into 'master'

Update copyState to reflect new enum values

See merge request gitlab-org/gitlab!43749
parents c3f652c8 8871675c
...@@ -113,9 +113,7 @@ export default { ...@@ -113,9 +113,7 @@ export default {
return !this.isSaving && !this.hasDesigns; return !this.isSaving && !this.hasDesigns;
}, },
isDesignCollectionCopying() { isDesignCollectionCopying() {
return ( return this.designCollection && this.designCollection.copyState === 'IN_PROGRESS';
this.designCollection && ['PENDING', 'COPYING'].includes(this.designCollection.copyState)
);
}, },
designDropzoneWrapperClass() { designDropzoneWrapperClass() {
return this.isDesignListEmpty return this.isDesignListEmpty
...@@ -370,11 +368,11 @@ export default { ...@@ -370,11 +368,11 @@ export default {
</gl-alert> </gl-alert>
<header <header
v-else-if="isDesignCollectionCopying" v-else-if="isDesignCollectionCopying"
class="card gl-p-3" class="card"
data-testid="design-collection-is-copying" data-testid="design-collection-is-copying"
> >
<div class="card-header design-card-header border-bottom-0"> <div class="card-header design-card-header border-bottom-0">
<div class="card-title gl-my-0 gl-h-7"> <div class="card-title gl-display-flex gl-align-items-center gl-my-0 gl-h-7">
{{ {{
s__( s__(
'DesignManagement|Your designs are being copied and are on their way… Please refresh to update.', 'DesignManagement|Your designs are being copied and are on their way… Please refresh to update.',
......
---
title: Fix displaying a message when design copying is in progress
merge_request: 43749
author:
type: fixed
...@@ -264,10 +264,10 @@ describe('Design management index page', () => { ...@@ -264,10 +264,10 @@ describe('Design management index page', () => {
describe('handling design collection copy state', () => { describe('handling design collection copy state', () => {
it.each` it.each`
copyState | isRendered | description copyState | isRendered | description
${'COPYING'} | ${true} | ${'renders'} ${'IN_PROGRESS'} | ${true} | ${'renders'}
${'READY'} | ${false} | ${'does not render'} ${'READY'} | ${false} | ${'does not render'}
${'ERROR'} | ${false} | ${'does not render'} ${'ERROR'} | ${false} | ${'does not render'}
`( `(
'$description the copying message if design collection copyState is $copyState', '$description the copying message if design collection copyState is $copyState',
({ copyState, isRendered }) => { ({ copyState, isRendered }) => {
......
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