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

[RNMobile] Fix Tiled Gallery JS test failure #22252

Conversation

guarani
Copy link
Contributor

@guarani guarani commented Jan 6, 2022

Fixes failing JS test that was introduced by a bug in https://github.com/Automattic/jetpack/pull/21767/files. The failing test is:

  FAIL extensions/blocks/tiled-gallery/layout/mosaic/test/index.js
    ● renders as expected
  
      TypeError: row.querySelectorAll is not a function
  
        58 | function getRowCols( row ) {
        59 | 	return Platform.select( {
      > 60 | 		web: () => Array.from( row.querySelectorAll( '.tiled-gallery__col' ) ),
           | 		                           ^
        61 | 		native: () => row,
        62 | 	} )();
        63 | }

Related:

Changes proposed in this Pull Request:

  • Bug fix for the Tiled Gallery on the web (this bug isn't on master, it's only on our feature branch).

Jetpack product discussion

p9ugOq-1Tb-p2

Does this pull request change what data or activity we track or use?

No, it does not.

Testing instructions:

Verify that the JS tests CI check passes. The "Code coverage" test may fail for different reasons, as long as it doesn't fail due to the above error.

@guarani guarani added [Block] Tiled Gallery [Type] Bug When a feature is broken and / or not performing as intended [Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack [Feature] Tiled Gallery A different way to display image galleries on your site, in different organizations and shapes. labels Jan 6, 2022
@github-actions github-actions bot added the [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ label Jan 6, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2022

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ⚠️ All commits were linted before commit.
  • 🔴 Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • 🔴 Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.


🔴 Action required: Please add missing changelog entries for the following projects: projects/plugins/jetpack

Use the Jetpack CLI tool to generate changelog entries by running the following command: jetpack changelog add.
Guidelines: /docs/writing-a-good-changelog-entry.md


Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped.
Then, add the "[Status] Needs Team review" label and ask someone from your team review the code.
Once you’ve done so, switch to the "[Status] Needs Review" label; someone from Jetpack Crew will then review this PR and merge it to be included in the next Jetpack release.


Jetpack plugin:

  • Next scheduled release: January 11, 2022.
  • Scheduled code freeze: January 3, 2022.

@github-actions github-actions bot added the [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! label Jan 6, 2022
@guarani
Copy link
Contributor Author

guarani commented Jan 6, 2022

Summary of failing tests:

Tests / PHP tests: PHP 8.1 WP master (pull_request)

The PHP 8.1 test is optional (see experimental keyword here and here.

Linting / Changelogger use

We'll be adding the changelog in a future PR to merge the feature branch to master (see this comment).

wpcom — Could not cleanly apply this PR to synced wpcom files

This is fine to ignore for now since we're merging to a feature branch.

@guarani guarani marked this pull request as ready for review January 6, 2022 22:12
@guarani guarani changed the title [not verified] Fix resize bug Fix resize bug Jan 6, 2022
@guarani guarani changed the title Fix resize bug [RNMobile] Fix Tiled Gallery JS test failure Jan 6, 2022
@guarani guarani requested a review from SiobhyB January 6, 2022 22:18
Copy link
Contributor

@SiobhyB SiobhyB left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for fixing this @guarani 🙇‍♀️

@guarani guarani merged commit 509e263 into rnmobile/add/tiled-gallery-block Jan 7, 2022
@guarani guarani deleted the rnmobile/fix/tiled-gallery-block-resize-bug branch January 7, 2022 11:59
@github-actions github-actions bot removed the [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! label Jan 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Tiled Gallery [Feature] Tiled Gallery A different way to display image galleries on your site, in different organizations and shapes. [Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ Touches WP.com Files [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants