Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Gutenberg] Gallery refactor - Test upload completion processor #16721

Conversation

antonis
Copy link

@antonis antonis commented Jun 22, 2021

Description

This PR only adds tests to verify that the existing Gallery block upload completion processor can handle the refactored format. This adds to the existing tests for the Image and Gallery processors.

To test:
Run the upload completion processor unit tests.

Manual testing the existing Gallery block upload completion processor:

  • Create a post on the web (or a version of the mobile editor without the refactored gallery block)
  • Add a gallery with at least one image
  • Open this post
    • Expect the gallery to display as the way as the non-refactored version
  • Add a new gallery with at least one image
    • Expect the new gallery to display as the refactored version
  • Perform the steps from the upload tests described here on each gallery version

Regression Notes

  1. Potential unintended areas of impact
    N/A

  2. What I did to test those areas of impact (or what existing automated tests I relied on)
    N/A

  3. What automated tests I added (or what prevented me from doing so)
    Added tests under GutenbergRefactoredGalleryUploadProcessorTests

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding unit tests for my changes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@antonis antonis added the Testing Unit and UI Tests and Tooling label Jun 22, 2021
@antonis antonis self-assigned this Jun 22, 2021
@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Jun 22, 2021

You can test the changes on this Pull Request by downloading it from AppCenter here with build number: 51160. IPA is available here. If you need access to this, you can ask a maintainer to add you.

@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Jun 22, 2021

You can trigger optional UI/connected tests for these changes by visiting CircleCI here.

@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Jun 22, 2021

Warnings
⚠️ PR is not assigned to a milestone.

Generated by 🚫 dangerJS

@antonis antonis requested a review from mkevins June 22, 2021 11:31
Comment on lines +107 to +109
var resultContent = galleryBlockContent

resultContent = mediaJobs.reduce(into: resultContent) { (content, mediaJob) in
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this was an error in extracting, we overwrite this immediately afterwards

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nvm I see we use it on the RHS in the reducer

@mkevins mkevins self-requested a review June 29, 2021 03:28
Copy link
Contributor

@mkevins mkevins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding these tests Antonis! I tested the gallery upload flows manually with this PR, and also ran all the unit tests you've added, and everything is passing and working as expected. Nice work! 🎉

@antonis antonis merged commit 8336a8d into gutenberg/refactor/gallery-as-nested-image-blocks Jun 29, 2021
@antonis antonis deleted the gutenberg/refactor/gallery-refactor-tests branch June 29, 2021 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing Unit and UI Tests and Tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants