Compare commits
10 Commits
7d0ee0adea
...
29622dd54c
| Author | SHA1 | Date | |
|---|---|---|---|
| 29622dd54c | |||
| 1afa6b71d7 | |||
| 8bb4784204 | |||
| b223165012 | |||
| 4228bcc330 | |||
| 7bac0dc63d | |||
| 7c272b5399 | |||
| 81e5b14604 | |||
| 9dca8880cc | |||
| ad03358e2a |
@@ -142,7 +142,7 @@ npm run test:playground:multisite
|
||||
2. **Analyze Output for Errors**:
|
||||
|
||||
```bash
|
||||
grep -i 'error\|fail\|exception' test-output.log
|
||||
grep -E -i '\b(error|fail|exception)' test-output.log
|
||||
```
|
||||
|
||||
3. **Parse Structured Test Results** (if available):
|
||||
@@ -221,7 +221,7 @@ npm run lint:css
|
||||
2. **Analyze Output for Errors**:
|
||||
|
||||
```bash
|
||||
grep -i 'ERROR\|WARNING' phpcs-output.log
|
||||
grep -E -i '\b(ERROR|WARNING)' phpcs-output.log
|
||||
```
|
||||
|
||||
3. **Automatically Fix Issues** (when possible):
|
||||
|
||||
@@ -2,8 +2,7 @@ module.exports = {
|
||||
env: {
|
||||
browser: true,
|
||||
es2021: true,
|
||||
node: true,
|
||||
'cypress/globals': true
|
||||
node: true
|
||||
},
|
||||
extends: [
|
||||
'eslint:recommended'
|
||||
|
||||
6
.github/workflows/sync-wiki.yml
vendored
6
.github/workflows/sync-wiki.yml
vendored
@@ -50,4 +50,8 @@ jobs:
|
||||
git commit -m "Sync wiki from source repository"
|
||||
|
||||
# Push changes
|
||||
git push https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.wiki.git
|
||||
git push https://${WIKI_ACTOR}:${WIKI_TOKEN}@github.com/${WIKI_REPO}.wiki.git
|
||||
env:
|
||||
WIKI_ACTOR: ${{ github.actor }}
|
||||
WIKI_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
WIKI_REPO: ${{ github.repository }}
|
||||
|
||||
@@ -102,7 +102,9 @@ 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` (for installed plugins), or `wp plugin install plugin-name --activate-network` (to install and activate)
|
||||
* Or use WP-CLI:
|
||||
* To activate an already installed plugin: `wp plugin activate plugin-name --network`
|
||||
* To install and activate in one step: `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
|
||||
|
||||
@@ -123,8 +123,6 @@
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* Responsive Styles */
|
||||
|
||||
/* 782px is the WordPress mobile admin breakpoint. */
|
||||
@media screen and (max-width: 782px) {
|
||||
.wpst-form-table th {
|
||||
|
||||
3
build.sh
3
build.sh
@@ -85,8 +85,7 @@ if [ -f "$ZIP_FILE" ]; then
|
||||
|
||||
# Deploy to local WordPress installation if environment variable is set
|
||||
if [ -n "${WP_LOCAL_PLUGIN_DIR:-}" ]; then
|
||||
echo ""
|
||||
echo "Deploying to local WordPress installation..."
|
||||
printf '\nDeploying to local WordPress installation...\n'
|
||||
|
||||
# Remove existing plugin directory.
|
||||
rm -rf "${WP_LOCAL_PLUGIN_DIR:?}/$PLUGIN_SLUG"
|
||||
|
||||
@@ -12,6 +12,6 @@ module.exports = defineConfig({
|
||||
},
|
||||
// Add configuration for WordPress Playground
|
||||
experimentalWebKitSupport: true,
|
||||
chromeWebSecurity: false
|
||||
}
|
||||
chromeWebSecurity: false,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
/* eslint-env mocha, jquery, cypress */
|
||||
describe('WordPress Playground Single Site Tests', () => {
|
||||
describe('WordPress Playground Single Site Tests', {
|
||||
retries: {
|
||||
runMode: 2,
|
||||
openMode: 0,
|
||||
},
|
||||
}, () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('/', { timeout: 30000 });
|
||||
});
|
||||
@@ -18,23 +23,22 @@ describe('WordPress Playground Single Site Tests', () => {
|
||||
cy.visit('/wp-admin/plugins.php', { timeout: 30000 });
|
||||
|
||||
cy.get('body', { timeout: 15000 }).then(($body) => {
|
||||
// Verify the starter template plugin exists and is activated.
|
||||
if ($body.find('tr[data-slug="wp-plugin-starter-template-for-ai-coding"]').length) {
|
||||
cy.get('tr[data-slug="wp-plugin-starter-template-for-ai-coding"]').within(() => {
|
||||
cy.get('.deactivate a').should('exist');
|
||||
});
|
||||
} else {
|
||||
cy.log('Starter template plugin not found by slug, skipping check');
|
||||
}
|
||||
const hasPluginToggle = $body.text().includes('Plugin Toggle');
|
||||
const hasKadenceBlocks = $body.text().includes('Kadence Blocks');
|
||||
|
||||
if ($body.text().includes('Plugin Toggle')) {
|
||||
expect(
|
||||
hasPluginToggle || hasKadenceBlocks,
|
||||
'At least one blueprint plugin should be present in the plugins table',
|
||||
).to.be.true;
|
||||
|
||||
if (hasPluginToggle) {
|
||||
cy.contains('tr', 'Plugin Toggle').should('exist');
|
||||
cy.contains('tr', 'Plugin Toggle').find('.deactivate').should('exist');
|
||||
} else {
|
||||
cy.log('Plugin Toggle not found, skipping check');
|
||||
}
|
||||
|
||||
if ($body.text().includes('Kadence Blocks')) {
|
||||
if (hasKadenceBlocks) {
|
||||
cy.contains('tr', 'Kadence Blocks').find('.deactivate').should('exist');
|
||||
} else {
|
||||
cy.log('Kadence Blocks plugin not found, skipping check');
|
||||
|
||||
1180
package-lock.json
generated
1180
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
11
package.json
11
package.json
@@ -28,7 +28,7 @@
|
||||
"test:phpunit": "composer test",
|
||||
"test:phpunit:multisite": "WP_MULTISITE=1 composer test",
|
||||
"build": "./build.sh",
|
||||
"lint:js": "eslint cypress/",
|
||||
"lint:js": "eslint cypress/ cypress.config.js",
|
||||
"lint:css": "stylelint \"**/*.css\" --allow-empty-input",
|
||||
"lint:php": "composer run-script phpcs",
|
||||
"lint:php:simple": "composer run-script phpcs:simple",
|
||||
@@ -37,9 +37,10 @@
|
||||
"fix:php": "composer run-script phpcbf",
|
||||
"fix:php:simple": "composer run-script phpcbf:simple",
|
||||
"test:php": "composer run-script test",
|
||||
"lint": "composer run-script lint",
|
||||
"lint:php-all": "composer run-script lint",
|
||||
"lint": "npm run lint:php-all && npm run lint:js && npm run lint:css",
|
||||
"fix": "composer run-script fix",
|
||||
"quality": "npm run lint && npm run lint:js && npm run lint:css && npm run test:php"
|
||||
"quality": "npm run lint && npm run test:php"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -61,11 +62,11 @@
|
||||
"devDependencies": {
|
||||
"@wordpress/env": "^8.12.0",
|
||||
"@wp-playground/blueprints": "^3.0.22",
|
||||
"@wp-playground/client": "^3.0.22",
|
||||
"@wp-playground/cli": "^3.0.22",
|
||||
"@wp-playground/client": "^3.0.22",
|
||||
"cypress": "^13.17.0",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-plugin-cypress": "^2.15.1",
|
||||
"eslint-plugin-cypress": "^6.2.0",
|
||||
"stylelint": "^16.0.0",
|
||||
"stylelint-config-standard": "^36.0.0"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user