@shopware-ag/acceptance-test-suite 11.4.2 → 11.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +13 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.mjs +45 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -789,6 +789,13 @@ declare class TestDataService {
|
|
|
789
789
|
* @param languageId - The uuid of the language.
|
|
790
790
|
*/
|
|
791
791
|
assignSalesChannelLanguage(salesChannelId: string, languageId: string): Promise<any>;
|
|
792
|
+
/**
|
|
793
|
+
* Assigns a payment method to a sales channel.
|
|
794
|
+
*
|
|
795
|
+
* @param salesChannelId - The uuid of the sales channel.
|
|
796
|
+
* @param paymentMethodId - The uuid of the currency.
|
|
797
|
+
*/
|
|
798
|
+
assignSalesChannelPaymentMethod(salesChannelId: string, paymentMethodId: string): Promise<any>;
|
|
792
799
|
/**
|
|
793
800
|
* Assigns a media resource to a payment method as a logo.
|
|
794
801
|
*
|
|
@@ -1420,6 +1427,12 @@ declare class CheckoutOrderEdit implements PageObject {
|
|
|
1420
1427
|
readonly shippingExpress: Locator;
|
|
1421
1428
|
constructor(page: Page);
|
|
1422
1429
|
url(orderUuid: string): string;
|
|
1430
|
+
/**
|
|
1431
|
+
* Returns the radio button element for a specified payment method.
|
|
1432
|
+
*
|
|
1433
|
+
* @param paymentMethodName - Name of the payment method on the page.
|
|
1434
|
+
*/
|
|
1435
|
+
getPaymentMethodButton(paymentMethodName: string): Locator;
|
|
1423
1436
|
}
|
|
1424
1437
|
|
|
1425
1438
|
declare class AccountAddressCreate implements PageObject {
|
package/dist/index.d.ts
CHANGED
|
@@ -789,6 +789,13 @@ declare class TestDataService {
|
|
|
789
789
|
* @param languageId - The uuid of the language.
|
|
790
790
|
*/
|
|
791
791
|
assignSalesChannelLanguage(salesChannelId: string, languageId: string): Promise<any>;
|
|
792
|
+
/**
|
|
793
|
+
* Assigns a payment method to a sales channel.
|
|
794
|
+
*
|
|
795
|
+
* @param salesChannelId - The uuid of the sales channel.
|
|
796
|
+
* @param paymentMethodId - The uuid of the currency.
|
|
797
|
+
*/
|
|
798
|
+
assignSalesChannelPaymentMethod(salesChannelId: string, paymentMethodId: string): Promise<any>;
|
|
792
799
|
/**
|
|
793
800
|
* Assigns a media resource to a payment method as a logo.
|
|
794
801
|
*
|
|
@@ -1420,6 +1427,12 @@ declare class CheckoutOrderEdit implements PageObject {
|
|
|
1420
1427
|
readonly shippingExpress: Locator;
|
|
1421
1428
|
constructor(page: Page);
|
|
1422
1429
|
url(orderUuid: string): string;
|
|
1430
|
+
/**
|
|
1431
|
+
* Returns the radio button element for a specified payment method.
|
|
1432
|
+
*
|
|
1433
|
+
* @param paymentMethodName - Name of the payment method on the page.
|
|
1434
|
+
*/
|
|
1435
|
+
getPaymentMethodButton(paymentMethodName: string): Locator;
|
|
1423
1436
|
}
|
|
1424
1437
|
|
|
1425
1438
|
declare class AccountAddressCreate implements PageObject {
|
package/dist/index.mjs
CHANGED
|
@@ -988,7 +988,7 @@ class TestDataService {
|
|
|
988
988
|
*
|
|
989
989
|
* @private
|
|
990
990
|
*/
|
|
991
|
-
__publicField$R(this, "highPriorityEntities", ["order", "product", "landing_page", "shipping_method", "sales_channel_domain", "sales_channel_currency", "sales_channel_country", "customer"]);
|
|
991
|
+
__publicField$R(this, "highPriorityEntities", ["order", "product", "landing_page", "shipping_method", "sales_channel_domain", "sales_channel_currency", "sales_channel_country", "sales_channel_payment_method", "customer"]);
|
|
992
992
|
/**
|
|
993
993
|
* A registry of all created records.
|
|
994
994
|
*
|
|
@@ -1917,6 +1917,35 @@ class TestDataService {
|
|
|
1917
1917
|
});
|
|
1918
1918
|
return salesChannel;
|
|
1919
1919
|
}
|
|
1920
|
+
/**
|
|
1921
|
+
* Assigns a payment method to a sales channel.
|
|
1922
|
+
*
|
|
1923
|
+
* @param salesChannelId - The uuid of the sales channel.
|
|
1924
|
+
* @param paymentMethodId - The uuid of the currency.
|
|
1925
|
+
*/
|
|
1926
|
+
async assignSalesChannelPaymentMethod(salesChannelId, paymentMethodId) {
|
|
1927
|
+
const syncSalesChannelResponse = await this.AdminApiClient.post("./_action/sync", {
|
|
1928
|
+
data: {
|
|
1929
|
+
"write-sales-channel-payment-method": {
|
|
1930
|
+
entity: "sales_channel_payment_method",
|
|
1931
|
+
action: "upsert",
|
|
1932
|
+
payload: [
|
|
1933
|
+
{
|
|
1934
|
+
salesChannelId,
|
|
1935
|
+
paymentMethodId
|
|
1936
|
+
}
|
|
1937
|
+
]
|
|
1938
|
+
}
|
|
1939
|
+
}
|
|
1940
|
+
});
|
|
1941
|
+
expect(syncSalesChannelResponse.ok()).toBeTruthy();
|
|
1942
|
+
const { data: salesChannel } = await syncSalesChannelResponse.json();
|
|
1943
|
+
this.addCreatedRecord("sales_channel_payment_method", {
|
|
1944
|
+
salesChannelId,
|
|
1945
|
+
paymentMethodId
|
|
1946
|
+
});
|
|
1947
|
+
return salesChannel;
|
|
1948
|
+
}
|
|
1920
1949
|
/**
|
|
1921
1950
|
* Assigns a media resource to a payment method as a logo.
|
|
1922
1951
|
*
|
|
@@ -3794,6 +3823,9 @@ class AccountOrder {
|
|
|
3794
3823
|
const orderShippingMethod = orderItem.locator(".order-table-body-value").nth(4);
|
|
3795
3824
|
const orderDetailButton = orderItem.getByRole("button", { name: /Expand|Show details/ });
|
|
3796
3825
|
const orderImage = orderItem.locator(".line-item-img-link");
|
|
3826
|
+
const taxPrice = orderItem.locator(`dt:text-matches('plus [0-9]\\+\\?% VAT') + dd`);
|
|
3827
|
+
const shippingCosts = orderItem.locator(`dt:text-matches('Shipping costs:') + dd`);
|
|
3828
|
+
const totalGross = orderItem.locator(`dt:text-matches('Total (gross):') + dd`);
|
|
3797
3829
|
return {
|
|
3798
3830
|
orderStatus,
|
|
3799
3831
|
orderHeading,
|
|
@@ -3806,7 +3838,10 @@ class AccountOrder {
|
|
|
3806
3838
|
orderPaymentMethod,
|
|
3807
3839
|
orderShippingMethod,
|
|
3808
3840
|
orderDetailButton,
|
|
3809
|
-
orderImage
|
|
3841
|
+
orderImage,
|
|
3842
|
+
taxPrice,
|
|
3843
|
+
shippingCosts,
|
|
3844
|
+
totalGross
|
|
3810
3845
|
};
|
|
3811
3846
|
}
|
|
3812
3847
|
url() {
|
|
@@ -3968,6 +4003,14 @@ class CheckoutOrderEdit {
|
|
|
3968
4003
|
url(orderUuid) {
|
|
3969
4004
|
return `account/order/edit/${orderUuid}`;
|
|
3970
4005
|
}
|
|
4006
|
+
/**
|
|
4007
|
+
* Returns the radio button element for a specified payment method.
|
|
4008
|
+
*
|
|
4009
|
+
* @param paymentMethodName - Name of the payment method on the page.
|
|
4010
|
+
*/
|
|
4011
|
+
getPaymentMethodButton(paymentMethodName) {
|
|
4012
|
+
return this.page.getByLabel(paymentMethodName);
|
|
4013
|
+
}
|
|
3971
4014
|
}
|
|
3972
4015
|
|
|
3973
4016
|
var __defProp$x = Object.defineProperty;
|