Removed commented sections

This commit is contained in:
Misha Utkin 2025-02-05 18:06:00 +01:00
parent 925b89bd24
commit ae7e32ec68
No known key found for this signature in database
GPG key ID: 0675AD83BAE10581
2 changed files with 149 additions and 155 deletions

View file

@ -12,6 +12,7 @@ const invalid: PcpMerchant = {
'123EFzI8FCerbL8qvMs0baJiVAqvA4SwXka3WM-WWE-o0c6b2acaGu_Q7a4n1nEGQf2-dnCgtmKLgm0AXmC', '123EFzI8FCerbL8qvMs0baJiVAqvA4SwXka3WM-WWE-o0c6b2acaGu_Q7a4n1nEGQf2-dnCgtmKLgm0AXmC',
account_id: '123MQEBC2LND7J3L', account_id: '123MQEBC2LND7J3L',
}; };
const germany: PcpMerchant = { const germany: PcpMerchant = {
email: 'sb-vzlb326615278@business.example.com', email: 'sb-vzlb326615278@business.example.com',
password: '-*Gv5z#X', password: '-*Gv5z#X',
@ -21,6 +22,7 @@ const germany: PcpMerchant = {
'EFzI8FCerbL8qvMs0baJiVAqvA4SwXka3WM-WWE-o0c6b2acaGu_Q7a4n1nEGQf2-dnCgtmKLgm0AXmC', 'EFzI8FCerbL8qvMs0baJiVAqvA4SwXka3WM-WWE-o0c6b2acaGu_Q7a4n1nEGQf2-dnCgtmKLgm0AXmC',
account_id: 'MQEBC2LND7J3L', account_id: 'MQEBC2LND7J3L',
}; };
const usa: PcpMerchant = { const usa: PcpMerchant = {
email: 'sb-hskbh29881597@business.example.com', email: 'sb-hskbh29881597@business.example.com',
password: '', password: '',
@ -31,14 +33,6 @@ const usa: PcpMerchant = {
account_id: 'RRPUW6YXX22W2', account_id: 'RRPUW6YXX22W2',
}; };
// const usa: PcpMerchant = {
// email: 'sb-1vqws26578261@business.example.com',
// password: 'xc\'#0\'Xf',
// client_id: 'ASld_H2Yc6Fpkh6Q0NZuQvckyAjAfWfm_kW-IpROgYPUhpsAxU6KCYRcEw1sf60n6xULzj4K_n_Jg_Y5',
// client_secret: 'EJ88I1fmwA7QkGvkkuYC4z1_R_M6ZfV511OpRDPI61D6TuAaCm9rULpr-wxqeVTKJfZV1Zzszj9XtDVR',
// account_id: 'QTGBXV4YCQLD6'
// };
const mexico: PcpMerchant = { const mexico: PcpMerchant = {
email: 'sb-zafdx26915775@business.example.com', email: 'sb-zafdx26915775@business.example.com',
password: 'S*j$Sty5', password: 'S*j$Sty5',

View file

@ -19,167 +19,167 @@ import {
*/ */
import { updateDotenv } from '@inpsyde/playwright-utils/build'; import { updateDotenv } from '@inpsyde/playwright-utils/build';
// setup( 'Setup Permalinks', async ( { requestUtils } ) => { setup( 'Setup Permalinks', async ( { requestUtils } ) => {
// await requestUtils.setPermalinks( '/%postname%/' ); await requestUtils.setPermalinks( '/%postname%/' );
// } ); } );
// setup( 'Setup Disable Nonce plugin (inactive)', setup( 'Setup Disable Nonce plugin (inactive)',
// async ( { requestUtils, plugins } ) => { async ( { requestUtils, plugins } ) => {
// if ( if (
// ! ( await requestUtils.isPluginInstalled( ! ( await requestUtils.isPluginInstalled(
// disableNoncePlugin.slug disableNoncePlugin.slug
// ) ) ) )
// ) { ) {
// await plugins.installPluginFromFile( await plugins.installPluginFromFile(
// disableNoncePlugin.zipFilePath disableNoncePlugin.zipFilePath
// ); );
// } }
// await requestUtils.activatePlugin( disableNoncePlugin.slug ); await requestUtils.activatePlugin( disableNoncePlugin.slug );
// } }
// ); );
// setup( 'Setup WP Debugging plugin (active)', async ( { requestUtils } ) => { setup( 'Setup WP Debugging plugin (active)', async ( { requestUtils } ) => {
// if ( if (
// ! ( await requestUtils.isPluginInstalled( wpDebuggingPlugin.slug ) ) ! ( await requestUtils.isPluginInstalled( wpDebuggingPlugin.slug ) )
// ) { ) {
// await requestUtils.installPlugin( wpDebuggingPlugin.slug ); await requestUtils.installPlugin( wpDebuggingPlugin.slug );
// } }
// await requestUtils.deactivatePlugin( wpDebuggingPlugin.slug ); await requestUtils.deactivatePlugin( wpDebuggingPlugin.slug );
// } ); } );
// setup( 'Setup Disable WooCommerce Setup Wizard Plugin (active)', setup( 'Setup Disable WooCommerce Setup Wizard Plugin (active)',
// async ( { requestUtils, plugins } ) => { async ( { requestUtils, plugins } ) => {
// if ( if (
// ! ( await requestUtils.isPluginInstalled( ! ( await requestUtils.isPluginInstalled(
// disableWcSetupWizard.slug disableWcSetupWizard.slug
// ) ) ) )
// ) { ) {
// await plugins.installPluginFromFile( await plugins.installPluginFromFile(
// disableWcSetupWizard.zipFilePath disableWcSetupWizard.zipFilePath
// ); );
// } }
// await requestUtils.activatePlugin( disableWcSetupWizard.slug ); await requestUtils.activatePlugin( disableWcSetupWizard.slug );
// } }
// ); );
// setup( 'Setup WooCommerce plugin (active)', async ( { requestUtils } ) => { setup( 'Setup WooCommerce plugin (active)', async ( { requestUtils } ) => {
// if ( ! ( await requestUtils.isPluginInstalled( 'woocommerce' ) ) ) { if ( ! ( await requestUtils.isPluginInstalled( 'woocommerce' ) ) ) {
// await requestUtils.installPlugin( 'woocommerce' ); await requestUtils.installPlugin( 'woocommerce' );
// } }
// await requestUtils.activatePlugin( 'woocommerce' ); await requestUtils.activatePlugin( 'woocommerce' );
// } ); } );
// setup( 'Setup WC Subscriptions plugin (inactive)', setup( 'Setup WC Subscriptions plugin (inactive)',
// async ( { requestUtils, plugins } ) => { async ( { requestUtils, plugins } ) => {
// if ( if (
// ! ( await requestUtils.isPluginInstalled( ! ( await requestUtils.isPluginInstalled(
// subscriptionsPlugin.slug subscriptionsPlugin.slug
// ) ) ) )
// ) { ) {
// await plugins.installPluginFromFile( await plugins.installPluginFromFile(
// subscriptionsPlugin.zipFilePath subscriptionsPlugin.zipFilePath
// ); );
// } }
// await requestUtils.deactivatePlugin( subscriptionsPlugin.slug ); await requestUtils.deactivatePlugin( subscriptionsPlugin.slug );
// } }
// ); );
// setup( 'Setup theme', async ( { requestUtils } ) => { setup( 'Setup theme', async ( { requestUtils } ) => {
// const slug = 'storefront'; const slug = 'storefront';
// if ( ! ( await requestUtils.isThemeInstalled( slug ) ) ) { if ( ! ( await requestUtils.isThemeInstalled( slug ) ) ) {
// await requestUtils.installTheme( slug ); await requestUtils.installTheme( slug );
// } }
// await requestUtils.activateTheme( slug ); await requestUtils.activateTheme( slug );
// } ); } );
// setup( 'Setup WooCommerce Live site visibility', setup( 'Setup WooCommerce Live site visibility',
// async ( { wooCommerceUtils } ) => { async ( { wooCommerceUtils } ) => {
// await wooCommerceUtils.setSiteVisibility(); await wooCommerceUtils.setSiteVisibility();
// } }
// ); );
// setup( 'Setup WooCommerce API keys', async ( { wooCommerceUtils } ) => { setup( 'Setup WooCommerce API keys', async ( { wooCommerceUtils } ) => {
// if ( ! ( await wooCommerceUtils.apiKeysExist() ) ) { if ( ! ( await wooCommerceUtils.apiKeysExist() ) ) {
// const apiKeys = await wooCommerceUtils.createApiKeys(); const apiKeys = await wooCommerceUtils.createApiKeys();
// if( ! process.env.CI ) { if( ! process.env.CI ) {
// await updateDotenv( './.env', apiKeys ); await updateDotenv( './.env', apiKeys );
// } }
// for ( const [ key, value ] of Object.entries( apiKeys ) ) { for ( const [ key, value ] of Object.entries( apiKeys ) ) {
// process.env[ key ] = value; process.env[ key ] = value;
// } }
// } }
// } ); } );
// setup( 'Setup Block and Classic pages', async ( { wooCommerceUtils } ) => { setup( 'Setup Block and Classic pages', async ( { wooCommerceUtils } ) => {
// await wooCommerceUtils.publishBlockCartPage(); await wooCommerceUtils.publishBlockCartPage();
// await wooCommerceUtils.publishBlockCheckoutPage(); await wooCommerceUtils.publishBlockCheckoutPage();
// await wooCommerceUtils.publishClassicCartPage(); await wooCommerceUtils.publishClassicCartPage();
// await wooCommerceUtils.publishClassicCheckoutPage(); await wooCommerceUtils.publishClassicCheckoutPage();
// } ); } );
// setup( 'Setup WooCommerce email settings', async ( { wooCommerceApi } ) => { setup( 'Setup WooCommerce email settings', async ( { wooCommerceApi } ) => {
// const disabled = { enabled: 'no' }; const disabled = { enabled: 'no' };
// await wooCommerceApi.updateEmailSubSettings( 'email_new_order', disabled ); await wooCommerceApi.updateEmailSubSettings( 'email_new_order', disabled );
// await wooCommerceApi.updateEmailSubSettings( 'email_cancelled_order', disabled ); await wooCommerceApi.updateEmailSubSettings( 'email_cancelled_order', disabled );
// await wooCommerceApi.updateEmailSubSettings( 'email_failed_order', disabled ); await wooCommerceApi.updateEmailSubSettings( 'email_failed_order', disabled );
// await wooCommerceApi.updateEmailSubSettings( 'email_customer_on_hold_order', disabled ); await wooCommerceApi.updateEmailSubSettings( 'email_customer_on_hold_order', disabled );
// await wooCommerceApi.updateEmailSubSettings( 'email_customer_processing_order', disabled ); await wooCommerceApi.updateEmailSubSettings( 'email_customer_processing_order', disabled );
// await wooCommerceApi.updateEmailSubSettings( 'email_customer_completed_order', disabled ); await wooCommerceApi.updateEmailSubSettings( 'email_customer_completed_order', disabled );
// await wooCommerceApi.updateEmailSubSettings( 'email_customer_refunded_order', disabled ); await wooCommerceApi.updateEmailSubSettings( 'email_customer_refunded_order', disabled );
// await wooCommerceApi.updateEmailSubSettings( 'email_customer_note', disabled ); await wooCommerceApi.updateEmailSubSettings( 'email_customer_note', disabled );
// await wooCommerceApi.updateEmailSubSettings( 'email_customer_reset_password', disabled ); await wooCommerceApi.updateEmailSubSettings( 'email_customer_reset_password', disabled );
// await wooCommerceApi.updateEmailSubSettings( 'email_customer_new_account', disabled ); await wooCommerceApi.updateEmailSubSettings( 'email_customer_new_account', disabled );
// } ); } );
// setup( 'Setup WooCommerce general settings', async ( { wooCommerceApi } ) => { setup( 'Setup WooCommerce general settings', async ( { wooCommerceApi } ) => {
// await wooCommerceApi.updateGeneralSettings( shopSettings.germany.general ); await wooCommerceApi.updateGeneralSettings( shopSettings.germany.general );
// } ); } );
// setup( 'Setup WooCommerce shipping', async ( { wooCommerceUtils } ) => { setup( 'Setup WooCommerce shipping', async ( { wooCommerceUtils } ) => {
// await wooCommerceUtils.configureShippingZone( shippingZones.worldwide ); await wooCommerceUtils.configureShippingZone( shippingZones.worldwide );
// } ); } );
// setup( 'Setup WooCommerce taxes (included)', async ( { wooCommerceUtils } ) => { setup( 'Setup WooCommerce taxes (included)', async ( { wooCommerceUtils } ) => {
// await wooCommerceUtils.setTaxes( taxSettings.including ); await wooCommerceUtils.setTaxes( taxSettings.including );
// } ); } );
// setup( 'Setup Registered Customer', async ( { wooCommerceUtils } ) => { setup( 'Setup Registered Customer', async ( { wooCommerceUtils } ) => {
// await wooCommerceUtils.createCustomer( customers.germany ); await wooCommerceUtils.createCustomer( customers.germany );
// } ); } );
// setup( 'Setup Delete Previous Orders', async ( { wooCommerceApi } ) => { setup( 'Setup Delete Previous Orders', async ( { wooCommerceApi } ) => {
// await wooCommerceApi.deleteAllOrders(); await wooCommerceApi.deleteAllOrders();
// } ); } );
// setup( 'Setup coupons', async ( { wooCommerceUtils } ) => { setup( 'Setup coupons', async ( { wooCommerceUtils } ) => {
// // create test coupons // create test coupons
// const couponItems = {}; const couponItems = {};
// const couponEntries = Object.entries( coupons ); const couponEntries = Object.entries( coupons );
// await Promise.all( await Promise.all(
// couponEntries.map( async ( [ key, coupon ] ) => { couponEntries.map( async ( [ key, coupon ] ) => {
// const createdCoupon = await wooCommerceUtils.createCoupon( coupon ); const createdCoupon = await wooCommerceUtils.createCoupon( coupon );
// couponItems[ coupon.code ] = { id: createdCoupon.id }; couponItems[ coupon.code ] = { id: createdCoupon.id };
// } ) } )
// ); );
// // store created coupons as CART_ITEMS env var // store created coupons as CART_ITEMS env var
// process.env.COUPONS = JSON.stringify( couponItems ); process.env.COUPONS = JSON.stringify( couponItems );
// } ); } );
// setup( 'Setup products', async ( { wooCommerceUtils } ) => { setup( 'Setup products', async ( { wooCommerceUtils } ) => {
// // create test products // create test products
// const cartItems = {}; const cartItems = {};
// const productEntries = Object.entries( products ); const productEntries = Object.entries( products );
// await Promise.all( await Promise.all(
// productEntries.map( async ( [ key, product ] ) => { productEntries.map( async ( [ key, product ] ) => {
// // check if not subscription product - requires Supscriptions plugin // check if not subscription product - requires Supscriptions plugin
// if ( ! product.slug.includes( 'subscription' ) ) { if ( ! product.slug.includes( 'subscription' ) ) {
// const createdProduct = await wooCommerceUtils.createProduct( const createdProduct = await wooCommerceUtils.createProduct(
// product product
// ); );
// cartItems[ product.slug ] = { id: createdProduct.id }; cartItems[ product.slug ] = { id: createdProduct.id };
// } }
// } ) } )
// ); );
// // store created products as CART_ITEMS env var // store created products as CART_ITEMS env var
// process.env.PRODUCTS = JSON.stringify( cartItems ); process.env.PRODUCTS = JSON.stringify( cartItems );
// } ); } );