Fix WordPress Playground tests: update blueprints to use installPlugin step, update test command
This commit is contained in:
2
.github/workflows/playground-tests.yml
vendored
2
.github/workflows/playground-tests.yml
vendored
@@ -72,7 +72,7 @@ jobs:
|
||||
timeout 60 bash -c 'until curl -s http://localhost:8888; do sleep 2; done'
|
||||
|
||||
# Run Cypress tests against WordPress Playground
|
||||
npm run test:single:headless
|
||||
npx cypress run --config specPattern=cypress/e2e/playground-single-site.cy.js
|
||||
|
||||
performance-test:
|
||||
name: WordPress Performance Tests
|
||||
|
||||
@@ -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/main/playground/blueprint.json&_t=1)
|
||||
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/main/playground/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/main/playground/multisite-blueprint.json&_t=1)
|
||||
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/main/playground/multisite-blueprint.json&_t=2)
|
||||
|
||||
These links will automatically set up WordPress with multisite enabled, WP_DEBUG enabled, and both the Plugin Toggle and Kadence Blocks plugins activated.
|
||||
|
||||
@@ -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/main/playground/blueprint.json&_t=1)
|
||||
* [Multisite](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wpallstars/wp-plugin-starter-template-for-ai-coding/main/playground/multisite-blueprint.json&_t=1)
|
||||
* [Single site](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wpallstars/wp-plugin-starter-template-for-ai-coding/main/playground/blueprint.json&_t=2)
|
||||
* [Multisite](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wpallstars/wp-plugin-starter-template-for-ai-coding/main/playground/multisite-blueprint.json&_t=2)
|
||||
|
||||
2. Test the plugin manually in the browser
|
||||
|
||||
|
||||
@@ -106,9 +106,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/main/playground/blueprint.json&_t=1)
|
||||
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/main/playground/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/main/playground/multisite-blueprint.json&_t=1)
|
||||
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/main/playground/multisite-blueprint.json&_t=2)
|
||||
|
||||
These links will automatically set up WordPress with multisite enabled, WP_DEBUG enabled, and both the Plugin Toggle and Kadence Blocks plugins activated.
|
||||
|
||||
|
||||
@@ -12,9 +12,23 @@
|
||||
"WP_DEBUG": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "installPlugin",
|
||||
"pluginData": {
|
||||
"resource": "wordpress.org/plugins",
|
||||
"slug": "plugin-toggle"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "installPlugin",
|
||||
"pluginData": {
|
||||
"resource": "wordpress.org/plugins",
|
||||
"slug": "kadence-blocks"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "wp-cli",
|
||||
"command": "wp plugin install plugin-toggle kadence-blocks --activate"
|
||||
"command": "wp plugin activate plugin-toggle kadence-blocks"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -21,6 +21,6 @@
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<iframe src="https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wpallstars/wp-plugin-starter-template-for-ai-coding/main/playground/blueprint.json&_t=1" title="WordPress Playground Single Site Environment"></iframe>
|
||||
<iframe src="https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wpallstars/wp-plugin-starter-template-for-ai-coding/main/playground/blueprint.json&_t=2" title="WordPress Playground Single Site Environment"></iframe>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -19,9 +19,23 @@
|
||||
"step": "wp-cli",
|
||||
"command": "wp site create --slug=testsite"
|
||||
},
|
||||
{
|
||||
"step": "installPlugin",
|
||||
"pluginData": {
|
||||
"resource": "wordpress.org/plugins",
|
||||
"slug": "plugin-toggle"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "installPlugin",
|
||||
"pluginData": {
|
||||
"resource": "wordpress.org/plugins",
|
||||
"slug": "kadence-blocks"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "wp-cli",
|
||||
"command": "wp plugin install plugin-toggle kadence-blocks --activate-network"
|
||||
"command": "wp plugin activate plugin-toggle kadence-blocks --network"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -21,6 +21,6 @@
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<iframe src="https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wpallstars/wp-plugin-starter-template-for-ai-coding/main/playground/multisite-blueprint.json&_t=1" title="WordPress Playground Multisite Environment"></iframe>
|
||||
<iframe src="https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wpallstars/wp-plugin-starter-template-for-ai-coding/main/playground/multisite-blueprint.json&_t=2" title="WordPress Playground Multisite Environment"></iframe>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user