Skip to content

Commit

Permalink
fix: Revert "feat: Locators and function to change payment methods on…
Browse files Browse the repository at this point in the history
… existing orders"

This reverts commit aa2c021.
  • Loading branch information
sguder authored and ocavli committed Feb 4, 2025
1 parent 12996cb commit 4621e51
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 43 deletions.
9 changes: 0 additions & 9 deletions src/page-objects/storefront/CheckoutOrderEdit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,4 @@ export class CheckoutOrderEdit implements PageObject{
url(orderUuid: string) {
return `account/order/edit/${orderUuid}`;
}

/**
* Returns the radio button element for a specified payment method.
*
* @param paymentMethodName - The name of the payment method on the page.
*/
getPaymentMethodButton(paymentMethodName: string): Locator {
return this.page.getByLabel(paymentMethodName);
}
}
35 changes: 1 addition & 34 deletions src/services/TestDataService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export class TestDataService {
*
* @private
*/
private highPriorityEntities = ['order', 'product', 'landing_page', 'shipping_method', 'sales_channel_domain', 'sales_channel_currency', 'sales_channel_country', 'sales_channel_payment_method', 'customer'];
private highPriorityEntities = ['order', 'product', 'landing_page', 'shipping_method', 'sales_channel_domain', 'sales_channel_currency', 'sales_channel_country', 'customer'];

/**
* A registry of all created records.
Expand Down Expand Up @@ -1212,39 +1212,6 @@ export class TestDataService {
return salesChannel;
}

/**
* Assigns a payment method to a sales channel.
*
* @param salesChannelId - The uuid of the sales channel.
* @param paymentMethodId - The uuid of the currency.
*/
async assignSalesChannelPaymentMethod(salesChannelId: string, paymentMethodId: string) {
const syncSalesChannelResponse = await this.AdminApiClient.post('./_action/sync', {
data: {
'write-sales-channel-payment-method': {
entity: 'sales_channel_payment_method',
action: 'upsert',
payload: [
{
salesChannelId: salesChannelId,
paymentMethodId: paymentMethodId,
},
],
},
},
});
expect(syncSalesChannelResponse.ok()).toBeTruthy();

const { data: salesChannel } = await syncSalesChannelResponse.json();

this.addCreatedRecord('sales_channel_currency', {
salesChannelId: salesChannelId,
paymentMethodId: paymentMethodId,
});

return salesChannel;
}

/**
* Assigns a media resource to a payment method as a logo.
*
Expand Down

0 comments on commit 4621e51

Please sign in to comment.