Repository navigation
test(e2e): Cover delete sync to Cloudinary - #1367
Open
utkarshcloudinary wants to merge 1 commit into
Open
utkarshcloudinary wants to merge 1 commit into
utkarshcloudinary wants to merge 1 commit into
Conversation
Add an e2e spec that deletes a synced attachment through the REST API and through "Delete permanently" in the Media Library, and checks through the Admin API that its Cloudinary asset is removed. The spec syncs only its own attachments, and cleanup removes any asset a failed test leaves.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an e2e spec for delete sync: when a user deletes a synced attachment, the plugin must remove its asset from Cloudinary. No spec covered this before. It is independent of #1366 (new file only, no shared util changes), so it targets
develop.Approach
cloudinary-delete-sync.spec.js(@serial) uploads an image and syncs only that attachment throughprocess_assets(), then checks thatSync::is_synced()is true.requestUtils.deleteMedia()deletes the attachment, which is the path the block editor and API clients use.afterAllremoves any asset and attachment that a failed test leaves.QA notes
npm run test:e2e:serial -- cloudinary-delete-syncdelete-*assets.