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

Added unit tests for Dropdown_Item block class. #1007

Merged
merged 1 commit into from
Feb 5, 2025
Merged

Conversation

mauteri
Copy link
Contributor

@mauteri mauteri commented Feb 5, 2025

Description of the Change

Closes #

How to test the Change

Changelog Entry

Added - New feature
Changed - Existing functionality
Deprecated - Soon-to-be removed feature
Removed - Feature
Fixed - Bug fix
Security - Vulnerability

Credits

Props @username, @username2, ...

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@mauteri mauteri marked this pull request as ready for review February 5, 2025 13:37
Copy link

what-the-diff bot commented Feb 5, 2025

PR Summary

  • Added a New Testing Module
    A new unit test class Test_Dropdown_Item has been introduced for comprehensively testing another code module called GatherPress\Core\Blocks\Dropdown_Item.

  • Testing Registered Filters
    A set of tests were developed to inspect the 'setup_hooks' method. It verifies that pertinent filters (codes that allow data transformation) are correctly registered in the system.

  • Broad Scenario Testing for the apply_dropdown_attributes Method
    Multiple tests for apply_dropdown_attributes method were performed, checking various scenarios. These include:

    • Dealing with an absent link (empty href attribute).
    • Handling a 'page-top' link (hash # href attribute).
    • Managing a valid web address as href.
    • Coping with a case where no HTML link tag is present.
  • Checking Output Accuracy
    Proper assertions (conditional checks in programming) were added to confirm that specific characteristics are available or absent in the resulting webpage design, rooted in different input conditions.

@mauteri mauteri merged commit 4f58c95 into develop Feb 5, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant