Skip to content

Commit

Permalink
Mobile Stories block - unit tests for BlockMediaUpdateProgress (#26423)
Browse files Browse the repository at this point in the history
* adding upload progress tests on BLockMediaUpdateProgress component (mediaFiles collection)

* added save event tests for BlockMediaUpdateProgress component

* ids in mediaFiles array are always strings, fixed that

* updated function name passed by props

* fixed mediaFiles const passing for saving, using tempMediaFiles

* fixed state change for saveReset signal, was changing upload state instead

* fixed typo

* fixed using save state var

* changed to more descriptive test names

* removed commented line

* renamed vars to match bridge signal name
  • Loading branch information
mzorz authored Oct 28, 2020
1 parent 26165d1 commit 0d847d7
Show file tree
Hide file tree
Showing 2 changed files with 501 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export class BlockMediaUpdateProgress extends React.Component {
}

mediaSaveStateReset( payload ) {
this.setState( { isUploadInProgress: false, isUploadFailed: false } );
this.setState( { isSaveInProgress: false, isSaveFailed: false } );
if ( this.props.onMediaSaveStateReset ) {
this.props.onMediaSaveStateReset( payload );
}
Expand Down
Loading

0 comments on commit 0d847d7

Please sign in to comment.