Skip to main content

Questions tagged [integration-tests]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
38 views

ACF - programmatically install and activate in pipeline to automate testing for custom plugin development?

Original question on SO: WP plugin integretion testing - how to enable additional plugins? TL/DR I'm developing a custom plugin and setting up ci/cd via gitlab pipeline. Testing and publishing to ...
fudo's user avatar
  • 111
1 vote
0 answers
78 views

How do I activate a plugin while testing?

I want to make sure my plugin works while another plugin is activated: public function test_registration_3() { activate_plugin( 'new-user-approve/new-user-approve.php', '', false, true ); ...
StevieD's user avatar
  • 211
1 vote
1 answer
47 views

How do I simulate a registration form submission while testing?

I'm trying to figure out how to do an integration test on the registration form by simulating a registration with something like: public function test_registration_form_submission_valid() { // ...
StevieD's user avatar
  • 211
1 vote
0 answers
112 views

Can't run WP e2e-test-utils because the browser exits on login?

I'm trying to run e2e tests for my Gutenberg plugin. Here's my pertinent code import { createNewPost, enablePageDialogAccept, insertBlock, clickButton, } from "@wordpress/e2e-test-utils&...
navxio's user avatar
  • 33
1 vote
1 answer
300 views

woocommerce registration form with klaviyo(don't work with current user)

I'm trying to integrate klaviyo with woocom form, this is the code I added below. The issue is when I add any hardcoded email in variable $emailUntrim = "[email protected]" instead of $...
meetStackOverflow's user avatar
2 votes
0 answers
65 views

How to change the admin/password when using the E2E Test Utils for Gutenberg

I'm trying to set up a test suite for our Gutenberg blocks plugin using the e2e-test-utils. Our environment is a multi-site WP install and I pass the WP_BASE_URL, WP_USERNAME and WP_PASSWORD as ...
crs1138's user avatar
  • 291
0 votes
1 answer
76 views

How can I enable IDE integration (autocomplete) for WordPress test suite

When testing a theme or plugin, you can use WP-CLI to scaffold the test suite setup, wp scaffold plugin-test plugin. So is there a good way to integrate an editor/IDE (VS Code in my case) so that ...
Corey's user avatar
  • 172
1 vote
2 answers
867 views

Rest API in integration tests - filtering by slug not working?

I have a bunch of custom fields in my REST API response, and I need to refactor the code for it, so I'm creating an integration test for it, just to make sure nothing breaks in the process of ...
dingo_d's user avatar
  • 1,950
1 vote
0 answers
131 views

Intermittent database errors when accessing WordPress database

Update: I've narrowed this down to a couple of issues that seem unrelated. The testing suite was disconnecting my database without reconnecting. (resolved) The mysqli_free_result(): Couldn't fetch ...
j-penguin's user avatar
1 vote
0 answers
328 views

Coverage in integration tests

EDIT: I've created the mwe as a small test plugin: https://github.com/dingo-d/test-plugin Original question: I'm writing tests for my plugin and one thing makes no sense to me and I'm not sure if I'm ...
dingo_d's user avatar
  • 1,950
1 vote
0 answers
118 views

Integration tests don't register menu

I have integration tests set up. The install-wp-tests.sh is taken from the wpcli scaffold plugin tests. I'm on VVV and I have wordpress-develop set up. In my plugin I have phpunit.integration.xml....
dingo_d's user avatar
  • 1,950