From 3ca2fe58fabcab2e0d4a9e1d04aad5c8a9ebfb93 Mon Sep 17 00:00:00 2001 From: marcusquinn <6428977+marcusquinn@users.noreply.github.com> Date: Tue, 22 Apr 2025 15:03:24 +0100 Subject: [PATCH] Fix code quality issues: add iframe titles, fix Markdown formatting, update documentation, and clean up test files --- .wiki/Playground-Testing.md | 16 ++++++++-------- .wiki/Testing.md | 5 ++++- playground/index.html | 3 ++- playground/multisite.html | 3 ++- playground/test.html | 26 ++++++++------------------ 5 files changed, 24 insertions(+), 29 deletions(-) diff --git a/.wiki/Playground-Testing.md b/.wiki/Playground-Testing.md index f53eb20..5ba828c 100644 --- a/.wiki/Playground-Testing.md +++ b/.wiki/Playground-Testing.md @@ -90,14 +90,14 @@ wp import 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 install plugin-name --activate-network` + * In the WordPress admin, go to Network Admin > Plugins + * Click "Network Activate" under the plugin + * 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 - - Go to Plugins and activate the plugin for that site only - - Or use WP-CLI: `wp plugin activate plugin-name --url=site-url` + * In the WordPress admin, go to the specific site's admin area + * Go to Plugins and activate the plugin for that site only + * Or use WP-CLI: `wp plugin activate plugin-name --url=site-url` Our multisite blueprint uses network activation for the Plugin Toggle plugin as an example. @@ -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=11) - - [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=23) + * [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=11) + * [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=23) 2. Test the plugin manually in the browser diff --git a/.wiki/Testing.md b/.wiki/Testing.md index 047679f..bcb86d1 100644 --- a/.wiki/Testing.md +++ b/.wiki/Testing.md @@ -38,6 +38,7 @@ npm run setup:single ``` This will: + 1. Start a WordPress single site environment using wp-env 2. Install and activate our plugin 3. Configure WordPress for testing @@ -50,6 +51,7 @@ npm run setup:multisite ``` This will: + 1. Start a WordPress multisite environment using wp-env 2. Install and activate our plugin network-wide 3. Create a test subsite @@ -158,7 +160,8 @@ describe('WordPress Single Site Tests', () => { We have GitHub Actions workflows for running tests in CI/CD: -* `.github/workflows/cypress.yml`: Runs Cypress tests +* `.github/workflows/wordpress-tests.yml`: Runs wp-env e2e tests +* `.github/workflows/playground-tests.yml`: Runs Playground e2e tests * `.github/workflows/phpunit.yml`: Runs PHPUnit tests (coming soon) ## Troubleshooting diff --git a/playground/index.html b/playground/index.html index 9e01674..f4a3862 100644 --- a/playground/index.html +++ b/playground/index.html @@ -12,6 +12,7 @@ width: 100%; overflow: hidden; } + iframe { width: 100%; height: 100%; @@ -20,6 +21,6 @@
- +