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

Automated Testing: Disable remote patterns in tests #33160

Merged
merged 1 commit into from
Jul 21, 2021

Conversation

Mamaduka
Copy link
Member

@Mamaduka Mamaduka commented Jul 2, 2021

Description

Adds new "mu-plugin" to disable loading remote patterns loading in tests.

Fixes #33126

How has this been tested?

  1. Symlink new "disable-remote-patterns.php" mu-plugin to your local mu-plugins directory.
  2. Remote patterns shouldn't be loaded in the editor.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).

@Mamaduka Mamaduka self-assigned this Jul 2, 2021
@Mamaduka Mamaduka added the [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. label Jul 2, 2021
@Mamaduka Mamaduka requested a review from ntsekouras July 2, 2021 07:46
@Mamaduka
Copy link
Member Author

Hi, @ntsekouras

Should we go with this solution for #33126?

@Mamaduka Mamaduka requested a review from talldan July 20, 2021 06:18
Copy link
Member

@jorgefilipecosta jorgefilipecosta left a comment

Choose a reason for hiding this comment

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

This solution seems good to me 👍 I guess not relying on an external source makes sense. But I also wonder that if we have a critical issues e.g: crash on remote block patterns our tests will never detect that.

@Mamaduka
Copy link
Member Author

As far as I know, remote patterns are just standard patterns loaded via HTTP and registered on the PHP side. So if something breaks in patterns API, we should notice it based on patterns we ship with the plugin.

If the problem is with the remote pattern itself, I think it should be fixed in the patterns directory.

@Mamaduka Mamaduka merged commit eaf3f8b into trunk Jul 21, 2021
@Mamaduka Mamaduka deleted the fix/disable-remote-patterns branch July 21, 2021 09:47
@github-actions github-actions bot added this to the Gutenberg 11.2 milestone Jul 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Automated Testing] Do not load remote patterns in tests
2 participants