Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
davseve committed Jan 18, 2024
1 parent c50608b commit 4d0163e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"test:php": "docker-compose run --rm wordpress_phpunit phpunit",
"test:php_multisite": "docker-compose run -e WP_MULTISITE=1 --rm wordpress_phpunit phpunit",
"test:qunit": "grunt qunit",
"test:setup:playwright": "./tests/wp-env/config/setup.sh",
"test:setup:playwright": "./tests/wp-env/config/setup.js",
"test:playwright": "playwright test -c tests/playwright/playwright.config.ts",
"test:playwright:debug": "npm run test:playwright -- --debug",
"test:playwright:elements-regression": "playwright test -c tests/elements-regression/playwright.config.ts",
Expand Down Expand Up @@ -141,6 +141,7 @@
"grunt-cli": "^1.4.3",
"html-to-image": "^1.11.11",
"mime": "^3.0.0",
"node-wp-cli": "^0.0.4",
"playwright-lighthouse": "^2.2.2",
"prop-types": "^15.8.1",
"reach-router-hash-history": "0.0.3",
Expand Down
18 changes: 18 additions & 0 deletions tests/wp-env/config/setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
const wpCli = require( 'node-wp-cli' );

wpCli.call( 'theme activate hello-elementor', { path: 'localhost:8888' }, function( err, resp ) {
if ( err ) {
throw err;
}

console.log( resp.message );
} );

wpCli.call( '--user=admin elementor library import-dir /var/www/html/elementor-templates', { path: 'localhost:8888' }, function( err, resp ) {
if ( err ) {
throw err;
}

console.log( resp.message );
} );

0 comments on commit 4d0163e

Please sign in to comment.