Skip to content

Commit

Permalink
Update default post ID in generateFetchMocks util
Browse files Browse the repository at this point in the history
  • Loading branch information
fluiddot committed Jun 1, 2023
1 parent 85bbdfa commit cdf73e0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions src/test/videopress/__snapshots__/replace.js.snap
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`VideoPress block - Replace replaces with a local video: after replacing video 1`] = `"<!-- wp:videopress/video {"title":"Local video from device","description":"video-description","useAverageColor":false,"id":1,"guid":"NEWxGUID","privacySetting":2,"allowDownload":false,"rating":"G","isPrivate":false,"duration":1200} /-->"`;
exports[`VideoPress block - Replace replaces with a local video: after replacing video 1`] = `"<!-- wp:videopress/video {"title":"Local video from device","description":"video-description","useAverageColor":false,"id":34,"guid":"NEWxGUID","privacySetting":2,"allowDownload":false,"rating":"G","isPrivate":false,"duration":1200} /-->"`;

exports[`VideoPress block - Replace replaces with a local video: before replacing video 1`] = `"<!-- wp:videopress/video {"title":"Video to be replaced","description":"","useAverageColor":false,"id":1,"guid":"OLDxGUID","allowDownload":false,"rating":"G","isPrivate":false,"duration":2803} /-->"`;

exports[`VideoPress block - Replace replaces with new URL: after replacing video 1`] = `"<!-- wp:videopress/video {"title":"Video from URL","description":"video-description","useAverageColor":false,"id":1,"guid":"NEWxGUID","src":"https://videopress.com/v/NEWxGUID","privacySetting":2,"allowDownload":false,"rating":"G","isPrivate":false,"duration":1200} /-->"`;
exports[`VideoPress block - Replace replaces with new URL: after replacing video 1`] = `"<!-- wp:videopress/video {"title":"Video from URL","description":"video-description","useAverageColor":false,"id":34,"guid":"NEWxGUID","src":"https://videopress.com/v/NEWxGUID","privacySetting":2,"allowDownload":false,"rating":"G","isPrivate":false,"duration":1200} /-->"`;

exports[`VideoPress block - Replace replaces with new URL: before replacing video 1`] = `"<!-- wp:videopress/video {"title":"Video to be replaced","description":"","useAverageColor":false,"id":1,"guid":"OLDxGUID","allowDownload":false,"rating":"G","isPrivate":false,"duration":2803} /-->"`;

exports[`VideoPress block - Replace replaces with video from media library: after replacing video 1`] = `"<!-- wp:videopress/video {"title":"Video from media library","description":"video-description","useAverageColor":false,"id":1,"guid":"NEWxGUID","privacySetting":2,"allowDownload":false,"rating":"G","isPrivate":false,"duration":1200} /-->"`;
exports[`VideoPress block - Replace replaces with video from media library: after replacing video 1`] = `"<!-- wp:videopress/video {"title":"Video from media library","description":"video-description","useAverageColor":false,"id":34,"guid":"NEWxGUID","privacySetting":2,"allowDownload":false,"rating":"G","isPrivate":false,"duration":1200} /-->"`;

exports[`VideoPress block - Replace replaces with video from media library: before replacing video 1`] = `"<!-- wp:videopress/video {"title":"Video to be replaced","description":"","useAverageColor":false,"id":1,"guid":"OLDxGUID","allowDownload":false,"rating":"G","isPrivate":false,"duration":2803} /-->"`;

exports[`VideoPress block - Replace restores previous video when canceling a video replacement: after canceling replacement 1`] = `"<!-- wp:videopress/video {"title":"Initial video","description":"video-description","useAverageColor":false,"id":1,"guid":"OLDxGUID","src":"file:///local-video-1.mp4","privacySetting":2,"allowDownload":false,"rating":"G","isPrivate":false,"duration":1200} /-->"`;
exports[`VideoPress block - Replace restores previous video when canceling a video replacement: after canceling replacement 1`] = `"<!-- wp:videopress/video {"title":"Initial video","description":"video-description","useAverageColor":false,"id":34,"guid":"OLDxGUID","src":"file:///local-video-1.mp4","privacySetting":2,"allowDownload":false,"rating":"G","isPrivate":false,"duration":1200} /-->"`;

exports[`VideoPress block - Replace restores previous video when canceling a video replacement: before replacing video 1`] = `"<!-- wp:videopress/video {"title":"Initial video","description":"video-description","useAverageColor":false,"id":1,"guid":"OLDxGUID","privacySetting":2,"allowDownload":false,"rating":"G","isPrivate":false,"duration":1200} /-->"`;
exports[`VideoPress block - Replace restores previous video when canceling a video replacement: before replacing video 1`] = `"<!-- wp:videopress/video {"title":"Initial video","description":"video-description","useAverageColor":false,"id":34,"guid":"OLDxGUID","privacySetting":2,"allowDownload":false,"rating":"G","isPrivate":false,"duration":1200} /-->"`;

exports[`VideoPress block - Replace takes a new video: after replacing video 1`] = `"<!-- wp:videopress/video {"title":"Recorded within the editor","description":"video-description","useAverageColor":false,"id":1,"guid":"NEWxGUID","privacySetting":2,"allowDownload":false,"rating":"G","isPrivate":false,"duration":1200} /-->"`;
exports[`VideoPress block - Replace takes a new video: after replacing video 1`] = `"<!-- wp:videopress/video {"title":"Recorded within the editor","description":"video-description","useAverageColor":false,"id":34,"guid":"NEWxGUID","privacySetting":2,"allowDownload":false,"rating":"G","isPrivate":false,"duration":1200} /-->"`;

exports[`VideoPress block - Replace takes a new video: before replacing video 1`] = `"<!-- wp:videopress/video {"title":"Video to be replaced","description":"","useAverageColor":false,"id":1,"guid":"OLDxGUID","allowDownload":false,"rating":"G","isPrivate":false,"duration":2803} /-->"`;
10 changes: 5 additions & 5 deletions src/test/videopress/__snapshots__/upload.js.snap
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`VideoPress block - Uploads adds video by inserting URL: video ready 1`] = `"<!-- wp:videopress/video {"title":"video-title","description":"video-description","id":1,"guid":"AbCdEfGh","privacySetting":2,"allowDownload":false,"rating":"G","isPrivate":false,"duration":1200} /-->"`;
exports[`VideoPress block - Uploads adds video by inserting URL: video ready 1`] = `"<!-- wp:videopress/video {"title":"video-title","description":"video-description","id":34,"guid":"AbCdEfGh","privacySetting":2,"allowDownload":false,"rating":"G","isPrivate":false,"duration":1200} /-->"`;

exports[`VideoPress block - Uploads cancel upload 1`] = `"<!-- wp:videopress/video /-->"`;

exports[`VideoPress block - Uploads finishes pending uploads upon opening the editor 1`] = `"<!-- wp:videopress/video {"title":"video-title","description":"video-description","id":1,"guid":"AbCdEfGh","privacySetting":2,"allowDownload":false,"rating":"G","isPrivate":false,"duration":1200} /-->"`;
exports[`VideoPress block - Uploads finishes pending uploads upon opening the editor 1`] = `"<!-- wp:videopress/video {"title":"video-title","description":"video-description","id":34,"guid":"AbCdEfGh","privacySetting":2,"allowDownload":false,"rating":"G","isPrivate":false,"duration":1200} /-->"`;

exports[`VideoPress block - Uploads handles upload failure 1`] = `"<!-- wp:videopress/video {"id":1,"src":"file:///local-video-1.mp4"} /-->"`;

exports[`VideoPress block - Uploads takes a video and uploads it: loading state 1`] = `"<!-- wp:videopress/video {"id":3,"src":"file:///local-video-3.mp4"} /-->"`;

exports[`VideoPress block - Uploads takes a video and uploads it: video ready 1`] = `"<!-- wp:videopress/video {"title":"video-title","description":"video-description","id":1,"guid":"AbCdEfGh","privacySetting":2,"allowDownload":false,"rating":"G","isPrivate":false,"duration":1200} /-->"`;
exports[`VideoPress block - Uploads takes a video and uploads it: video ready 1`] = `"<!-- wp:videopress/video {"title":"video-title","description":"video-description","id":34,"guid":"AbCdEfGh","privacySetting":2,"allowDownload":false,"rating":"G","isPrivate":false,"duration":1200} /-->"`;

exports[`VideoPress block - Uploads uploads a video from device: loading state 1`] = `"<!-- wp:videopress/video {"id":1,"src":"file:///local-video-1.mp4"} /-->"`;

exports[`VideoPress block - Uploads uploads a video from device: video ready 1`] = `"<!-- wp:videopress/video {"title":"video-title","description":"video-description","id":1,"guid":"AbCdEfGh","privacySetting":2,"allowDownload":false,"rating":"G","isPrivate":false,"duration":1200} /-->"`;
exports[`VideoPress block - Uploads uploads a video from device: video ready 1`] = `"<!-- wp:videopress/video {"title":"video-title","description":"video-description","id":34,"guid":"AbCdEfGh","privacySetting":2,"allowDownload":false,"rating":"G","isPrivate":false,"duration":1200} /-->"`;

exports[`VideoPress block - Uploads uploads a video from media library: video ready 1`] = `"<!-- wp:videopress/video {"title":"video-title","description":"video-description","id":1,"guid":"AbCdEfGh","privacySetting":2,"allowDownload":false,"rating":"G","isPrivate":false,"duration":1200} /-->"`;
exports[`VideoPress block - Uploads uploads a video from media library: video ready 1`] = `"<!-- wp:videopress/video {"title":"video-title","description":"video-description","id":34,"guid":"AbCdEfGh","privacySetting":2,"allowDownload":false,"rating":"G","isPrivate":false,"duration":1200} /-->"`;
2 changes: 1 addition & 1 deletion src/test/videopress/local-helpers/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ export const generateFetchMocks = ( {
},
response: {
description: 'video-description',
post_id: 1,
post_id: 34,
guid,
private_enabled_for_site: false,
title: 'video-title',
Expand Down

0 comments on commit cdf73e0

Please sign in to comment.