@shopware-ag/acceptance-test-suite 11.8.1 → 11.9.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.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { test as test$e, expect, request, mergeTests } from '@playwright/test';
1
+ import { test as test$f, expect, request, mergeTests } from '@playwright/test';
2
2
  export * from '@playwright/test';
3
3
  import { Image } from 'image-js';
4
4
  import crypto from 'crypto';
@@ -8,253 +8,22 @@ import fs from 'fs';
8
8
  import { AxeBuilder } from '@axe-core/playwright';
9
9
  import { createHtmlReport } from 'axe-html-reporter';
10
10
 
11
- const getLanguageData = async (languageCode, adminApiContext) => {
12
- const resp = await adminApiContext.post("search/language", {
13
- data: {
14
- limit: 1,
15
- filter: [{
16
- type: "equals",
17
- field: "translationCode.code",
18
- value: languageCode
19
- }],
20
- associations: { translationCode: {} }
21
- }
22
- });
23
- const result = await resp.json();
24
- if (result.data.length === 0) {
25
- throw new Error(`Language ${languageCode} not found`);
26
- }
27
- return result.data[0];
28
- };
29
- const getSnippetSetId = async (languageCode, adminApiContext) => {
30
- const resp = await adminApiContext.post("search/snippet-set", {
31
- data: {
32
- limit: 1,
33
- filter: [{
34
- type: "equals",
35
- field: "iso",
36
- value: languageCode
37
- }]
38
- }
39
- });
40
- const result = await resp.json();
41
- return result.data[0].id;
42
- };
43
- const getCurrency = async (isoCode, adminApiContext) => {
44
- const resp = await adminApiContext.post("search/currency", {
45
- data: {
46
- limit: 1,
47
- filter: [{
48
- type: "equals",
49
- field: "isoCode",
50
- value: isoCode
51
- }]
52
- }
53
- });
54
- const result = await resp.json();
55
- if (result.data.length === 0) {
56
- throw new Error(`Currency ${isoCode} not found`);
57
- }
58
- return result.data[0];
59
- };
60
- const getTaxId = async (adminApiContext) => {
61
- const resp = await adminApiContext.post("search/tax", {
62
- data: { limit: 1 }
63
- });
64
- const result = await resp.json();
65
- return result.data[0].id;
66
- };
67
- const getPaymentMethodId = async (adminApiContext, handlerId) => {
68
- const handler = handlerId || "Shopware\\Core\\Checkout\\Payment\\Cart\\PaymentHandler\\InvoicePayment";
69
- const resp = await adminApiContext.post("search/payment-method", {
70
- data: {
71
- limit: 1,
72
- filter: [{
73
- type: "equals",
74
- field: "handlerIdentifier",
75
- value: handler
76
- }]
77
- }
78
- });
79
- const result = await resp.json();
80
- return result.data[0].id;
81
- };
82
- const getDefaultShippingMethodId = async (adminApiContext) => {
83
- const resp = await adminApiContext.post("search/shipping-method", {
84
- data: {
85
- limit: 1,
86
- filter: [{
87
- type: "equals",
88
- field: "name",
89
- value: "Standard"
90
- }]
91
- }
92
- });
93
- const result = await resp.json();
94
- return result.data[0].id;
95
- };
96
- const getCountryId = async (iso2, adminApiContext) => {
97
- const resp = await adminApiContext.post("search/country", {
98
- data: {
99
- limit: 1,
100
- filter: [{
101
- type: "equals",
102
- field: "iso",
103
- value: iso2
104
- }]
105
- }
106
- });
107
- const result = await resp.json();
108
- return result.data[0].id;
109
- };
110
- const getThemeId = async (technicalName, adminApiContext) => {
111
- const resp = await adminApiContext.post("search/theme", {
112
- data: {
113
- limit: 1,
114
- filter: [{
115
- type: "equals",
116
- field: "technicalName",
117
- value: technicalName
118
- }]
119
- }
120
- });
121
- const result = await resp.json();
122
- return result.data[0].id;
123
- };
124
- const getSalutationId = async (salutationKey, adminApiContext) => {
125
- const resp = await adminApiContext.post("search/salutation", {
126
- data: {
127
- limit: 1,
128
- filter: [{
129
- type: "equals",
130
- field: "salutationKey",
131
- value: salutationKey
132
- }]
133
- }
134
- });
135
- const result = await resp.json();
136
- return result.data[0].id;
137
- };
138
- const getStateMachineId = async (technicalName, adminApiContext) => {
139
- const resp = await adminApiContext.post("search/state-machine", {
140
- data: {
141
- limit: 1,
142
- filter: [{
143
- type: "equals",
144
- field: "technicalName",
145
- value: technicalName
146
- }]
147
- }
148
- });
149
- const result = await resp.json();
150
- return result.data[0].id;
151
- };
152
- const getStateMachineStateId = async (stateMachineId, adminApiContext) => {
153
- const resp = await adminApiContext.post("search/state-machine-state", {
154
- data: {
155
- limit: 1,
156
- filter: [{
157
- type: "equals",
158
- field: "stateMachineId",
159
- value: stateMachineId
160
- }]
161
- }
162
- });
163
- const result = await resp.json();
164
- return result.data[0].id;
165
- };
166
- const getFlowId = async (flowName, adminApiContext) => {
167
- const resp = await adminApiContext.post("./search/flow", {
168
- data: {
169
- limit: 1,
170
- filter: [{
171
- type: "equals",
172
- field: "name",
173
- value: flowName
174
- }]
175
- }
176
- });
177
- const result = await resp.json();
178
- return result.data[0].id;
179
- };
180
- const getOrderTransactionId = async (orderId, adminApiContext) => {
181
- const orderTransactionResponse = await adminApiContext.get(`order/${orderId}/transactions?_response`);
182
- const { data: orderTransaction } = await orderTransactionResponse.json();
183
- return orderTransaction[0].id;
184
- };
185
- const getMediaId = async (fileName, adminApiContext) => {
186
- const resp = await adminApiContext.post("./search/media", {
187
- data: {
188
- limit: 1,
189
- filter: [{
190
- type: "equals",
191
- field: "fileName",
192
- value: fileName
193
- }]
194
- }
195
- });
196
- const result = await resp.json();
197
- return result.data[0].id;
198
- };
199
- function extractIdFromUrl(url) {
200
- const segments = url.split("/");
201
- return segments.length > 0 ? segments[segments.length - 1] : null;
202
- }
203
- const setOrderStatus = async (orderId, orderStatus, adminApiContext) => {
204
- return await adminApiContext.post(`./_action/order/${orderId}/state/${orderStatus}`);
205
- };
206
- const getPromotionWithDiscount = async (promotionId, adminApiContext) => {
207
- const resp = await adminApiContext.post("search/promotion", {
208
- data: {
209
- limit: 1,
210
- associations: {
211
- discounts: {
212
- limit: 10,
213
- type: "equals",
214
- field: "promotionId",
215
- value: promotionId
216
- }
217
- },
218
- filter: [{
219
- type: "equals",
220
- field: "id",
221
- value: promotionId
222
- }]
223
- }
224
- });
225
- const { data: promotion } = await resp.json();
226
- return promotion[0];
227
- };
228
-
229
- const test$c = test$e.extend({
11
+ const test$d = test$f.extend({
230
12
  SalesChannelBaseConfig: [
231
- async ({ AdminApiContext }, use) => {
232
- const requests = {
233
- language: getLanguageData("en-GB", AdminApiContext),
234
- currencyEUR: getCurrency("EUR", AdminApiContext),
235
- invoicePaymentMethodId: getPaymentMethodId(AdminApiContext),
236
- defaultShippingMethod: getDefaultShippingMethodId(AdminApiContext),
237
- getTaxId: getTaxId(AdminApiContext),
238
- deCountryId: getCountryId("de", AdminApiContext),
239
- enGBSnippetSetId: getSnippetSetId("en-GB", AdminApiContext),
240
- defaultThemeId: getThemeId("Storefront", AdminApiContext)
241
- };
242
- await Promise.all(Object.values(requests));
243
- const lang = await requests.language;
244
- const currency = await requests.currencyEUR;
13
+ async ({ Country, Currency, Language, PaymentMethod, ShippingMethod, SnippetSet, Tax, Theme }, use) => {
245
14
  await use({
246
- enGBLocaleId: lang.translationCode.id,
247
- enGBLanguageId: lang.id,
15
+ enGBLocaleId: Language.translationCode.id,
16
+ enGBLanguageId: Language.id,
248
17
  storefrontTypeId: "8a243080f92e4c719546314b577cf82b",
249
- eurCurrencyId: currency.id,
18
+ eurCurrencyId: Currency.id,
250
19
  defaultCurrencyId: "b7d2554b0ce847cd82f3ac9bd1c0dfca",
251
20
  defaultLanguageId: "2fbb5fe2e29a4d70aa5854ce7ce3e20b",
252
- invoicePaymentMethodId: await requests.invoicePaymentMethodId,
253
- defaultShippingMethod: await requests.defaultShippingMethod,
254
- taxId: await requests.getTaxId,
255
- deCountryId: await requests.deCountryId,
256
- enGBSnippetSetId: await requests.enGBSnippetSetId,
257
- defaultThemeId: await requests.defaultThemeId,
21
+ invoicePaymentMethodId: PaymentMethod.id,
22
+ defaultShippingMethod: ShippingMethod.id,
23
+ taxId: Tax.id,
24
+ deCountryId: Country.id,
25
+ enGBSnippetSetId: SnippetSet.id,
26
+ defaultThemeId: Theme.id,
258
27
  appUrl: process.env["APP_URL"],
259
28
  adminUrl: process.env["ADMIN_URL"] || `${process.env["APP_URL"]}admin/`
260
29
  });
@@ -713,7 +482,7 @@ class MailpitApiContext {
713
482
  }
714
483
  }
715
484
 
716
- const test$b = test$e.extend({
485
+ const test$c = test$f.extend({
717
486
  AdminApiContext: [
718
487
  async ({}, use) => {
719
488
  const adminApiContext = await AdminApiContext.create();
@@ -796,7 +565,7 @@ const isThemeCompiled = async (context, storefrontUrl) => {
796
565
  return false;
797
566
  };
798
567
 
799
- const test$a = test$e.extend({
568
+ const test$b = test$f.extend({
800
569
  AdminPage: async ({ IdProvider, AdminApiContext, SalesChannelBaseConfig, browser }, use) => {
801
570
  const context = await browser.newContext({
802
571
  baseURL: SalesChannelBaseConfig.adminUrl,
@@ -872,7 +641,7 @@ const test$a = test$e.extend({
872
641
  const page = await context.newPage();
873
642
  const isSaasInstance = await isSaaSInstance(AdminApiContext);
874
643
  if (!await isThemeCompiled(AdminApiContext, DefaultSalesChannel.url)) {
875
- test$e.slow();
644
+ test$f.slow();
876
645
  await AdminApiContext.post(
877
646
  `./_action/theme/${SalesChannelBaseConfig.defaultThemeId}/assign/${salesChannel.id}`
878
647
  );
@@ -920,11 +689,11 @@ class Actor {
920
689
  }
921
690
  async attemptsTo(task) {
922
691
  const stepTitle = `${this.name} attempts to ${this.camelCaseToLowerCase(task.name)}`;
923
- await test$e.step(stepTitle, async () => await task());
692
+ await test$f.step(stepTitle, async () => await task());
924
693
  }
925
694
  async goesTo(url) {
926
695
  const stepTitle = `${this.name} navigates to "${url}"`;
927
- await test$e.step(stepTitle, async () => {
696
+ await test$f.step(stepTitle, async () => {
928
697
  await this.page.goto(url);
929
698
  await this.page.addStyleTag({
930
699
  content: `
@@ -943,7 +712,7 @@ class Actor {
943
712
  }
944
713
  }
945
714
 
946
- const test$9 = test$e.extend({
715
+ const test$a = test$f.extend({
947
716
  ShopCustomer: async ({ StorefrontPage }, use) => {
948
717
  const shopCustomer = new Actor("Shop customer", StorefrontPage);
949
718
  await use(shopCustomer);
@@ -963,6 +732,238 @@ function createRandomImage(width = 800, height = 600) {
963
732
  return new Image(width, height, buffer);
964
733
  }
965
734
 
735
+ const getLanguageData = async (languageCode, adminApiContext) => {
736
+ const resp = await adminApiContext.post("search/language", {
737
+ data: {
738
+ limit: 1,
739
+ filter: [{
740
+ type: "equals",
741
+ field: "translationCode.code",
742
+ value: languageCode
743
+ }],
744
+ associations: { translationCode: {} }
745
+ }
746
+ });
747
+ const result = await resp.json();
748
+ if (result.data.length === 0) {
749
+ throw new Error(`Language ${languageCode} not found`);
750
+ }
751
+ return result.data[0];
752
+ };
753
+ const getSnippetSetId = async (languageCode, adminApiContext) => {
754
+ const resp = await adminApiContext.post("search/snippet-set", {
755
+ data: {
756
+ limit: 1,
757
+ filter: [{
758
+ type: "equals",
759
+ field: "iso",
760
+ value: languageCode
761
+ }]
762
+ }
763
+ });
764
+ const result = await resp.json();
765
+ return result.data[0].id;
766
+ };
767
+ const getCurrency = async (isoCode, adminApiContext) => {
768
+ const resp = await adminApiContext.post("search/currency", {
769
+ data: {
770
+ limit: 1,
771
+ filter: [{
772
+ type: "equals",
773
+ field: "isoCode",
774
+ value: isoCode
775
+ }]
776
+ }
777
+ });
778
+ const result = await resp.json();
779
+ if (result.data.length === 0) {
780
+ throw new Error(`Currency ${isoCode} not found`);
781
+ }
782
+ return result.data[0];
783
+ };
784
+ const getTaxId = async (adminApiContext) => {
785
+ const resp = await adminApiContext.post("search/tax", {
786
+ data: { limit: 1 }
787
+ });
788
+ const result = await resp.json();
789
+ return result.data[0].id;
790
+ };
791
+ const getPaymentMethodId = async (adminApiContext, handlerId) => {
792
+ const handler = handlerId || "Shopware\\Core\\Checkout\\Payment\\Cart\\PaymentHandler\\InvoicePayment";
793
+ const resp = await adminApiContext.post("search/payment-method", {
794
+ data: {
795
+ limit: 1,
796
+ filter: [{
797
+ type: "equals",
798
+ field: "handlerIdentifier",
799
+ value: handler
800
+ }]
801
+ }
802
+ });
803
+ const result = await resp.json();
804
+ return result.data[0].id;
805
+ };
806
+ const getDefaultShippingMethodId = async (adminApiContext) => {
807
+ const resp = await adminApiContext.post("search/shipping-method", {
808
+ data: {
809
+ limit: 1,
810
+ filter: [{
811
+ type: "equals",
812
+ field: "name",
813
+ value: "Standard"
814
+ }]
815
+ }
816
+ });
817
+ const result = await resp.json();
818
+ return result.data[0].id;
819
+ };
820
+ const getShippingMethodId = async (name, adminApiContext) => {
821
+ const resp = await adminApiContext.post("search/shipping-method", {
822
+ data: {
823
+ limit: 1,
824
+ filter: [{
825
+ type: "equals",
826
+ field: "name",
827
+ value: name
828
+ }]
829
+ }
830
+ });
831
+ const result = await resp.json();
832
+ return result.data[0].id;
833
+ };
834
+ const getCountryId = async (iso2, adminApiContext) => {
835
+ const resp = await adminApiContext.post("search/country", {
836
+ data: {
837
+ limit: 1,
838
+ filter: [{
839
+ type: "equals",
840
+ field: "iso",
841
+ value: iso2
842
+ }]
843
+ }
844
+ });
845
+ const result = await resp.json();
846
+ return result.data[0].id;
847
+ };
848
+ const getThemeId = async (technicalName, adminApiContext) => {
849
+ const resp = await adminApiContext.post("search/theme", {
850
+ data: {
851
+ limit: 1,
852
+ filter: [{
853
+ type: "equals",
854
+ field: "technicalName",
855
+ value: technicalName
856
+ }]
857
+ }
858
+ });
859
+ const result = await resp.json();
860
+ return result.data[0].id;
861
+ };
862
+ const getSalutationId = async (salutationKey, adminApiContext) => {
863
+ const resp = await adminApiContext.post("search/salutation", {
864
+ data: {
865
+ limit: 1,
866
+ filter: [{
867
+ type: "equals",
868
+ field: "salutationKey",
869
+ value: salutationKey
870
+ }]
871
+ }
872
+ });
873
+ const result = await resp.json();
874
+ return result.data[0].id;
875
+ };
876
+ const getStateMachineId = async (technicalName, adminApiContext) => {
877
+ const resp = await adminApiContext.post("search/state-machine", {
878
+ data: {
879
+ limit: 1,
880
+ filter: [{
881
+ type: "equals",
882
+ field: "technicalName",
883
+ value: technicalName
884
+ }]
885
+ }
886
+ });
887
+ const result = await resp.json();
888
+ return result.data[0].id;
889
+ };
890
+ const getStateMachineStateId = async (stateMachineId, adminApiContext) => {
891
+ const resp = await adminApiContext.post("search/state-machine-state", {
892
+ data: {
893
+ limit: 1,
894
+ filter: [{
895
+ type: "equals",
896
+ field: "stateMachineId",
897
+ value: stateMachineId
898
+ }]
899
+ }
900
+ });
901
+ const result = await resp.json();
902
+ return result.data[0].id;
903
+ };
904
+ const getFlowId = async (flowName, adminApiContext) => {
905
+ const resp = await adminApiContext.post("./search/flow", {
906
+ data: {
907
+ limit: 1,
908
+ filter: [{
909
+ type: "equals",
910
+ field: "name",
911
+ value: flowName
912
+ }]
913
+ }
914
+ });
915
+ const result = await resp.json();
916
+ return result.data[0].id;
917
+ };
918
+ const getOrderTransactionId = async (orderId, adminApiContext) => {
919
+ const orderTransactionResponse = await adminApiContext.get(`order/${orderId}/transactions?_response`);
920
+ const { data: orderTransaction } = await orderTransactionResponse.json();
921
+ return orderTransaction[0].id;
922
+ };
923
+ const getMediaId = async (fileName, adminApiContext) => {
924
+ const resp = await adminApiContext.post("./search/media", {
925
+ data: {
926
+ limit: 1,
927
+ filter: [{
928
+ type: "equals",
929
+ field: "fileName",
930
+ value: fileName
931
+ }]
932
+ }
933
+ });
934
+ const result = await resp.json();
935
+ return result.data[0].id;
936
+ };
937
+ function extractIdFromUrl(url) {
938
+ const segments = url.split("/");
939
+ return segments.length > 0 ? segments[segments.length - 1] : null;
940
+ }
941
+ const setOrderStatus = async (orderId, orderStatus, adminApiContext) => {
942
+ return await adminApiContext.post(`./_action/order/${orderId}/state/${orderStatus}`);
943
+ };
944
+ const getPromotionWithDiscount = async (promotionId, adminApiContext) => {
945
+ const resp = await adminApiContext.post("search/promotion", {
946
+ data: {
947
+ limit: 1,
948
+ associations: {
949
+ discounts: {
950
+ limit: 10,
951
+ type: "equals",
952
+ field: "promotionId",
953
+ value: promotionId
954
+ }
955
+ },
956
+ filter: [{
957
+ type: "equals",
958
+ field: "id",
959
+ value: promotionId
960
+ }]
961
+ }
962
+ });
963
+ const { data: promotion } = await resp.json();
964
+ return promotion[0];
965
+ };
966
+
966
967
  var __defProp$U = Object.defineProperty;
967
968
  var __defNormalProp$U = (obj, key, value) => key in obj ? __defProp$U(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
968
969
  var __publicField$U = (obj, key, value) => {
@@ -3131,7 +3132,7 @@ class TestDataService {
3131
3132
  }
3132
3133
  }
3133
3134
 
3134
- const test$8 = test$e.extend({
3135
+ const test$9 = test$f.extend({
3135
3136
  TestDataService: async ({ AdminApiContext, IdProvider, DefaultSalesChannel, SalesChannelBaseConfig }, use) => {
3136
3137
  const DataService = new TestDataService(AdminApiContext, IdProvider, {
3137
3138
  defaultSalesChannel: DefaultSalesChannel.salesChannel,
@@ -3185,7 +3186,7 @@ class IdProvider {
3185
3186
  }
3186
3187
  }
3187
3188
 
3188
- const test$7 = test$e.extend({
3189
+ const test$8 = test$f.extend({
3189
3190
  IdProvider: [
3190
3191
  async ({}, use, workerInfo) => {
3191
3192
  const seed = process.env.SHOPWARE_ACCESS_KEY_ID || process.env.SHOPWARE_ADMIN_PASSWORD || "test-suite";
@@ -3197,7 +3198,7 @@ const test$7 = test$e.extend({
3197
3198
  SaaSInstanceSetup: [
3198
3199
  async ({ AdminApiContext: context }, use) => {
3199
3200
  const SetupInstance = async function SetupInstance2() {
3200
- await test$7.skip(!await isSaaSInstance(context), "Skipping SaaS setup, could not detect SaaS instance");
3201
+ await test$8.skip(!await isSaaSInstance(context), "Skipping SaaS setup, could not detect SaaS instance");
3201
3202
  expect(context.options.admin_username, "setup requires admin user credentials").toEqual(expect.any(String));
3202
3203
  expect(context.options.admin_password, "setup requires admin user credentials").toEqual(expect.any(String));
3203
3204
  const instanceStatusResponse = await context.get("./instance/status");
@@ -4057,7 +4058,7 @@ class AccountAddresses {
4057
4058
  this.deliveryNotPossibleAlert = this.availableAddresses.getByText("A delivery to this country is not possible.");
4058
4059
  } else {
4059
4060
  this.availableAddresses = page.locator(".address-manager-list-wrapper");
4060
- this.addressDropdownButton = this.availableAddresses.locator("#dropdownMenuButton");
4061
+ this.addressDropdownButton = this.availableAddresses.getByRole("button", { name: "Address options" }).first();
4061
4062
  this.availableAddressesUseAsBillingAddress = this.availableAddresses.getByRole("button", { name: "Use as default billing address" });
4062
4063
  this.availableAddressesUseAsShippingAddress = this.availableAddresses.getByRole("button", { name: "Use as default shipping address" });
4063
4064
  }
@@ -4399,7 +4400,7 @@ const StorefrontPageObjects = {
4399
4400
  ContactForm,
4400
4401
  Wishlist
4401
4402
  };
4402
- const test$6 = test$e.extend({
4403
+ const test$7 = test$f.extend({
4403
4404
  StorefrontHome: async ({ StorefrontPage }, use) => {
4404
4405
  await use(new Home(StorefrontPage));
4405
4406
  },
@@ -6126,7 +6127,7 @@ const AdminPageObjects = {
6126
6127
  ProductBulkEdit,
6127
6128
  CustomerBulkEdit
6128
6129
  };
6129
- const test$5 = test$e.extend({
6130
+ const test$6 = test$f.extend({
6130
6131
  AdminProductDetail: async ({ AdminPage, InstanceMeta }, use) => {
6131
6132
  await use(new ProductDetail(AdminPage, InstanceMeta));
6132
6133
  },
@@ -6225,7 +6226,7 @@ const test$5 = test$e.extend({
6225
6226
  }
6226
6227
  });
6227
6228
 
6228
- const ProductData = test$e.extend({
6229
+ const ProductData = test$f.extend({
6229
6230
  ProductData: async ({ IdProvider, SalesChannelBaseConfig, AdminApiContext, DefaultSalesChannel }, use) => {
6230
6231
  const { id: productId, uuid: productUuid } = IdProvider.getIdPair();
6231
6232
  const productName = `Product_test_${productId}`;
@@ -6274,7 +6275,7 @@ const ProductData = test$e.extend({
6274
6275
  }
6275
6276
  });
6276
6277
 
6277
- const CategoryData = test$e.extend({
6278
+ const CategoryData = test$f.extend({
6278
6279
  CategoryData: async ({ IdProvider, AdminApiContext, DefaultSalesChannel, ProductData }, use) => {
6279
6280
  const { id: categoryId, uuid: categoryUuid } = IdProvider.getIdPair();
6280
6281
  const categoryName = `Category-${categoryId}`;
@@ -6301,7 +6302,7 @@ const CategoryData = test$e.extend({
6301
6302
  }
6302
6303
  });
6303
6304
 
6304
- const DigitalProductData = test$e.extend({
6305
+ const DigitalProductData = test$f.extend({
6305
6306
  DigitalProductData: async ({ ProductData, IdProvider, AdminApiContext }, use) => {
6306
6307
  const newMediaResource = await AdminApiContext.post("./media?_response", {
6307
6308
  data: {
@@ -6356,7 +6357,7 @@ const DigitalProductData = test$e.extend({
6356
6357
  }
6357
6358
  });
6358
6359
 
6359
- const PropertiesData = test$e.extend({
6360
+ const PropertiesData = test$f.extend({
6360
6361
  PropertiesData: async ({ AdminApiContext }, use) => {
6361
6362
  const propertyGroupColorResponse = await AdminApiContext.post("property-group?_response=1", {
6362
6363
  data: {
@@ -6406,7 +6407,7 @@ const PropertiesData = test$e.extend({
6406
6407
  }
6407
6408
  });
6408
6409
 
6409
- const CartWithProductData = test$e.extend({
6410
+ const CartWithProductData = test$f.extend({
6410
6411
  CartWithProductData: async ({ StoreApiContext, DefaultSalesChannel, ProductData }, use) => {
6411
6412
  await StoreApiContext.login(DefaultSalesChannel.customer);
6412
6413
  const cartResponse = await StoreApiContext.post("checkout/cart", {
@@ -6432,7 +6433,7 @@ const CartWithProductData = test$e.extend({
6432
6433
  }
6433
6434
  });
6434
6435
 
6435
- const PromotionWithCodeData = test$e.extend({
6436
+ const PromotionWithCodeData = test$f.extend({
6436
6437
  PromotionWithCodeData: async ({ AdminApiContext, DefaultSalesChannel, IdProvider }, use) => {
6437
6438
  const promotionCode = `${IdProvider.getIdPair().id}`;
6438
6439
  const promotionName = `Test Promotion ${promotionCode}`;
@@ -6474,7 +6475,7 @@ const PromotionWithCodeData = test$e.extend({
6474
6475
  }
6475
6476
  });
6476
6477
 
6477
- const MediaData = test$e.extend({
6478
+ const MediaData = test$f.extend({
6478
6479
  MediaData: async ({ AdminApiContext, IdProvider }, use) => {
6479
6480
  const imageId = IdProvider.getIdPair().id;
6480
6481
  const imageFilePath = `./tmp/image-${imageId}.png`;
@@ -6521,7 +6522,7 @@ const MediaData = test$e.extend({
6521
6522
  }
6522
6523
  });
6523
6524
 
6524
- const OrderData = test$e.extend({
6525
+ const OrderData = test$f.extend({
6525
6526
  OrderData: async ({ IdProvider, AdminApiContext, SalesChannelBaseConfig, DefaultSalesChannel, ProductData }, use) => {
6526
6527
  const requests = {
6527
6528
  currencyEUR: getCurrency("EUR", AdminApiContext),
@@ -6738,7 +6739,7 @@ const OrderData = test$e.extend({
6738
6739
  }
6739
6740
  });
6740
6741
 
6741
- const TagData = test$e.extend({
6742
+ const TagData = test$f.extend({
6742
6743
  TagData: async ({ IdProvider, AdminApiContext }, use) => {
6743
6744
  const tagUUID = IdProvider.getIdPair().uuid;
6744
6745
  const tagId = IdProvider.getIdPair().id;
@@ -6757,7 +6758,7 @@ const TagData = test$e.extend({
6757
6758
  }
6758
6759
  });
6759
6760
 
6760
- const test$4 = mergeTests(
6761
+ const test$5 = mergeTests(
6761
6762
  ProductData,
6762
6763
  CategoryData,
6763
6764
  DigitalProductData,
@@ -6769,7 +6770,7 @@ const test$4 = mergeTests(
6769
6770
  TagData
6770
6771
  );
6771
6772
 
6772
- const SaveProduct = test$e.extend({
6773
+ const SaveProduct = test$f.extend({
6773
6774
  SaveProduct: async ({ ShopAdmin, AdminProductDetail }, use) => {
6774
6775
  const task = () => {
6775
6776
  return async function SaveProduct2() {
@@ -6787,7 +6788,7 @@ const SaveProduct = test$e.extend({
6787
6788
  }
6788
6789
  });
6789
6790
 
6790
- const ExpectNotification = test$e.extend({
6791
+ const ExpectNotification = test$f.extend({
6791
6792
  ExpectNotification: async ({ ShopAdmin }, use) => {
6792
6793
  const task = (message, close = true) => {
6793
6794
  return async function ExpectNotification2() {
@@ -6803,7 +6804,7 @@ const ExpectNotification = test$e.extend({
6803
6804
  }
6804
6805
  });
6805
6806
 
6806
- const CreateLinkTypeCategory = test$e.extend({
6807
+ const CreateLinkTypeCategory = test$f.extend({
6807
6808
  CreateLinkTypeCategory: async ({ AdminCategories, AdminCategoryDetail, TestDataService }, use) => {
6808
6809
  const task = (categoryData, categoryCustomizableLinkData, parentCategoryName) => {
6809
6810
  return async function CreateLinkTypeCategory2() {
@@ -6854,7 +6855,7 @@ const CreateLinkTypeCategory = test$e.extend({
6854
6855
  }
6855
6856
  });
6856
6857
 
6857
- const BulkEditProducts = test$e.extend({
6858
+ const BulkEditProducts = test$f.extend({
6858
6859
  BulkEditProducts: async ({ AdminProductBulkEdit, AdminProductListing }, use) => {
6859
6860
  const task = (products, changes) => {
6860
6861
  return async function BulkEditProducts2() {
@@ -6953,7 +6954,7 @@ const BulkEditProducts = test$e.extend({
6953
6954
  }
6954
6955
  });
6955
6956
 
6956
- const BulkEditCustomers = test$e.extend({
6957
+ const BulkEditCustomers = test$f.extend({
6957
6958
  BulkEditCustomers: async ({ ShopAdmin, AdminCustomerListing, AdminCustomerBulkEdit }, use) => {
6958
6959
  const task = (customers, accountData, tagData, customFieldData) => {
6959
6960
  return async function BulkEditCustomers2() {
@@ -7032,7 +7033,7 @@ var RuleType = /* @__PURE__ */ ((RuleType2) => {
7032
7033
  return RuleType2;
7033
7034
  })(RuleType || {});
7034
7035
 
7035
- const AssignEntitiesToRule = test$e.extend({
7036
+ const AssignEntitiesToRule = test$f.extend({
7036
7037
  AssignEntitiesToRule: async ({ AdminRuleDetail }, use) => {
7037
7038
  const task = (assignableEntities) => {
7038
7039
  return async function AssignEntitiesToRule2() {
@@ -7073,7 +7074,7 @@ const AssignEntitiesToRule = test$e.extend({
7073
7074
  }
7074
7075
  });
7075
7076
 
7076
- const test$3 = mergeTests(
7077
+ const test$4 = mergeTests(
7077
7078
  SaveProduct,
7078
7079
  ExpectNotification,
7079
7080
  CreateLinkTypeCategory,
@@ -7082,7 +7083,7 @@ const test$3 = mergeTests(
7082
7083
  AssignEntitiesToRule
7083
7084
  );
7084
7085
 
7085
- const Login = test$e.extend({
7086
+ const Login = test$f.extend({
7086
7087
  Login: async ({ ShopCustomer, DefaultSalesChannel, StorefrontAccountLogin, StorefrontAccount }, use) => {
7087
7088
  const task = (customCustomer) => {
7088
7089
  return async function Login2() {
@@ -7098,7 +7099,7 @@ const Login = test$e.extend({
7098
7099
  }
7099
7100
  });
7100
7101
 
7101
- const Logout = test$e.extend({
7102
+ const Logout = test$f.extend({
7102
7103
  Logout: async ({ ShopCustomer, StorefrontAccountLogin }, use) => {
7103
7104
  const task = () => {
7104
7105
  return async function Logout2() {
@@ -7112,7 +7113,7 @@ const Logout = test$e.extend({
7112
7113
  }
7113
7114
  });
7114
7115
 
7115
- const Register = test$e.extend({
7116
+ const Register = test$f.extend({
7116
7117
  Register: async ({ StorefrontAccountLogin, IdProvider, TestDataService }, use) => {
7117
7118
  let registeredEmail = "";
7118
7119
  const defaultRegistrationData = {
@@ -7162,7 +7163,7 @@ const Register = test$e.extend({
7162
7163
  }
7163
7164
  });
7164
7165
 
7165
- const RegisterGuest = test$e.extend({
7166
+ const RegisterGuest = test$f.extend({
7166
7167
  RegisterGuest: async ({ StorefrontAccountLogin, AdminApiContext }, use) => {
7167
7168
  const registrationData = {
7168
7169
  firstName: "Jeff",
@@ -7210,7 +7211,7 @@ const RegisterGuest = test$e.extend({
7210
7211
  }
7211
7212
  });
7212
7213
 
7213
- const ChangeStorefrontCurrency = test$e.extend({
7214
+ const ChangeStorefrontCurrency = test$f.extend({
7214
7215
  ChangeStorefrontCurrency: async ({ StorefrontHome }, use) => {
7215
7216
  const task = (isoCode) => {
7216
7217
  return async function ChangeStorefrontCurrency2() {
@@ -7222,7 +7223,7 @@ const ChangeStorefrontCurrency = test$e.extend({
7222
7223
  }
7223
7224
  });
7224
7225
 
7225
- const AddNewAddress = test$e.extend({
7226
+ const AddNewAddress = test$f.extend({
7226
7227
  AddNewAddress: async ({ StorefrontAccountAddresses, StorefrontAccountAddressCreate }, use) => {
7227
7228
  const task = (address) => {
7228
7229
  return async function AddNewAddress2() {
@@ -7245,7 +7246,7 @@ const AddNewAddress = test$e.extend({
7245
7246
  }
7246
7247
  });
7247
7248
 
7248
- const AddProductToCart = test$e.extend({
7249
+ const AddProductToCart = test$f.extend({
7249
7250
  AddProductToCart: async ({ ShopCustomer, StorefrontProductDetail }, use) => {
7250
7251
  const task = (ProductData, quantity = "1") => {
7251
7252
  return async function AddProductToCart2() {
@@ -7259,7 +7260,7 @@ const AddProductToCart = test$e.extend({
7259
7260
  }
7260
7261
  });
7261
7262
 
7262
- const ProceedFromProductToCheckout = test$e.extend({
7263
+ const ProceedFromProductToCheckout = test$f.extend({
7263
7264
  ProceedFromProductToCheckout: async ({ ShopCustomer, StorefrontProductDetail, StorefrontCheckoutConfirm }, use) => {
7264
7265
  const task = () => {
7265
7266
  return async function ProceedFromProductToCheckout2() {
@@ -7271,7 +7272,7 @@ const ProceedFromProductToCheckout = test$e.extend({
7271
7272
  }
7272
7273
  });
7273
7274
 
7274
- const ProceedFromCartToCheckout = test$e.extend({
7275
+ const ProceedFromCartToCheckout = test$f.extend({
7275
7276
  ProceedFromCartToCheckout: async ({
7276
7277
  ShopCustomer,
7277
7278
  StorefrontCheckoutCart,
@@ -7287,7 +7288,7 @@ const ProceedFromCartToCheckout = test$e.extend({
7287
7288
  }
7288
7289
  });
7289
7290
 
7290
- const ChangeProductQuantity = test$e.extend({
7291
+ const ChangeProductQuantity = test$f.extend({
7291
7292
  ChangeProductQuantity: async ({
7292
7293
  ShopCustomer,
7293
7294
  StorefrontCheckoutCart
@@ -7303,7 +7304,7 @@ const ChangeProductQuantity = test$e.extend({
7303
7304
  }
7304
7305
  });
7305
7306
 
7306
- const ConfirmTermsAndConditions = test$e.extend({
7307
+ const ConfirmTermsAndConditions = test$f.extend({
7307
7308
  ConfirmTermsAndConditions: async ({ ShopCustomer, StorefrontCheckoutConfirm }, use) => {
7308
7309
  const task = () => {
7309
7310
  return async function ConfirmTermsAndConditions2() {
@@ -7315,7 +7316,7 @@ const ConfirmTermsAndConditions = test$e.extend({
7315
7316
  }
7316
7317
  });
7317
7318
 
7318
- const SelectCashOnDeliveryPaymentOption = test$e.extend({
7319
+ const SelectCashOnDeliveryPaymentOption = test$f.extend({
7319
7320
  SelectCashOnDeliveryPaymentOption: async ({ ShopCustomer, StorefrontCheckoutConfirm }, use) => {
7320
7321
  const task = () => {
7321
7322
  return async function SelectCashOnDeliveryPaymentOption2() {
@@ -7327,7 +7328,7 @@ const SelectCashOnDeliveryPaymentOption = test$e.extend({
7327
7328
  }
7328
7329
  });
7329
7330
 
7330
- const SelectInvoicePaymentOption = test$e.extend({
7331
+ const SelectInvoicePaymentOption = test$f.extend({
7331
7332
  SelectInvoicePaymentOption: async ({ ShopCustomer, StorefrontCheckoutConfirm }, use) => {
7332
7333
  const task = () => {
7333
7334
  return async function SelectInvoicePaymentOption2() {
@@ -7339,7 +7340,7 @@ const SelectInvoicePaymentOption = test$e.extend({
7339
7340
  }
7340
7341
  });
7341
7342
 
7342
- const SelectPaidInAdvancePaymentOption = test$e.extend({
7343
+ const SelectPaidInAdvancePaymentOption = test$f.extend({
7343
7344
  SelectPaidInAdvancePaymentOption: async ({ ShopCustomer, StorefrontCheckoutConfirm }, use) => {
7344
7345
  const task = () => {
7345
7346
  return async function SelectPaidInAdvancePaymentOption2() {
@@ -7351,7 +7352,7 @@ const SelectPaidInAdvancePaymentOption = test$e.extend({
7351
7352
  }
7352
7353
  });
7353
7354
 
7354
- const SelectStandardShippingOption = test$e.extend({
7355
+ const SelectStandardShippingOption = test$f.extend({
7355
7356
  SelectStandardShippingOption: async ({ ShopCustomer, StorefrontCheckoutConfirm }, use) => {
7356
7357
  const task = () => {
7357
7358
  return async function SelectStandardShippingOption2() {
@@ -7363,7 +7364,7 @@ const SelectStandardShippingOption = test$e.extend({
7363
7364
  }
7364
7365
  });
7365
7366
 
7366
- const SelectExpressShippingOption = test$e.extend({
7367
+ const SelectExpressShippingOption = test$f.extend({
7367
7368
  SelectExpressShippingOption: async ({ ShopCustomer, StorefrontCheckoutConfirm }, use) => {
7368
7369
  const task = () => {
7369
7370
  return async function SelectExpressShippingOption2() {
@@ -7375,7 +7376,7 @@ const SelectExpressShippingOption = test$e.extend({
7375
7376
  }
7376
7377
  });
7377
7378
 
7378
- const SubmitOrder = test$e.extend({
7379
+ const SubmitOrder = test$f.extend({
7379
7380
  SubmitOrder: async ({ ShopCustomer, StorefrontCheckoutConfirm, StorefrontCheckoutFinish }, use) => {
7380
7381
  const task = () => {
7381
7382
  return async function SubmitOrder2() {
@@ -7387,7 +7388,7 @@ const SubmitOrder = test$e.extend({
7387
7388
  }
7388
7389
  });
7389
7390
 
7390
- const OpenSearchResultPage = test$e.extend({
7391
+ const OpenSearchResultPage = test$f.extend({
7391
7392
  OpenSearchResultPage: async ({ StorefrontSearch }, use) => {
7392
7393
  const task = (searchTerm) => {
7393
7394
  return async function OpenSearchResultPage2() {
@@ -7399,7 +7400,7 @@ const OpenSearchResultPage = test$e.extend({
7399
7400
  }
7400
7401
  });
7401
7402
 
7402
- const OpenSearchSuggestPage = test$e.extend({
7403
+ const OpenSearchSuggestPage = test$f.extend({
7403
7404
  OpenSearchSuggestPage: async ({ StorefrontSearchSuggest }, use) => {
7404
7405
  const task = (searchTerm) => {
7405
7406
  return async function OpenSearchSuggestPage2() {
@@ -7411,7 +7412,7 @@ const OpenSearchSuggestPage = test$e.extend({
7411
7412
  }
7412
7413
  });
7413
7414
 
7414
- const SearchForTerm = test$e.extend({
7415
+ const SearchForTerm = test$f.extend({
7415
7416
  SearchForTerm: async ({ StorefrontSearchSuggest }, use) => {
7416
7417
  const task = (searchTerm) => {
7417
7418
  return async function SearchForTerm2() {
@@ -7423,7 +7424,7 @@ const SearchForTerm = test$e.extend({
7423
7424
  }
7424
7425
  });
7425
7426
 
7426
- const ValidateAccessibility = test$e.extend({
7427
+ const ValidateAccessibility = test$f.extend({
7427
7428
  ValidateAccessibility: async ({ ShopCustomer }, use) => {
7428
7429
  const task = (pageName, assertViolations = true, createReport = true, ruleTags = ["wcag2a", "wcag2aa", "wcag2aaa", "wcag21a", "wcag21aa", "best-practice"], outputDir = "test-results/AccessibilityReports") => {
7429
7430
  return async function ValidateAccessibility2() {
@@ -7452,7 +7453,7 @@ const ValidateAccessibility = test$e.extend({
7452
7453
  }
7453
7454
  });
7454
7455
 
7455
- const AddProductToCartFromWishlist = test$e.extend({
7456
+ const AddProductToCartFromWishlist = test$f.extend({
7456
7457
  AddProductToCartFromWishlist: async ({ ShopCustomer, StorefrontWishlist, StorefrontOffCanvasCart }, use) => {
7457
7458
  const task = (ProductData) => {
7458
7459
  return async function AddProductToCartFromWishlist2() {
@@ -7469,7 +7470,7 @@ const AddProductToCartFromWishlist = test$e.extend({
7469
7470
  await use(task);
7470
7471
  }
7471
7472
  });
7472
- const RemoveProductFromWishlist = test$e.extend({
7473
+ const RemoveProductFromWishlist = test$f.extend({
7473
7474
  RemoveProductFromWishlist: async ({ StorefrontHome, StorefrontWishlist }, use) => {
7474
7475
  const task = (ProductData) => {
7475
7476
  return async function RemoveProductFromWishlist2() {
@@ -7481,7 +7482,7 @@ const RemoveProductFromWishlist = test$e.extend({
7481
7482
  await use(task);
7482
7483
  }
7483
7484
  });
7484
- const AddProductToWishlist = test$e.extend({
7485
+ const AddProductToWishlist = test$f.extend({
7485
7486
  AddProductToWishlist: async ({ StorefrontHome, ShopCustomer }, use) => {
7486
7487
  const task = (ProductData) => {
7487
7488
  return async function AddProductToWishlist2() {
@@ -7494,7 +7495,7 @@ const AddProductToWishlist = test$e.extend({
7494
7495
  }
7495
7496
  });
7496
7497
 
7497
- const test$2 = mergeTests(
7498
+ const test$3 = mergeTests(
7498
7499
  Login,
7499
7500
  Logout,
7500
7501
  Register,
@@ -7615,7 +7616,7 @@ class FeatureService {
7615
7616
  }
7616
7617
  }
7617
7618
 
7618
- const test$1 = test$e.extend({
7619
+ const test$2 = test$f.extend({
7619
7620
  FeatureService: async ({ AdminApiContext }, use) => {
7620
7621
  const service = new FeatureService(AdminApiContext);
7621
7622
  await use(service);
@@ -7623,19 +7624,93 @@ const test$1 = test$e.extend({
7623
7624
  }
7624
7625
  });
7625
7626
 
7627
+ const test$1 = test$f.extend({
7628
+ Country: [
7629
+ async ({ AdminApiContext }, use) => {
7630
+ const countryId = await getCountryId("de", AdminApiContext);
7631
+ await use({
7632
+ id: countryId
7633
+ });
7634
+ },
7635
+ { scope: "worker" }
7636
+ ],
7637
+ Currency: [
7638
+ async ({ AdminApiContext }, use) => {
7639
+ const currency = await getCurrency("EUR", AdminApiContext);
7640
+ await use({
7641
+ id: currency.id
7642
+ });
7643
+ },
7644
+ { scope: "worker" }
7645
+ ],
7646
+ Language: [
7647
+ async ({ AdminApiContext }, use) => {
7648
+ const language = await getLanguageData("en-GB", AdminApiContext);
7649
+ await use(language);
7650
+ },
7651
+ { scope: "worker" }
7652
+ ],
7653
+ PaymentMethod: [
7654
+ async ({ AdminApiContext }, use) => {
7655
+ const paymentMethodId = await getPaymentMethodId(AdminApiContext);
7656
+ await use({
7657
+ id: paymentMethodId
7658
+ });
7659
+ },
7660
+ { scope: "worker" }
7661
+ ],
7662
+ ShippingMethod: [
7663
+ async ({ AdminApiContext }, use) => {
7664
+ const shippingMethodId = await getShippingMethodId("Standard", AdminApiContext);
7665
+ await use({
7666
+ id: shippingMethodId
7667
+ });
7668
+ },
7669
+ { scope: "worker" }
7670
+ ],
7671
+ SnippetSet: [
7672
+ async ({ AdminApiContext }, use) => {
7673
+ const snippedSetId = await getSnippetSetId("en-GB", AdminApiContext);
7674
+ await use({
7675
+ id: snippedSetId
7676
+ });
7677
+ },
7678
+ { scope: "worker" }
7679
+ ],
7680
+ Tax: [
7681
+ async ({ AdminApiContext }, use) => {
7682
+ const taxId = await getTaxId(AdminApiContext);
7683
+ await use({
7684
+ id: taxId
7685
+ });
7686
+ },
7687
+ { scope: "worker" }
7688
+ ],
7689
+ Theme: [
7690
+ async ({ AdminApiContext }, use) => {
7691
+ const themeId = await getThemeId("Storefront", AdminApiContext);
7692
+ await use({
7693
+ id: themeId
7694
+ });
7695
+ },
7696
+ { scope: "worker" }
7697
+ ]
7698
+ });
7699
+
7626
7700
  const test = mergeTests(
7627
- test$7,
7701
+ test$8,
7702
+ test$d,
7703
+ test$1,
7628
7704
  test$c,
7629
7705
  test$b,
7630
7706
  test$a,
7631
7707
  test$9,
7632
- test$8,
7633
- test$1,
7708
+ test$2,
7709
+ test$7,
7634
7710
  test$6,
7635
7711
  test$5,
7636
7712
  test$4,
7637
- test$3,
7638
- test$2
7713
+ test$3
7639
7714
  );
7640
7715
 
7641
- export { AdminPageObjects, RuleType, StorefrontPageObjects, TestDataService, createRandomImage, extractIdFromUrl, getCountryId, getCurrency, getDefaultShippingMethodId, getFlowId, getLanguageData, getMediaId, getOrderTransactionId, getPaymentMethodId, getPromotionWithDiscount, getSalutationId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, isSaaSInstance, isThemeCompiled, setOrderStatus, test };
7716
+ export { AdminPageObjects, RuleType, StorefrontPageObjects, TestDataService, createRandomImage, extractIdFromUrl, getCountryId, getCurrency, getDefaultShippingMethodId, getFlowId, getLanguageData, getMediaId, getOrderTransactionId, getPaymentMethodId, getPromotionWithDiscount, getSalutationId, getShippingMethodId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, isSaaSInstance, isThemeCompiled, setOrderStatus, test };