mirror of
https://github.com/woocommerce/woocommerce.git
synced 2025-02-23 19:01:40 +08:00
* Migrate Puppeteer test action from Blocks repo * Update file path * Use pnpm * Use npm * Updates based on feedback * Comment out paths for testing * Fix paths with working directory * Use pnpm * Fix missing pnpms * npm instead * Do use pnpm * Update command * Blocks wp-env config * Update paths, config files * Run test commands from blocks * Config update * Uncomment paths so that e2e checks only run on Blocks --------- Co-authored-by: Jon Lane <jon.lane@automattic.com>
20 lines
758 B
JavaScript
20 lines
758 B
JavaScript
const fs = require( 'fs' );
|
|
const path = require( 'path' );
|
|
|
|
const wpEnvRaw = fs.readFileSync(
|
|
path.join( __dirname, '../plugins/woocommerce-blocks/.wp-env.json' )
|
|
);
|
|
const wpEnv = JSON.parse( wpEnvRaw );
|
|
|
|
// Pin the core version to 6.2.2 for Jest E2E test so we can keep the test
|
|
// passing when new WordPress versions are released. We do this because we're
|
|
// moving to Playwright and will abandon the Jest E2E tests once the migration
|
|
// is complete.
|
|
wpEnv.core = 'WordPress/WordPress#6.4.1';
|
|
|
|
// We write the new file to .wp-env.override.json (https://developer.wordpress.org/block-editor/reference-guides/packages/packages-env/#wp-env-override-json)
|
|
fs.writeFileSync(
|
|
path.join( __dirname, '..', '.wp-env.override.json' ),
|
|
JSON.stringify( wpEnv )
|
|
);
|