diff --git a/.wiki/Playground-Testing.md b/.wiki/Playground-Testing.md index 901d678..34b4b49 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=2) +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=3) -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=2) +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=3) These links will automatically set up WordPress with our plugin installed and activated. @@ -31,8 +31,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=2) - - [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=2) + - [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=3) + - [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=3) 2. Test the plugin manually in the browser diff --git a/playground/blueprint.json b/playground/blueprint.json index 4526fee..f0c70e9 100644 --- a/playground/blueprint.json +++ b/playground/blueprint.json @@ -1,33 +1,10 @@ { "landingPage": "/wp-admin/", - "preferredVersions": { - "php": "8.0", - "wp": "latest" - }, "steps": [ { "step": "login", "username": "admin", "password": "password" - }, - { - "step": "writeFile", - "path": "/wordpress/wp-content/plugins/wp-plugin-starter-template/wp-plugin-starter-template.php", - "data": "';\n echo '

WP Plugin Starter Template

';\n echo '

This is a starter template for WordPress plugins.

';\n echo '';\n }\n}\n\n$plugin = new WP_Plugin_Starter_Template();\n" - }, - { - "step": "writeFile", - "path": "/wordpress/wp-content/plugins/wp-plugin-starter-template/admin/index.php", - "data": " - + diff --git a/playground/multisite-blueprint.json b/playground/multisite-blueprint.json index 2bbc12c..9bb3f26 100644 --- a/playground/multisite-blueprint.json +++ b/playground/multisite-blueprint.json @@ -1,9 +1,5 @@ { - "landingPage": "/wp-admin/network/", - "preferredVersions": { - "php": "8.0", - "wp": "latest" - }, + "landingPage": "/wp-admin/", "steps": [ { "step": "defineWpConfig", @@ -44,30 +40,6 @@ "step": "login", "username": "admin", "password": "password" - }, - { - "step": "writeFile", - "path": "/wordpress/wp-content/plugins/wp-plugin-starter-template/wp-plugin-starter-template.php", - "data": "';\n echo '

WP Plugin Starter Template

';\n echo '

This is a starter template for WordPress plugins.

';\n echo '';\n }\n \n public function display_network_settings_page() {\n echo '
';\n echo '

WP Plugin Starter Template - Network Settings

';\n echo '

This is a starter template for WordPress plugins with multisite support.

';\n echo '
';\n }\n}\n\n$plugin = new WP_Plugin_Starter_Template();\n" - }, - { - "step": "writeFile", - "path": "/wordpress/wp-content/plugins/wp-plugin-starter-template/admin/index.php", - "data": "get_error_message();\n } else {\n echo 'Created subsite with ID: ' . $blog_id;\n }\n} else {\n echo 'Subsite already exists';\n}\n" } ] } diff --git a/playground/multisite.html b/playground/multisite.html index 26ce640..f5a55ad 100644 --- a/playground/multisite.html +++ b/playground/multisite.html @@ -20,6 +20,6 @@ - +