@shopware-ag/acceptance-test-suite 12.14.0 → 12.14.1
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 +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.mjs +21 -4
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -615,6 +615,10 @@ declare class TestDataService {
|
|
|
615
615
|
* Creates a digital product with a text file as its download.
|
|
616
616
|
* The product will be added to the default sales channel category if configured.
|
|
617
617
|
*
|
|
618
|
+
* Digital products default to `maxPurchase: 1`, mirroring the Administration
|
|
619
|
+
* which forces this limit when a product is created as a digital type.
|
|
620
|
+
* Pass `maxPurchase` in the overrides to change it.
|
|
621
|
+
*
|
|
618
622
|
* @param content - The content of the text file for the product download.
|
|
619
623
|
* @param overrides - Specific data overrides that will be applied to the product data struct.
|
|
620
624
|
* @param taxId - The uuid of the tax rule to use for the product pricing.
|
|
@@ -5509,7 +5513,7 @@ declare class CustomerGroupListing implements PageObject {
|
|
|
5509
5513
|
readonly page: Page;
|
|
5510
5514
|
constructor(page: Page);
|
|
5511
5515
|
getCustomerGroupByName(customerGroup: string): Promise<Record<string, Locator>>;
|
|
5512
|
-
url(): string;
|
|
5516
|
+
url(searchTerms?: string[], page?: number): string;
|
|
5513
5517
|
}
|
|
5514
5518
|
|
|
5515
5519
|
declare class CustomerGroupCreate implements PageObject {
|
package/dist/index.d.ts
CHANGED
|
@@ -615,6 +615,10 @@ declare class TestDataService {
|
|
|
615
615
|
* Creates a digital product with a text file as its download.
|
|
616
616
|
* The product will be added to the default sales channel category if configured.
|
|
617
617
|
*
|
|
618
|
+
* Digital products default to `maxPurchase: 1`, mirroring the Administration
|
|
619
|
+
* which forces this limit when a product is created as a digital type.
|
|
620
|
+
* Pass `maxPurchase` in the overrides to change it.
|
|
621
|
+
*
|
|
618
622
|
* @param content - The content of the text file for the product download.
|
|
619
623
|
* @param overrides - Specific data overrides that will be applied to the product data struct.
|
|
620
624
|
* @param taxId - The uuid of the tax rule to use for the product pricing.
|
|
@@ -5509,7 +5513,7 @@ declare class CustomerGroupListing implements PageObject {
|
|
|
5509
5513
|
readonly page: Page;
|
|
5510
5514
|
constructor(page: Page);
|
|
5511
5515
|
getCustomerGroupByName(customerGroup: string): Promise<Record<string, Locator>>;
|
|
5512
|
-
url(): string;
|
|
5516
|
+
url(searchTerms?: string[], page?: number): string;
|
|
5513
5517
|
}
|
|
5514
5518
|
|
|
5515
5519
|
declare class CustomerGroupCreate implements PageObject {
|
package/dist/index.mjs
CHANGED
|
@@ -4293,13 +4293,17 @@ class TestDataService {
|
|
|
4293
4293
|
* Creates a digital product with a text file as its download.
|
|
4294
4294
|
* The product will be added to the default sales channel category if configured.
|
|
4295
4295
|
*
|
|
4296
|
+
* Digital products default to `maxPurchase: 1`, mirroring the Administration
|
|
4297
|
+
* which forces this limit when a product is created as a digital type.
|
|
4298
|
+
* Pass `maxPurchase` in the overrides to change it.
|
|
4299
|
+
*
|
|
4296
4300
|
* @param content - The content of the text file for the product download.
|
|
4297
4301
|
* @param overrides - Specific data overrides that will be applied to the product data struct.
|
|
4298
4302
|
* @param taxId - The uuid of the tax rule to use for the product pricing.
|
|
4299
4303
|
* @param currencyId - The uuid of the currency to use for the product pricing.
|
|
4300
4304
|
*/
|
|
4301
4305
|
async createDigitalProduct(content = "Lorem ipsum dolor", overrides = {}, taxId = this.defaultTaxId, currencyId = this.defaultCurrencyId) {
|
|
4302
|
-
const product = await this.createBasicProduct({ type: "digital", ...overrides }, taxId, currencyId);
|
|
4306
|
+
const product = await this.createBasicProduct({ type: "digital", maxPurchase: 1, ...overrides }, taxId, currencyId);
|
|
4303
4307
|
const media = await this.createMediaTXT(content);
|
|
4304
4308
|
await this.assignProductDownload(product.id, media.id);
|
|
4305
4309
|
return product;
|
|
@@ -8733,8 +8737,13 @@ class CustomerGroupListing {
|
|
|
8733
8737
|
customerGroupActionButton
|
|
8734
8738
|
};
|
|
8735
8739
|
}
|
|
8736
|
-
url() {
|
|
8737
|
-
|
|
8740
|
+
url(searchTerms = [], page = 1) {
|
|
8741
|
+
let url = "#/sw/settings/customer/group/index";
|
|
8742
|
+
if (searchTerms.length > 0) {
|
|
8743
|
+
const term = searchTerms.join("+");
|
|
8744
|
+
url += `?limit=25&page=${page}&term=${encodeURIComponent(term)}`;
|
|
8745
|
+
}
|
|
8746
|
+
return url;
|
|
8738
8747
|
}
|
|
8739
8748
|
}
|
|
8740
8749
|
|
|
@@ -12385,7 +12394,14 @@ const AddProductToCart = test$e.extend({
|
|
|
12385
12394
|
AddProductToCart: async ({ ShopCustomer, StorefrontProductDetail }, use) => {
|
|
12386
12395
|
const task = (ProductData, quantity = "1") => {
|
|
12387
12396
|
return async function AddProductToCart2() {
|
|
12388
|
-
|
|
12397
|
+
const isDownloadProduct = ProductData.type === "digital" || (ProductData.states ?? []).includes("is-download");
|
|
12398
|
+
const showsQuantitySelect = !(isDownloadProduct && ProductData.maxPurchase === 1);
|
|
12399
|
+
if (showsQuantitySelect) {
|
|
12400
|
+
await ShopCustomer.expects(StorefrontProductDetail.quantitySelect).toBeVisible();
|
|
12401
|
+
await ShopCustomer.fillsIn(StorefrontProductDetail.quantitySelect, quantity);
|
|
12402
|
+
} else {
|
|
12403
|
+
await ShopCustomer.expects(StorefrontProductDetail.quantitySelect).toBeHidden();
|
|
12404
|
+
}
|
|
12389
12405
|
await ShopCustomer.presses(StorefrontProductDetail.addToCartButton);
|
|
12390
12406
|
await ShopCustomer.expects(StorefrontProductDetail.offCanvasCartTitle).toBeVisible();
|
|
12391
12407
|
await ShopCustomer.expects(StorefrontProductDetail.offCanvasCart.getByText(ProductData.name)).toBeVisible();
|
|
@@ -12451,6 +12467,7 @@ const ConfirmTermsAndConditions = test$e.extend({
|
|
|
12451
12467
|
ConfirmTermsAndConditions: async ({ ShopCustomer, StorefrontCheckoutConfirm }, use) => {
|
|
12452
12468
|
const task = () => {
|
|
12453
12469
|
return async function ConfirmTermsAndConditions2() {
|
|
12470
|
+
await ShopCustomer.expects(StorefrontCheckoutConfirm.termsAndConditionsCheckbox.or(StorefrontCheckoutConfirm.termsAutoConfirmedText).first()).toBeVisible();
|
|
12454
12471
|
if (await StorefrontCheckoutConfirm.termsAndConditionsCheckbox.isVisible()) {
|
|
12455
12472
|
await ShopCustomer.presses(StorefrontCheckoutConfirm.termsAndConditionsCheckbox);
|
|
12456
12473
|
await ShopCustomer.expects(StorefrontCheckoutConfirm.termsAndConditionsCheckbox).toBeChecked();
|