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

Finish Building Test Suite Framework for VIP Search #69

Closed
jakewrfoster opened this issue Jan 8, 2024 · 4 comments · Fixed by #74
Closed

Finish Building Test Suite Framework for VIP Search #69

jakewrfoster opened this issue Jan 8, 2024 · 4 comments · Fixed by #74
Assignees
Labels
ci/cd PR checks, deploys, automation enhancement New feature or request php Requires understanding PHP

Comments

@jakewrfoster
Copy link
Member

jakewrfoster commented Jan 8, 2024

Description

Currently the test suite does not properly load and run VIP Search (and thus ElasticPress). Before we can set up tests against VIP Search, we will need to build the framework for VIP Search on ElasticPress. This will involve revisiting the bootstrapping and set up of VIP Search.

Use Case

For future developers to be able to add tests quickly and easily.

@jakewrfoster jakewrfoster added the enhancement New feature or request label Jan 8, 2024
@jakewrfoster jakewrfoster self-assigned this Jan 8, 2024
@renatonascalves
Copy link
Contributor

@jakewrfoster Can you outline, maybe with code or links, to some of the issues you run into?

I know ElasticPress has some abstract test classes that could help here, and I planned to use them when I set up the test suite for this plugin. But I haven't got into really adding tests per se, so I don't know exactly what are the issues are suggesting to finish here.

@jakewrfoster
Copy link
Member Author

jakewrfoster commented Mar 14, 2024

@renatonascalves currently, VIP Search is not being bootstrapped correctly. ElasticPress is not being initialized early enough for VIP Search's hooks to fire properly. VIP Search also create a custom table, which currently isn't being created, but needs to be in order to fully leverage VIP Search. The setup and teardown methods are not firing currently, either. These should be updated from set_up_before_class to setUpBeforeClass, for example. I believe this is due to Mantle test kit updates.

These are some of the things that need to shored up for the sake of VIP Search.

@jakewrfoster
Copy link
Member Author

I realized something was off when writing tests for the phrase matching feature and saw that certain ElasticPress filters were not firing. A version of ElasticPress was being initialized, but it was happening directly (IIRC) and the way that it needs to happen is via VIP Search/MU functions.

@jakewrfoster jakewrfoster changed the title Finish Building Test Suite Framework Finish Building Test Suite Framework for VIP Search Apr 17, 2024
@jakewrfoster
Copy link
Member Author

I have updated this issue to include only VIP Search tests. The SearchPress tests need to be updated in order for them to become functional as well. I will open a new issue for the SP tests.

@kevinfodness kevinfodness added ci/cd PR checks, deploys, automation php Requires understanding PHP labels May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/cd PR checks, deploys, automation enhancement New feature or request php Requires understanding PHP
Projects
None yet
3 participants