Fix Hello Dolly plugin installation in WordPress Playground blueprints

This commit is contained in:
2025-04-22 02:11:57 +01:00
parent 1089ea491a
commit 13d2f92ee5
6 changed files with 15 additions and 13 deletions

View File

@@ -15,9 +15,9 @@ This document explains how to use WordPress Playground for testing our plugin.
The easiest way to test our plugin with WordPress Playground is to use the online version: The easiest way to test our plugin with WordPress Playground is to use the online version:
1. Single site testing: [Open in WordPress Playground](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wpallstars/wp-plugin-starter-template-for-ai-coding/feature/testing-framework/playground/blueprint.json&_t=6) 1. Single site testing: [Open in WordPress Playground](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wpallstars/wp-plugin-starter-template-for-ai-coding/feature/testing-framework/playground/blueprint.json&_t=7)
2. Multisite testing: [Open in WordPress Playground](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wpallstars/wp-plugin-starter-template-for-ai-coding/feature/testing-framework/playground/multisite-blueprint.json&_t=19) 2. Multisite testing: [Open in WordPress Playground](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wpallstars/wp-plugin-starter-template-for-ai-coding/feature/testing-framework/playground/multisite-blueprint.json&_t=20)
These links will automatically set up WordPress with multisite enabled, WP_DEBUG enabled, and both the Plugin Toggle and Hello Dolly plugins activated. These links will automatically set up WordPress with multisite enabled, WP_DEBUG enabled, and both the Plugin Toggle and Hello Dolly plugins activated.
@@ -92,7 +92,7 @@ In a WordPress multisite environment, there are two ways to activate plugins:
1. **Network Activation**: Activates a plugin for all sites in the network 1. **Network Activation**: Activates a plugin for all sites in the network
- In the WordPress admin, go to Network Admin > Plugins - In the WordPress admin, go to Network Admin > Plugins
- Click "Network Activate" under the plugin - Click "Network Activate" under the plugin
- Or use WP-CLI: `wp plugin activate plugin-name --network` - Or use WP-CLI: `wp plugin install plugin-name --activate-network`
2. **Per-Site Activation**: Activates a plugin for a specific site 2. **Per-Site Activation**: Activates a plugin for a specific site
- In the WordPress admin, go to the specific site's admin area - In the WordPress admin, go to the specific site's admin area
@@ -111,8 +111,8 @@ We have two blueprints for testing:
To run tests with WordPress Playground: To run tests with WordPress Playground:
1. Open the appropriate WordPress Playground link: 1. Open the appropriate WordPress Playground link:
- [Single site](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wpallstars/wp-plugin-starter-template-for-ai-coding/feature/testing-framework/playground/blueprint.json&_t=6) - [Single site](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wpallstars/wp-plugin-starter-template-for-ai-coding/feature/testing-framework/playground/blueprint.json&_t=7)
- [Multisite](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wpallstars/wp-plugin-starter-template-for-ai-coding/feature/testing-framework/playground/multisite-blueprint.json&_t=19) - [Multisite](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wpallstars/wp-plugin-starter-template-for-ai-coding/feature/testing-framework/playground/multisite-blueprint.json&_t=20)
2. Test the plugin manually in the browser 2. Test the plugin manually in the browser
@@ -181,7 +181,8 @@ await playground.run({
steps: [ steps: [
{ step: 'enableMultisite' }, { step: 'enableMultisite' },
{ step: 'wp-cli', command: 'wp site create --slug=testsite' }, { step: 'wp-cli', command: 'wp site create --slug=testsite' },
{ step: 'wp-cli', command: 'wp plugin install plugin-toggle --activate-network' } { step: 'wp-cli', command: 'wp plugin install plugin-toggle --activate-network' },
{ step: 'wp-cli', command: 'wp plugin install hello-dolly --activate-network' }
] ]
}); });
@@ -215,7 +216,8 @@ describe('Plugin Tests', () => {
steps: [ steps: [
{ step: 'enableMultisite' }, { step: 'enableMultisite' },
{ step: 'wp-cli', command: 'wp site create --slug=testsite' }, { step: 'wp-cli', command: 'wp site create --slug=testsite' },
{ step: 'wp-cli', command: 'wp plugin install plugin-toggle --activate-network' } { step: 'wp-cli', command: 'wp plugin install plugin-toggle --activate-network' },
{ step: 'wp-cli', command: 'wp plugin install hello-dolly --activate-network' }
] ]
}); });
}); });

View File

@@ -104,9 +104,9 @@ WordPress Playground runs WordPress entirely in the browser using WebAssembly. T
The easiest way to test our plugin with WordPress Playground is to use the online version: The easiest way to test our plugin with WordPress Playground is to use the online version:
1. Single site testing: [Open in WordPress Playground](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wpallstars/wp-plugin-starter-template-for-ai-coding/feature/testing-framework/playground/blueprint.json&_t=6) 1. Single site testing: [Open in WordPress Playground](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wpallstars/wp-plugin-starter-template-for-ai-coding/feature/testing-framework/playground/blueprint.json&_t=7)
2. Multisite testing: [Open in WordPress Playground](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wpallstars/wp-plugin-starter-template-for-ai-coding/feature/testing-framework/playground/multisite-blueprint.json&_t=19) 2. Multisite testing: [Open in WordPress Playground](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wpallstars/wp-plugin-starter-template-for-ai-coding/feature/testing-framework/playground/multisite-blueprint.json&_t=20)
These links will automatically set up WordPress with multisite enabled, WP_DEBUG enabled, and both the Plugin Toggle and Hello Dolly plugins activated. These links will automatically set up WordPress with multisite enabled, WP_DEBUG enabled, and both the Plugin Toggle and Hello Dolly plugins activated.

View File

@@ -18,7 +18,7 @@
}, },
{ {
"step": "wp-cli", "step": "wp-cli",
"command": "wp plugin activate hello-dolly" "command": "wp plugin install hello-dolly --activate"
} }
] ]
} }

View File

@@ -20,6 +20,6 @@
</style> </style>
</head> </head>
<body> <body>
<iframe src="https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wpallstars/wp-plugin-starter-template-for-ai-coding/feature/testing-framework/playground/blueprint.json&_t=6"></iframe> <iframe src="https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wpallstars/wp-plugin-starter-template-for-ai-coding/feature/testing-framework/playground/blueprint.json&_t=7"></iframe>
</body> </body>
</html> </html>

View File

@@ -25,7 +25,7 @@
}, },
{ {
"step": "wp-cli", "step": "wp-cli",
"command": "wp plugin activate hello-dolly --network" "command": "wp plugin install hello-dolly --activate-network"
} }
] ]
} }

View File

@@ -20,6 +20,6 @@
</style> </style>
</head> </head>
<body> <body>
<iframe src="https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wpallstars/wp-plugin-starter-template-for-ai-coding/feature/testing-framework/playground/multisite-blueprint.json&_t=19"></iframe> <iframe src="https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wpallstars/wp-plugin-starter-template-for-ai-coding/feature/testing-framework/playground/multisite-blueprint.json&_t=20"></iframe>
</body> </body>
</html> </html>