Use official WordPress Playground blueprint examples

This commit is contained in:
2025-04-21 23:08:28 +01:00
parent 81f490efcb
commit 5f95ba762e
5 changed files with 21 additions and 47 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=3) 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=4)
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) 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=4)
These links will automatically set up WordPress with our plugin installed and activated. 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: 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=3) - [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=4)
- [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) - [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=4)
2. Test the plugin manually in the browser 2. Test the plugin manually in the browser

View File

@@ -1,10 +1,13 @@
{ {
"landingPage": "/wp-admin/", "landingPage": "/wp-admin/",
"login": true,
"steps": [ "steps": [
{ {
"step": "login", "step": "installPlugin",
"username": "admin", "pluginData": {
"password": "password" "resource": "wordpress.org/plugins",
"slug": "coblocks"
}
} }
] ]
} }

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=3"></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=4"></iframe>
</body> </body>
</html> </html>

View File

@@ -1,45 +1,16 @@
{ {
"landingPage": "/wp-admin/", "landingPage": "/wp-admin/",
"login": true,
"features": {
"networking": true
},
"steps": [ "steps": [
{ {
"step": "defineWpConfig", "step": "installPlugin",
"name": "WP_ALLOW_MULTISITE", "pluginData": {
"value": true "resource": "wordpress.org/plugins",
}, "slug": "coblocks"
{ }
"step": "defineWpConfig",
"name": "MULTISITE",
"value": true
},
{
"step": "defineWpConfig",
"name": "SUBDOMAIN_INSTALL",
"value": false
},
{
"step": "defineWpConfig",
"name": "DOMAIN_CURRENT_SITE",
"value": "localhost"
},
{
"step": "defineWpConfig",
"name": "PATH_CURRENT_SITE",
"value": "/"
},
{
"step": "defineWpConfig",
"name": "SITE_ID_CURRENT_SITE",
"value": 1
},
{
"step": "defineWpConfig",
"name": "BLOG_ID_CURRENT_SITE",
"value": 1
},
{
"step": "login",
"username": "admin",
"password": "password"
} }
] ]
} }

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=3"></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=4"></iframe>
</body> </body>
</html> </html>