-
-
Notifications
You must be signed in to change notification settings - Fork 14
[#338] Added traits to create, configure blocks and block_content entities. #337
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
[#338] Added traits to create, configure blocks and block_content entities. #337
Conversation
This commit adds: - Feature test files for BlockTrait and BlockContentTrait - Updates to README.md to document available steps - Improved docblocks in both trait files for better description of parameters and examples - Added missing namespace to BlockContentTrait - Fixed parameter types and descriptions in method documentation - Created CLAUDE.md with guidelines for writing feature files - Added the traits to FeatureContext.php for testing 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Refined BlockContentTrait with consistent naming and better errors - Renamed feature file for consistency - Updated message selectors for Drupal 10 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
error_message_selector: '.messages.error' | ||
success_message_selector: '.messages.status' | ||
warning_message_selector: '.messages.warning' | ||
error_message_selector: '.messages.messages--error' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated message_selector for each type:
CLAUDE.md
Outdated
@@ -0,0 +1,112 @@ | |||
# DrevOps Behat Steps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To remove - Claude instructions for reading and understanding project
Tests are passing but I think codecov seems to be making a bad request or maybe an access issue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@richardgaunt
Thank you so much for this excellent contribution!
Closes #338
Checklist before requesting a review
as
[#134] Added tests for block and block_content traits.
Changed
section about WHY something wasdone if this was not a normal implementation
they passed
Changed
Summary of new steps
BlockTrait Steps
- When I create a block of type :label with: - Create a new block instance of an existing block
- When I configure the block with the label :label with: - Configure an existing block instance's settings (title, region, visibility)
- When I configure a visibility condition :condition for the block with label :label - Add visibility restrictions to a block instance
- When I remove the visibility condition :condition from the block with label :label - Remove visibility restrictions from a block instance
- When I disable the block with label :label - Make a block instance inactive
- When I enable the block with label :label - Make a block instance active
- Then block with label :label should exist - assert a block exists
- Then block with label :label should exist in the region :region - Assert a block is placed in a specific region
- Then block with label :label should not exist in the region :region - Assert a block is not in a specific region
- Then the block with label :label should have the visibility condition :condition - Assert visibility settings
- Then the block with label :label should not have the visibility condition :condition - Assert absence of visibility restrictions
- Then the block with label :label is disabled - Assert a block is inactive
- Then the block with label :label is enabled - Assert a block is active
BlockContentTrait Steps
Potential changes