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

Unit tests #1014

Merged
merged 3 commits into from
Feb 17, 2025
Merged

Unit tests #1014

merged 3 commits into from
Feb 17, 2025

Conversation

mauteri
Copy link
Contributor

@mauteri mauteri commented Feb 17, 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.

Copy link

what-the-diff bot commented Feb 17, 2025

PR Summary

  • Incorporated a new autoloader filter: Enhancements have been made in bootstrap.php to include a new autoloader filter for the GatherPress\Tests namespace. This aims to improve efficiency in the way our code is loaded and to troubleshoot issues pertaining to class loading in our tests.

  • Developed a fresh abstract base test class: A new class Base has been introduced in class-base.php that improves the methods asserting hook functionalities by adding action and filter confirmation checks. This is done to streamline the test process and make it more robust.

  • Overhauled test classes naming related to Blocks: The test classes, namely class-test-dropdown-item.php, class-test-dropdown.php and others pertaining to 'Blocks', have been renamed and moved to a newly created testing namespace (GatherPress\Tests\Core\Blocks). This categorization aims to provide better organization and segregation of test classes.

  • Introduced a fresh test class for Modal_Manager feature testing: A new test class Test_Modal_Manager has been implemented to rigorously test Modal_Manager functionality, scrutinizing behaviors during the opening and closing process of modals. This amplifies test coverage, ensuring that the behavior aligns with our expectations.

  • Elevated test detailing in Test_Modal_Manager class: Detailed tests have been incorporated in the Test_Modal_Manager class to verify correct modal interaction with various types of elements, like buttons, links etc. These additional checks help ensure that our modals are working properly across different interaction possibilities.

  • Overhauled test classes organization for event-based functionalities: Various test classes associated with event functionalities have been regrouped as per the new directory format which includes tests for event setups, queries, exports, imports and so on. This re-organization should simplify navigation and management of our test suite.

  • Refactored test classes and moved them into a suitable directory: Several test classes such as class-test-endpoint-type.php, class-test-endpoint.php, class-test-base.php, class-test-credits.php, class-test-leadership.php among others, have been renamed and relocated to the 'tests' directory. This migration aims at better management and categorization of our test files.

Copy link

Preview changes with Playground

You can preview the recent changes for PR#1014 with the following PHP versions:

PHP Version 8.3

PHP Version 7.4

Download .zip with build changes

Made with 💙 from GatherPress & a little bit of WordPress Playground. Changes will not persist between sessions.

@mauteri mauteri marked this pull request as ready for review February 17, 2025 21:38
@mauteri mauteri merged commit 544bec3 into develop Feb 17, 2025
14 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