@shopware-ag/acceptance-test-suite 3.7.0 → 3.8.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 +19 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.mjs +156 -92
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -831,6 +831,23 @@ declare class CheckoutCart implements PageObject {
|
|
|
831
831
|
getLineItemByProductNumber(productNumber: string): Promise<Record<string, Locator>>;
|
|
832
832
|
}
|
|
833
833
|
|
|
834
|
+
declare class OffCanvasCart implements PageObject {
|
|
835
|
+
readonly page: Page;
|
|
836
|
+
readonly headline: Locator;
|
|
837
|
+
readonly itemCount: Locator;
|
|
838
|
+
readonly goToCheckoutButton: Locator;
|
|
839
|
+
readonly goToCartButton: Locator;
|
|
840
|
+
readonly continueShoppingButton: Locator;
|
|
841
|
+
readonly enterDiscountInput: Locator;
|
|
842
|
+
readonly submitDiscountButton: Locator;
|
|
843
|
+
readonly subTotalPrice: Locator;
|
|
844
|
+
readonly shippingCosts: Locator;
|
|
845
|
+
readonly cartQuantityNumber: Locator;
|
|
846
|
+
constructor(page: Page);
|
|
847
|
+
url(): string;
|
|
848
|
+
getLineItemByProductNumber(productNumber: string): Promise<Record<string, Locator>>;
|
|
849
|
+
}
|
|
850
|
+
|
|
834
851
|
declare class CheckoutConfirm implements PageObject {
|
|
835
852
|
readonly page: Page;
|
|
836
853
|
readonly headline: Locator;
|
|
@@ -982,6 +999,7 @@ interface StorefrontPageTypes {
|
|
|
982
999
|
StorefrontProductDetail: ProductDetail$1;
|
|
983
1000
|
StorefrontCategory: Category;
|
|
984
1001
|
StorefrontCheckoutCart: CheckoutCart;
|
|
1002
|
+
StorefrontOffCanvasCart: OffCanvasCart;
|
|
985
1003
|
StorefrontCheckoutConfirm: CheckoutConfirm;
|
|
986
1004
|
StorefrontCheckoutFinish: CheckoutFinish;
|
|
987
1005
|
StorefrontCheckoutRegister: CheckoutRegister;
|
|
@@ -999,6 +1017,7 @@ declare const StorefrontPageObjects: {
|
|
|
999
1017
|
ProductDetail: typeof ProductDetail$1;
|
|
1000
1018
|
Category: typeof Category;
|
|
1001
1019
|
CheckoutCart: typeof CheckoutCart;
|
|
1020
|
+
OffCanvasCart: typeof OffCanvasCart;
|
|
1002
1021
|
CheckoutConfirm: typeof CheckoutConfirm;
|
|
1003
1022
|
CheckoutFinish: typeof CheckoutFinish;
|
|
1004
1023
|
CheckoutRegister: typeof CheckoutRegister;
|
package/dist/index.d.ts
CHANGED
|
@@ -831,6 +831,23 @@ declare class CheckoutCart implements PageObject {
|
|
|
831
831
|
getLineItemByProductNumber(productNumber: string): Promise<Record<string, Locator>>;
|
|
832
832
|
}
|
|
833
833
|
|
|
834
|
+
declare class OffCanvasCart implements PageObject {
|
|
835
|
+
readonly page: Page;
|
|
836
|
+
readonly headline: Locator;
|
|
837
|
+
readonly itemCount: Locator;
|
|
838
|
+
readonly goToCheckoutButton: Locator;
|
|
839
|
+
readonly goToCartButton: Locator;
|
|
840
|
+
readonly continueShoppingButton: Locator;
|
|
841
|
+
readonly enterDiscountInput: Locator;
|
|
842
|
+
readonly submitDiscountButton: Locator;
|
|
843
|
+
readonly subTotalPrice: Locator;
|
|
844
|
+
readonly shippingCosts: Locator;
|
|
845
|
+
readonly cartQuantityNumber: Locator;
|
|
846
|
+
constructor(page: Page);
|
|
847
|
+
url(): string;
|
|
848
|
+
getLineItemByProductNumber(productNumber: string): Promise<Record<string, Locator>>;
|
|
849
|
+
}
|
|
850
|
+
|
|
834
851
|
declare class CheckoutConfirm implements PageObject {
|
|
835
852
|
readonly page: Page;
|
|
836
853
|
readonly headline: Locator;
|
|
@@ -982,6 +999,7 @@ interface StorefrontPageTypes {
|
|
|
982
999
|
StorefrontProductDetail: ProductDetail$1;
|
|
983
1000
|
StorefrontCategory: Category;
|
|
984
1001
|
StorefrontCheckoutCart: CheckoutCart;
|
|
1002
|
+
StorefrontOffCanvasCart: OffCanvasCart;
|
|
985
1003
|
StorefrontCheckoutConfirm: CheckoutConfirm;
|
|
986
1004
|
StorefrontCheckoutFinish: CheckoutFinish;
|
|
987
1005
|
StorefrontCheckoutRegister: CheckoutRegister;
|
|
@@ -999,6 +1017,7 @@ declare const StorefrontPageObjects: {
|
|
|
999
1017
|
ProductDetail: typeof ProductDetail$1;
|
|
1000
1018
|
Category: typeof Category;
|
|
1001
1019
|
CheckoutCart: typeof CheckoutCart;
|
|
1020
|
+
OffCanvasCart: typeof OffCanvasCart;
|
|
1002
1021
|
CheckoutConfirm: typeof CheckoutConfirm;
|
|
1003
1022
|
CheckoutFinish: typeof CheckoutFinish;
|
|
1004
1023
|
CheckoutRegister: typeof CheckoutRegister;
|
package/dist/index.mjs
CHANGED
|
@@ -370,16 +370,16 @@ const test$c = test$e.extend({
|
|
|
370
370
|
]
|
|
371
371
|
});
|
|
372
372
|
|
|
373
|
-
var __defProp$
|
|
374
|
-
var __defNormalProp$
|
|
375
|
-
var __publicField$
|
|
376
|
-
__defNormalProp$
|
|
373
|
+
var __defProp$v = Object.defineProperty;
|
|
374
|
+
var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
375
|
+
var __publicField$v = (obj, key, value) => {
|
|
376
|
+
__defNormalProp$v(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
377
377
|
return value;
|
|
378
378
|
};
|
|
379
379
|
const _AdminApiContext = class _AdminApiContext {
|
|
380
380
|
constructor(context, options) {
|
|
381
|
-
__publicField$
|
|
382
|
-
__publicField$
|
|
381
|
+
__publicField$v(this, "context");
|
|
382
|
+
__publicField$v(this, "options");
|
|
383
383
|
this.context = context;
|
|
384
384
|
this.options = options;
|
|
385
385
|
}
|
|
@@ -471,7 +471,7 @@ const _AdminApiContext = class _AdminApiContext {
|
|
|
471
471
|
return this.context.head(url, options);
|
|
472
472
|
}
|
|
473
473
|
};
|
|
474
|
-
__publicField$
|
|
474
|
+
__publicField$v(_AdminApiContext, "defaultOptions", {
|
|
475
475
|
app_url: process.env["APP_URL"],
|
|
476
476
|
client_id: process.env["SHOPWARE_ACCESS_KEY_ID"],
|
|
477
477
|
client_secret: process.env["SHOPWARE_SECRET_ACCESS_KEY"],
|
|
@@ -481,16 +481,16 @@ __publicField$u(_AdminApiContext, "defaultOptions", {
|
|
|
481
481
|
});
|
|
482
482
|
let AdminApiContext = _AdminApiContext;
|
|
483
483
|
|
|
484
|
-
var __defProp$
|
|
485
|
-
var __defNormalProp$
|
|
486
|
-
var __publicField$
|
|
487
|
-
__defNormalProp$
|
|
484
|
+
var __defProp$u = Object.defineProperty;
|
|
485
|
+
var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
486
|
+
var __publicField$u = (obj, key, value) => {
|
|
487
|
+
__defNormalProp$u(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
488
488
|
return value;
|
|
489
489
|
};
|
|
490
490
|
const _StoreApiContext = class _StoreApiContext {
|
|
491
491
|
constructor(context, options) {
|
|
492
|
-
__publicField$
|
|
493
|
-
__publicField$
|
|
492
|
+
__publicField$u(this, "context");
|
|
493
|
+
__publicField$u(this, "options");
|
|
494
494
|
this.context = context;
|
|
495
495
|
this.options = options;
|
|
496
496
|
}
|
|
@@ -549,21 +549,21 @@ const _StoreApiContext = class _StoreApiContext {
|
|
|
549
549
|
return this.context.head(url, options);
|
|
550
550
|
}
|
|
551
551
|
};
|
|
552
|
-
__publicField$
|
|
552
|
+
__publicField$u(_StoreApiContext, "defaultOptions", {
|
|
553
553
|
app_url: process.env["APP_URL"],
|
|
554
554
|
ignoreHTTPSErrors: true
|
|
555
555
|
});
|
|
556
556
|
let StoreApiContext = _StoreApiContext;
|
|
557
557
|
|
|
558
|
-
var __defProp$
|
|
559
|
-
var __defNormalProp$
|
|
560
|
-
var __publicField$
|
|
561
|
-
__defNormalProp$
|
|
558
|
+
var __defProp$t = Object.defineProperty;
|
|
559
|
+
var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
560
|
+
var __publicField$t = (obj, key, value) => {
|
|
561
|
+
__defNormalProp$t(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
562
562
|
return value;
|
|
563
563
|
};
|
|
564
564
|
class MailpitApiContext {
|
|
565
565
|
constructor(context) {
|
|
566
|
-
__publicField$
|
|
566
|
+
__publicField$t(this, "context");
|
|
567
567
|
this.context = context;
|
|
568
568
|
}
|
|
569
569
|
/**
|
|
@@ -845,17 +845,17 @@ const test$a = test$e.extend({
|
|
|
845
845
|
}
|
|
846
846
|
});
|
|
847
847
|
|
|
848
|
-
var __defProp$
|
|
849
|
-
var __defNormalProp$
|
|
850
|
-
var __publicField$
|
|
851
|
-
__defNormalProp$
|
|
848
|
+
var __defProp$s = Object.defineProperty;
|
|
849
|
+
var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
850
|
+
var __publicField$s = (obj, key, value) => {
|
|
851
|
+
__defNormalProp$s(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
852
852
|
return value;
|
|
853
853
|
};
|
|
854
854
|
class Actor {
|
|
855
855
|
constructor(name, page) {
|
|
856
|
-
__publicField$
|
|
857
|
-
__publicField$
|
|
858
|
-
__publicField$
|
|
856
|
+
__publicField$s(this, "page");
|
|
857
|
+
__publicField$s(this, "name");
|
|
858
|
+
__publicField$s(this, "expects", expect);
|
|
859
859
|
this.name = name;
|
|
860
860
|
this.page = page;
|
|
861
861
|
}
|
|
@@ -904,31 +904,31 @@ function createRandomImage(width = 800, height = 600) {
|
|
|
904
904
|
return new Image(width, height, buffer);
|
|
905
905
|
}
|
|
906
906
|
|
|
907
|
-
var __defProp$
|
|
908
|
-
var __defNormalProp$
|
|
909
|
-
var __publicField$
|
|
910
|
-
__defNormalProp$
|
|
907
|
+
var __defProp$r = Object.defineProperty;
|
|
908
|
+
var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
909
|
+
var __publicField$r = (obj, key, value) => {
|
|
910
|
+
__defNormalProp$r(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
911
911
|
return value;
|
|
912
912
|
};
|
|
913
913
|
class TestDataService {
|
|
914
914
|
constructor(AdminApiClient, IdProvider, options) {
|
|
915
|
-
__publicField$
|
|
916
|
-
__publicField$
|
|
917
|
-
__publicField$
|
|
918
|
-
__publicField$
|
|
919
|
-
__publicField$
|
|
920
|
-
__publicField$
|
|
921
|
-
__publicField$
|
|
922
|
-
__publicField$
|
|
923
|
-
__publicField$
|
|
924
|
-
__publicField$
|
|
925
|
-
__publicField$
|
|
915
|
+
__publicField$r(this, "AdminApiClient");
|
|
916
|
+
__publicField$r(this, "IdProvider");
|
|
917
|
+
__publicField$r(this, "namePrefix", "Test-");
|
|
918
|
+
__publicField$r(this, "nameSuffix", "");
|
|
919
|
+
__publicField$r(this, "defaultSalesChannel");
|
|
920
|
+
__publicField$r(this, "defaultTaxId");
|
|
921
|
+
__publicField$r(this, "defaultCurrencyId");
|
|
922
|
+
__publicField$r(this, "defaultCategoryId");
|
|
923
|
+
__publicField$r(this, "defaultLanguageId");
|
|
924
|
+
__publicField$r(this, "defaultCountryId");
|
|
925
|
+
__publicField$r(this, "defaultCustomerGroupId");
|
|
926
926
|
/**
|
|
927
927
|
* Configures if an automated cleanup of the data should be executed.
|
|
928
928
|
*
|
|
929
929
|
* @private
|
|
930
930
|
*/
|
|
931
|
-
__publicField$
|
|
931
|
+
__publicField$r(this, "shouldCleanUp", true);
|
|
932
932
|
/**
|
|
933
933
|
* Configuration of higher priority entities for the cleanup operation.
|
|
934
934
|
* These entities will be deleted before others.
|
|
@@ -936,19 +936,19 @@ class TestDataService {
|
|
|
936
936
|
*
|
|
937
937
|
* @private
|
|
938
938
|
*/
|
|
939
|
-
__publicField$
|
|
939
|
+
__publicField$r(this, "highPriorityEntities", ["order", "product"]);
|
|
940
940
|
/**
|
|
941
941
|
* A registry of all created records.
|
|
942
942
|
*
|
|
943
943
|
* @private
|
|
944
944
|
*/
|
|
945
|
-
__publicField$
|
|
945
|
+
__publicField$r(this, "createdRecords", []);
|
|
946
946
|
/**
|
|
947
947
|
* Function that generates combinations from n number of arrays
|
|
948
948
|
* with m number of elements in them.
|
|
949
949
|
* @param array
|
|
950
950
|
*/
|
|
951
|
-
__publicField$
|
|
951
|
+
__publicField$r(this, "combineAll", (array) => {
|
|
952
952
|
const result = [];
|
|
953
953
|
const max = array.length - 1;
|
|
954
954
|
const helper = (tmpArray, i) => {
|
|
@@ -2240,16 +2240,16 @@ const test$8 = test$e.extend({
|
|
|
2240
2240
|
}
|
|
2241
2241
|
});
|
|
2242
2242
|
|
|
2243
|
-
var __defProp$
|
|
2244
|
-
var __defNormalProp$
|
|
2245
|
-
var __publicField$
|
|
2246
|
-
__defNormalProp$
|
|
2243
|
+
var __defProp$q = Object.defineProperty;
|
|
2244
|
+
var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2245
|
+
var __publicField$q = (obj, key, value) => {
|
|
2246
|
+
__defNormalProp$q(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2247
2247
|
return value;
|
|
2248
2248
|
};
|
|
2249
2249
|
class IdProvider {
|
|
2250
2250
|
constructor(workerIndex, seed) {
|
|
2251
|
-
__publicField$
|
|
2252
|
-
__publicField$
|
|
2251
|
+
__publicField$q(this, "workerIndex");
|
|
2252
|
+
__publicField$q(this, "seed");
|
|
2253
2253
|
this.workerIndex = workerIndex;
|
|
2254
2254
|
this.seed = seed;
|
|
2255
2255
|
}
|
|
@@ -2311,17 +2311,17 @@ const test$7 = test$e.extend({
|
|
|
2311
2311
|
]
|
|
2312
2312
|
});
|
|
2313
2313
|
|
|
2314
|
-
var __defProp$
|
|
2315
|
-
var __defNormalProp$
|
|
2316
|
-
var __publicField$
|
|
2317
|
-
__defNormalProp$
|
|
2314
|
+
var __defProp$p = Object.defineProperty;
|
|
2315
|
+
var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2316
|
+
var __publicField$p = (obj, key, value) => {
|
|
2317
|
+
__defNormalProp$p(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2318
2318
|
return value;
|
|
2319
2319
|
};
|
|
2320
2320
|
class Home {
|
|
2321
2321
|
constructor(page) {
|
|
2322
2322
|
this.page = page;
|
|
2323
|
-
__publicField$
|
|
2324
|
-
__publicField$
|
|
2323
|
+
__publicField$p(this, "productImages");
|
|
2324
|
+
__publicField$p(this, "productListItems");
|
|
2325
2325
|
this.productImages = page.locator(".product-image-link");
|
|
2326
2326
|
this.productListItems = page.getByRole("listitem");
|
|
2327
2327
|
}
|
|
@@ -2330,26 +2330,26 @@ class Home {
|
|
|
2330
2330
|
}
|
|
2331
2331
|
}
|
|
2332
2332
|
|
|
2333
|
-
var __defProp$
|
|
2334
|
-
var __defNormalProp$
|
|
2335
|
-
var __publicField$
|
|
2336
|
-
__defNormalProp$
|
|
2333
|
+
var __defProp$o = Object.defineProperty;
|
|
2334
|
+
var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2335
|
+
var __publicField$o = (obj, key, value) => {
|
|
2336
|
+
__defNormalProp$o(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2337
2337
|
return value;
|
|
2338
2338
|
};
|
|
2339
2339
|
let ProductDetail$1 = class ProductDetail {
|
|
2340
2340
|
constructor(page) {
|
|
2341
2341
|
this.page = page;
|
|
2342
|
-
__publicField$
|
|
2343
|
-
__publicField$
|
|
2344
|
-
__publicField$
|
|
2345
|
-
__publicField$
|
|
2346
|
-
__publicField$
|
|
2347
|
-
__publicField$
|
|
2348
|
-
__publicField$
|
|
2349
|
-
__publicField$
|
|
2350
|
-
__publicField$
|
|
2351
|
-
__publicField$
|
|
2352
|
-
__publicField$
|
|
2342
|
+
__publicField$o(this, "addToCartButton");
|
|
2343
|
+
__publicField$o(this, "quantitySelect");
|
|
2344
|
+
__publicField$o(this, "productSingleImage");
|
|
2345
|
+
__publicField$o(this, "productSinglePrice");
|
|
2346
|
+
__publicField$o(this, "productPriceRangesRow");
|
|
2347
|
+
__publicField$o(this, "offCanvasCartTitle");
|
|
2348
|
+
__publicField$o(this, "offCanvasCart");
|
|
2349
|
+
__publicField$o(this, "offCanvasCartGoToCheckoutButton");
|
|
2350
|
+
__publicField$o(this, "offCanvasLineItemImages");
|
|
2351
|
+
__publicField$o(this, "offCanvasSummaryTotalPrice");
|
|
2352
|
+
__publicField$o(this, "offCanvas");
|
|
2353
2353
|
this.addToCartButton = page.getByRole("button", { name: "Add to shopping cart" });
|
|
2354
2354
|
this.quantitySelect = page.getByLabel("Quantity", { exact: true });
|
|
2355
2355
|
this.productSingleImage = page.locator(".gallery-slider-single-image");
|
|
@@ -2371,18 +2371,18 @@ let ProductDetail$1 = class ProductDetail {
|
|
|
2371
2371
|
}
|
|
2372
2372
|
};
|
|
2373
2373
|
|
|
2374
|
-
var __defProp$
|
|
2375
|
-
var __defNormalProp$
|
|
2376
|
-
var __publicField$
|
|
2377
|
-
__defNormalProp$
|
|
2374
|
+
var __defProp$n = Object.defineProperty;
|
|
2375
|
+
var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2376
|
+
var __publicField$n = (obj, key, value) => {
|
|
2377
|
+
__defNormalProp$n(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2378
2378
|
return value;
|
|
2379
2379
|
};
|
|
2380
2380
|
class Category {
|
|
2381
2381
|
constructor(page) {
|
|
2382
2382
|
this.page = page;
|
|
2383
|
-
__publicField$
|
|
2384
|
-
__publicField$
|
|
2385
|
-
__publicField$
|
|
2383
|
+
__publicField$n(this, "sortingSelect");
|
|
2384
|
+
__publicField$n(this, "firstProductBuyButton");
|
|
2385
|
+
__publicField$n(this, "noProductsFoundAlert");
|
|
2386
2386
|
this.sortingSelect = page.getByLabel("Sorting");
|
|
2387
2387
|
this.firstProductBuyButton = page.getByRole("button", { name: "Add to shopping cart" }).first();
|
|
2388
2388
|
this.noProductsFoundAlert = page.getByText("No products found.");
|
|
@@ -2392,24 +2392,24 @@ class Category {
|
|
|
2392
2392
|
}
|
|
2393
2393
|
}
|
|
2394
2394
|
|
|
2395
|
-
var __defProp$
|
|
2396
|
-
var __defNormalProp$
|
|
2397
|
-
var __publicField$
|
|
2398
|
-
__defNormalProp$
|
|
2395
|
+
var __defProp$m = Object.defineProperty;
|
|
2396
|
+
var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2397
|
+
var __publicField$m = (obj, key, value) => {
|
|
2398
|
+
__defNormalProp$m(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2399
2399
|
return value;
|
|
2400
2400
|
};
|
|
2401
2401
|
class CheckoutCart {
|
|
2402
2402
|
constructor(page) {
|
|
2403
2403
|
this.page = page;
|
|
2404
|
-
__publicField$
|
|
2405
|
-
__publicField$
|
|
2406
|
-
__publicField$
|
|
2407
|
-
__publicField$
|
|
2408
|
-
__publicField$
|
|
2409
|
-
__publicField$
|
|
2410
|
-
__publicField$
|
|
2411
|
-
__publicField$
|
|
2412
|
-
__publicField$
|
|
2404
|
+
__publicField$m(this, "headline");
|
|
2405
|
+
__publicField$m(this, "goToCheckoutButton");
|
|
2406
|
+
__publicField$m(this, "enterDiscountInput");
|
|
2407
|
+
__publicField$m(this, "grandTotalPrice");
|
|
2408
|
+
__publicField$m(this, "emptyCartAlert");
|
|
2409
|
+
__publicField$m(this, "stockReachedAlert");
|
|
2410
|
+
__publicField$m(this, "cartLineItemImages");
|
|
2411
|
+
__publicField$m(this, "unitPriceInfo");
|
|
2412
|
+
__publicField$m(this, "cartQuantityNumber");
|
|
2413
2413
|
this.headline = page.getByRole("heading", { name: "Shopping cart" });
|
|
2414
2414
|
this.goToCheckoutButton = page.getByRole("link", { name: "Go to checkout" });
|
|
2415
2415
|
this.enterDiscountInput = page.getByLabel("Discount code");
|
|
@@ -2450,6 +2450,66 @@ class CheckoutCart {
|
|
|
2450
2450
|
}
|
|
2451
2451
|
}
|
|
2452
2452
|
|
|
2453
|
+
var __defProp$l = Object.defineProperty;
|
|
2454
|
+
var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2455
|
+
var __publicField$l = (obj, key, value) => {
|
|
2456
|
+
__defNormalProp$l(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2457
|
+
return value;
|
|
2458
|
+
};
|
|
2459
|
+
class OffCanvasCart {
|
|
2460
|
+
constructor(page) {
|
|
2461
|
+
this.page = page;
|
|
2462
|
+
__publicField$l(this, "headline");
|
|
2463
|
+
__publicField$l(this, "itemCount");
|
|
2464
|
+
__publicField$l(this, "goToCheckoutButton");
|
|
2465
|
+
__publicField$l(this, "goToCartButton");
|
|
2466
|
+
__publicField$l(this, "continueShoppingButton");
|
|
2467
|
+
__publicField$l(this, "enterDiscountInput");
|
|
2468
|
+
__publicField$l(this, "submitDiscountButton");
|
|
2469
|
+
__publicField$l(this, "subTotalPrice");
|
|
2470
|
+
__publicField$l(this, "shippingCosts");
|
|
2471
|
+
__publicField$l(this, "cartQuantityNumber");
|
|
2472
|
+
this.headline = page.getByRole("heading", { name: "Shopping cart" });
|
|
2473
|
+
this.itemCount = page.locator(".offcanvas-cart-header-count");
|
|
2474
|
+
this.goToCheckoutButton = page.getByRole("link", { name: "Go to checkout" });
|
|
2475
|
+
this.goToCartButton = page.getByRole("link", { name: "Display shopping cart" });
|
|
2476
|
+
this.continueShoppingButton = page.getByRole("button", { name: "Continue shopping" });
|
|
2477
|
+
this.enterDiscountInput = page.getByPlaceholder("Enter discount code...");
|
|
2478
|
+
this.submitDiscountButton = page.locator("#addPromotionOffcanvasCart");
|
|
2479
|
+
this.subTotalPrice = page.locator('dt:has-text("Subtotal") + dd:visible');
|
|
2480
|
+
this.shippingCosts = page.locator('dt:has-text("Shipping costs") + dd:visible');
|
|
2481
|
+
this.cartQuantityNumber = page.getByLabel("Quantity", { exact: true });
|
|
2482
|
+
}
|
|
2483
|
+
url() {
|
|
2484
|
+
throw new Error("Off Canvas Cart does not have an own url.");
|
|
2485
|
+
}
|
|
2486
|
+
async getLineItemByProductNumber(productNumber) {
|
|
2487
|
+
const lineItem = this.page.locator(".line-item-product", { hasText: productNumber });
|
|
2488
|
+
const lineItemImage = lineItem.locator("line-item-img-container");
|
|
2489
|
+
const productNameLabel = lineItem.locator(".line-item-label");
|
|
2490
|
+
const productNumberLabel = lineItem.locator(".line-item-product-number");
|
|
2491
|
+
const productDeliveryDateLabel = lineItem.locator(".line-item-delivery-date");
|
|
2492
|
+
const productQuantityMinusButton = lineItem.locator(".btn-minus");
|
|
2493
|
+
const productQuantityPlusButton = lineItem.locator(".btn-plus");
|
|
2494
|
+
const productQuantityInput = lineItem.locator(".quantity-selector-group-input");
|
|
2495
|
+
const productUnitPriceValue = lineItem.locator(".line-item-unit-price-value");
|
|
2496
|
+
const productTotalPriceValue = lineItem.locator(".line-item-total-price-value");
|
|
2497
|
+
const removeButton = lineItem.locator(".line-item-remove-button");
|
|
2498
|
+
return {
|
|
2499
|
+
lineItemImage,
|
|
2500
|
+
productNameLabel,
|
|
2501
|
+
productNumberLabel,
|
|
2502
|
+
productDeliveryDateLabel,
|
|
2503
|
+
productQuantityMinusButton,
|
|
2504
|
+
productQuantityPlusButton,
|
|
2505
|
+
productQuantityInput,
|
|
2506
|
+
productUnitPriceValue,
|
|
2507
|
+
productTotalPriceValue,
|
|
2508
|
+
removeButton
|
|
2509
|
+
};
|
|
2510
|
+
}
|
|
2511
|
+
}
|
|
2512
|
+
|
|
2453
2513
|
var __defProp$k = Object.defineProperty;
|
|
2454
2514
|
var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2455
2515
|
var __publicField$k = (obj, key, value) => {
|
|
@@ -2785,6 +2845,7 @@ const StorefrontPageObjects = {
|
|
|
2785
2845
|
ProductDetail: ProductDetail$1,
|
|
2786
2846
|
Category,
|
|
2787
2847
|
CheckoutCart,
|
|
2848
|
+
OffCanvasCart,
|
|
2788
2849
|
CheckoutConfirm,
|
|
2789
2850
|
CheckoutFinish,
|
|
2790
2851
|
CheckoutRegister,
|
|
@@ -2810,6 +2871,9 @@ const test$6 = test$e.extend({
|
|
|
2810
2871
|
StorefrontCheckoutCart: async ({ StorefrontPage }, use) => {
|
|
2811
2872
|
await use(new CheckoutCart(StorefrontPage));
|
|
2812
2873
|
},
|
|
2874
|
+
StorefrontOffCanvasCart: async ({ StorefrontPage }, use) => {
|
|
2875
|
+
await use(new OffCanvasCart(StorefrontPage));
|
|
2876
|
+
},
|
|
2813
2877
|
StorefrontCheckoutConfirm: async ({ StorefrontPage }, use) => {
|
|
2814
2878
|
await use(new CheckoutConfirm(StorefrontPage));
|
|
2815
2879
|
},
|