Skip to content

Commit

Permalink
changed to more descriptive test names
Browse files Browse the repository at this point in the history
  • Loading branch information
mzorz committed Oct 26, 2020
1 parent 9dd50c7 commit 1f57e1d
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ describe( 'BlockMediaUpdateProgress component', () => {
expect( wrapper ).toBeTruthy();
} );

it( 'upload: listens media upload progress for local file', () => {
it( 'upload: onUpdateMediaUploadProgress is called when a progress update payload is received', () => {
const progress = 10;
const payload = {
state: MEDIA_UPLOAD_STATE_UPLOADING,
Expand Down Expand Up @@ -155,7 +155,7 @@ describe( 'BlockMediaUpdateProgress component', () => {
expect( onUpdateMediaUploadProgress ).toHaveBeenCalledTimes( 0 );
} );

it( 'upload: listens media upload success', () => {
it( 'upload: onFinishMediaUploadWithSuccess is called when a success payload is received', () => {
const progress = 10;
const payloadSuccess = {
state: MEDIA_UPLOAD_STATE_SUCCEEDED,
Expand Down Expand Up @@ -192,7 +192,7 @@ describe( 'BlockMediaUpdateProgress component', () => {
);
} );

it( 'upload: listens media upload fail', () => {
it( 'upload: onFinishMediaUploadWithFailure is called when a failed payload is received', () => {
const progress = 10;
const payloadFail = {
state: MEDIA_UPLOAD_STATE_FAILED,
Expand Down Expand Up @@ -230,7 +230,7 @@ describe( 'BlockMediaUpdateProgress component', () => {
);
} );

it( 'upload: listens media upload reset', () => {
it( 'upload: onMediaUploadStateReset is called when a reset payload is received', () => {
const progress = 10;
const payloadReset = {
state: MEDIA_UPLOAD_STATE_RESET,
Expand Down Expand Up @@ -265,7 +265,7 @@ describe( 'BlockMediaUpdateProgress component', () => {
} );

// SAVE tests
it( 'save does not get affected by unrelated media uploads', () => {
it( 'save does not get affected by unrelated media save events', () => {
const payload = {
state: MEDIA_SAVE_STATE_SAVING,
mediaId: 'tempid-432', // id not belonging to assigned mediaFiles collection in test
Expand All @@ -286,7 +286,7 @@ describe( 'BlockMediaUpdateProgress component', () => {
expect( onUpdateMediaSaveProgress ).toHaveBeenCalledTimes( 0 );
} );

it( 'save: listens media save success', () => {
it( 'save: onFinishMediaSaveWithSuccess is called when a success payload is received', () => {
const progress = 10;
const payloadSuccess = {
state: MEDIA_SAVE_STATE_SUCCEEDED,
Expand Down Expand Up @@ -321,7 +321,7 @@ describe( 'BlockMediaUpdateProgress component', () => {
);
} );

it( 'save: listens media save fail', () => {
it( 'save: onFinishMediaSaveWithFailure is called when a failed payload is received', () => {
const progress = 10;
const payloadFail = {
state: MEDIA_SAVE_STATE_FAILED,
Expand Down Expand Up @@ -357,7 +357,7 @@ describe( 'BlockMediaUpdateProgress component', () => {
);
} );

it( 'save: listens media save reset', () => {
it( 'save: onMediaSaveStateReset is called when a reset payload is received', () => {
const progress = 10;
const payloadReset = {
state: MEDIA_SAVE_STATE_RESET,
Expand Down Expand Up @@ -391,7 +391,7 @@ describe( 'BlockMediaUpdateProgress component', () => {
expect( onMediaSaveStateReset ).toHaveBeenCalledWith( payloadReset );
} );

it( 'save: listens total media save result, with result: fail', () => {
it( 'save: onFinalSaveResult is called with fail result when fail result is received', () => {
const progress = 10;
const payloadFail = {
state: MEDIA_SAVE_FINAL_STATE_RESULT,
Expand Down Expand Up @@ -426,7 +426,7 @@ describe( 'BlockMediaUpdateProgress component', () => {
expect( onFinalSaveResult ).toHaveBeenCalledWith( payloadFail );
} );

it( 'save: listens total media save result, with result: success', () => {
it( 'save: onFinalSaveResult is called with success result when success result is received', () => {
const progress = 10;
const payloadSuccess = {
state: MEDIA_SAVE_FINAL_STATE_RESULT,
Expand Down

0 comments on commit 1f57e1d

Please sign in to comment.