From 965744ef9ff80b3b913839abdf4dc572cd485440 Mon Sep 17 00:00:00 2001 From: Misha Utkin Date: Thu, 6 Feb 2025 11:47:31 +0100 Subject: [PATCH] Update `/utils/utils.ts` - Remove irrelevant functionality - Relevant updates in spec file --- .../02-dashboard-ui/visual-default-ui.spec.ts | 1 - tests/qa/utils/utils.ts | 18 ++++-------------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/tests/qa/tests/02-dashboard-ui/visual-default-ui.spec.ts b/tests/qa/tests/02-dashboard-ui/visual-default-ui.spec.ts index 0e46192aa..f1256eba3 100644 --- a/tests/qa/tests/02-dashboard-ui/visual-default-ui.spec.ts +++ b/tests/qa/tests/02-dashboard-ui/visual-default-ui.spec.ts @@ -20,7 +20,6 @@ const percyConfig: PercyConfig = { test.beforeAll( async ( { utils } ) => { await utils.configureStore( storeConfigDefault ); await utils.configurePcp( { - clearPCPDB: true, disconnectMerchant: true, } ); } ); diff --git a/tests/qa/utils/utils.ts b/tests/qa/utils/utils.ts index 44dd00da9..9c832aff6 100644 --- a/tests/qa/utils/utils.ts +++ b/tests/qa/utils/utils.ts @@ -24,7 +24,7 @@ import { subscriptionsPlugin, wpDebuggingPlugin, pcpPlugin, - PcpMerchant, + Pcp, } from '../resources'; import { getCustomerStorageStateName } from './helpers'; @@ -151,12 +151,7 @@ export class Utils { ); }; - connectMerchant = async ( - merchant: PcpMerchant, - options = { - enablePayUponInvoice: false, - } - ) => {}; + connectMerchant = async ( merchant: Pcp.Merchant ) => {}; disconnectMerchant = async () => {}; @@ -242,7 +237,7 @@ export class Utils { } }; - configurePcp = async ( data ) => { + configurePcp = async ( data: Pcp.Admin.Config ) => { if ( ! ( await this.requestUtils.isPluginInstalled( pcpPlugin.slug ) ) ) { @@ -251,17 +246,12 @@ export class Utils { await this.requestUtils.activatePlugin( pcpPlugin.slug ); if ( data.merchant ) { - if ( data.clearPCPDB ) { - } - if ( data.disconnectMerchant ) { await this.disconnectMerchant(); return; } - await this.connectMerchant( data.merchant, { - enablePayUponInvoice: data.enablePayUponInvoice || false, - } ); + await this.connectMerchant( data.merchant ); } }; }