Skip to content

Conversation

himanshupathak95
Copy link
Contributor

What?

Follow up to: #69089
Comment: #69089 (review)

Adds comprehensive E2E tests for template lock functionality in a new general test file test/e2e/specs/editor/various/block-template-lock.spec.js.

Why?

As discussed in the original issue, template lock behavior should be consistent across all blocks that support it. Rather than duplicating tests in each block's test file, this PR creates a centralized location for testing general template lock behaviors that apply to all blocks.

How?

  • Creates a new test file test/e2e/specs/editor/various/block-template-lock.spec.js
  • Tests all template lock modes: "all", "insert", "contentOnly", and false
  • Covers all scenarios

Testing Instructions

  • Run the new E2E tests:
npm run test:e2e -- test/e2e/specs/editor/various/block-template-lock.spec.js
  • Verify all tests pass

Screenshots or screencast

N/A - This PR adds E2E tests without changing the user interface.

@himanshupathak95 himanshupathak95 marked this pull request as ready for review May 20, 2025 07:29
Copy link

github-actions bot commented May 20, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: himanshupathak95 <abcd95@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@t-hamano t-hamano added [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. [Feature] Block Locking The API allowing for the ability to lock/unlock blocks labels May 21, 2025
Copy link
Member

@Mamaduka Mamaduka 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 the follow-up, @himanshupathak95!

The tests look good to me. I reran the CI checks, and we could merge them once they're green.

@himanshupathak95
Copy link
Contributor Author

Thanks for taking a look @Mamaduka, I think this is ready to be 🚢 'd

@Mamaduka Mamaduka merged commit 56d59b8 into WordPress:trunk May 23, 2025
92 of 110 checks passed
@github-actions github-actions bot added this to the Gutenberg 21.0 milestone May 23, 2025
chriszarate pushed a commit to chriszarate/gutenberg that referenced this pull request Jul 1, 2025
…s#70160)

Co-authored-by: himanshupathak95 <abcd95@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Block Locking The API allowing for the ability to lock/unlock blocks [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.

3 participants