From 13d2f92ee5dfd312df532d0d50f10fa9a5b4e388 Mon Sep 17 00:00:00 2001 From: marcusquinn <6428977+marcusquinn@users.noreply.github.com> Date: Tue, 22 Apr 2025 02:11:57 +0100 Subject: [PATCH] Fix Hello Dolly plugin installation in WordPress Playground blueprints --- .wiki/Playground-Testing.md | 16 +++++++++------- .wiki/Testing.md | 4 ++-- playground/blueprint.json | 2 +- playground/index.html | 2 +- playground/multisite-blueprint.json | 2 +- playground/multisite.html | 2 +- 6 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.wiki/Playground-Testing.md b/.wiki/Playground-Testing.md index 23e4e65..c7006df 100644 --- a/.wiki/Playground-Testing.md +++ b/.wiki/Playground-Testing.md @@ -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: -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. @@ -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 - In the WordPress admin, go to Network Admin > Plugins - 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 - 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: 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) - - [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) + - [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=20) 2. Test the plugin manually in the browser @@ -181,7 +181,8 @@ await playground.run({ steps: [ { step: 'enableMultisite' }, { 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: [ { step: 'enableMultisite' }, { 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' } ] }); }); diff --git a/.wiki/Testing.md b/.wiki/Testing.md index b9cc954..5a1bdf0 100644 --- a/.wiki/Testing.md +++ b/.wiki/Testing.md @@ -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: -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. diff --git a/playground/blueprint.json b/playground/blueprint.json index feade2b..07e5016 100644 --- a/playground/blueprint.json +++ b/playground/blueprint.json @@ -18,7 +18,7 @@ }, { "step": "wp-cli", - "command": "wp plugin activate hello-dolly" + "command": "wp plugin install hello-dolly --activate" } ] } diff --git a/playground/index.html b/playground/index.html index f1f0c5b..77f4989 100644 --- a/playground/index.html +++ b/playground/index.html @@ -20,6 +20,6 @@ - + diff --git a/playground/multisite-blueprint.json b/playground/multisite-blueprint.json index 2f6d6e4..6bf296e 100644 --- a/playground/multisite-blueprint.json +++ b/playground/multisite-blueprint.json @@ -25,7 +25,7 @@ }, { "step": "wp-cli", - "command": "wp plugin activate hello-dolly --network" + "command": "wp plugin install hello-dolly --activate-network" } ] } diff --git a/playground/multisite.html b/playground/multisite.html index db7c24b..03324ce 100644 --- a/playground/multisite.html +++ b/playground/multisite.html @@ -20,6 +20,6 @@ - +