@shopware-ag/acceptance-test-suite 11.8.0 → 11.9.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.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,
@@ -842,126 +611,358 @@ const test$a = test$e.extend({
842
611
  jsLoadingPromises.push(...js.map((url) => page.waitForResponse(url)));
843
612
  }
844
613
  }
845
- await page.getByRole("button", { name: "Log in" }).click();
846
- await Promise.all(jsLoadingPromises);
847
- const originalReload = page.reload.bind(page);
848
- page.reload = async () => {
849
- const res = await originalReload();
850
- await page.addStyleTag({
851
- content: `
852
- .sf-toolbar {
853
- width: 0 !important;
854
- height: 0 !important;
855
- display: none !important;
856
- pointer-events: none !important;
857
- }
858
- `.trim()
859
- });
860
- return res;
861
- };
862
- await use(page);
863
- await page.close();
864
- await context.close();
865
- await AdminApiContext.delete(`user/${uuid}`);
866
- },
867
- StorefrontPage: async ({ DefaultSalesChannel, SalesChannelBaseConfig, browser, AdminApiContext }, use) => {
868
- const { url, salesChannel } = DefaultSalesChannel;
869
- const context = await browser.newContext({
870
- baseURL: url
871
- });
872
- const page = await context.newPage();
873
- const isSaasInstance = await isSaaSInstance(AdminApiContext);
874
- if (!await isThemeCompiled(AdminApiContext, DefaultSalesChannel.url)) {
875
- test$e.slow();
876
- await AdminApiContext.post(
877
- `./_action/theme/${SalesChannelBaseConfig.defaultThemeId}/assign/${salesChannel.id}`
878
- );
879
- if (isSaasInstance) {
880
- while (!await isThemeCompiled(AdminApiContext, DefaultSalesChannel.url)) {
881
- await page.waitForTimeout(4e3);
882
- }
883
- }
614
+ await page.getByRole("button", { name: "Log in" }).click();
615
+ await Promise.all(jsLoadingPromises);
616
+ const originalReload = page.reload.bind(page);
617
+ page.reload = async () => {
618
+ const res = await originalReload();
619
+ await page.addStyleTag({
620
+ content: `
621
+ .sf-toolbar {
622
+ width: 0 !important;
623
+ height: 0 !important;
624
+ display: none !important;
625
+ pointer-events: none !important;
626
+ }
627
+ `.trim()
628
+ });
629
+ return res;
630
+ };
631
+ await use(page);
632
+ await page.close();
633
+ await context.close();
634
+ await AdminApiContext.delete(`user/${uuid}`);
635
+ },
636
+ StorefrontPage: async ({ DefaultSalesChannel, SalesChannelBaseConfig, browser, AdminApiContext }, use) => {
637
+ const { url, salesChannel } = DefaultSalesChannel;
638
+ const context = await browser.newContext({
639
+ baseURL: url
640
+ });
641
+ const page = await context.newPage();
642
+ const isSaasInstance = await isSaaSInstance(AdminApiContext);
643
+ if (!await isThemeCompiled(AdminApiContext, DefaultSalesChannel.url)) {
644
+ test$f.slow();
645
+ await AdminApiContext.post(
646
+ `./_action/theme/${SalesChannelBaseConfig.defaultThemeId}/assign/${salesChannel.id}`
647
+ );
648
+ if (isSaasInstance) {
649
+ while (!await isThemeCompiled(AdminApiContext, DefaultSalesChannel.url)) {
650
+ await page.waitForTimeout(4e3);
651
+ }
652
+ }
653
+ }
654
+ await page.goto("./", { waitUntil: "load" });
655
+ await use(page);
656
+ await page.close();
657
+ await context.close();
658
+ },
659
+ InstallPage: async ({ browser }, use) => {
660
+ const context = await browser.newContext({
661
+ baseURL: process.env["APP_URL"]
662
+ });
663
+ const page = await context.newPage();
664
+ await use(page);
665
+ await page.close();
666
+ await context.close();
667
+ },
668
+ page: async ({ AdminPage }, use) => {
669
+ await use(AdminPage);
670
+ },
671
+ context: async ({ AdminPage }, use) => {
672
+ await use(AdminPage.context());
673
+ }
674
+ });
675
+
676
+ var __defProp$V = Object.defineProperty;
677
+ var __defNormalProp$V = (obj, key, value) => key in obj ? __defProp$V(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
678
+ var __publicField$V = (obj, key, value) => {
679
+ __defNormalProp$V(obj, typeof key !== "symbol" ? key + "" : key, value);
680
+ return value;
681
+ };
682
+ class Actor {
683
+ constructor(name, page) {
684
+ __publicField$V(this, "page");
685
+ __publicField$V(this, "name");
686
+ __publicField$V(this, "expects", expect);
687
+ this.name = name;
688
+ this.page = page;
689
+ }
690
+ async attemptsTo(task) {
691
+ const stepTitle = `${this.name} attempts to ${this.camelCaseToLowerCase(task.name)}`;
692
+ await test$f.step(stepTitle, async () => await task());
693
+ }
694
+ async goesTo(url) {
695
+ const stepTitle = `${this.name} navigates to "${url}"`;
696
+ await test$f.step(stepTitle, async () => {
697
+ await this.page.goto(url);
698
+ await this.page.addStyleTag({
699
+ content: `
700
+ .sf-toolbar {
701
+ width: 0 !important;
702
+ height: 0 !important;
703
+ display: none !important;
704
+ pointer-events: none !important;
705
+ }
706
+ `.trim()
707
+ });
708
+ });
709
+ }
710
+ camelCaseToLowerCase(str) {
711
+ return str.replace(/[A-Z]/g, (letter) => ` ${letter.toLowerCase()}`);
712
+ }
713
+ }
714
+
715
+ const test$a = test$f.extend({
716
+ ShopCustomer: async ({ StorefrontPage }, use) => {
717
+ const shopCustomer = new Actor("Shop customer", StorefrontPage);
718
+ await use(shopCustomer);
719
+ },
720
+ ShopAdmin: async ({ AdminPage }, use) => {
721
+ const shopAdmin = new Actor("Shop administrator", AdminPage);
722
+ await use(shopAdmin);
723
+ }
724
+ });
725
+
726
+ function createRandomImage(width = 800, height = 600) {
727
+ const buffer = Buffer.alloc(width * height * 4);
728
+ let i = 0;
729
+ while (i < buffer.length) {
730
+ buffer[i++] = Math.floor(Math.random() * 256);
731
+ }
732
+ return new Image(width, height, buffer);
733
+ }
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
+ }]
884
932
  }
885
- await page.goto("./", { waitUntil: "load" });
886
- await use(page);
887
- await page.close();
888
- await context.close();
889
- },
890
- InstallPage: async ({ browser }, use) => {
891
- const context = await browser.newContext({
892
- baseURL: process.env["APP_URL"]
893
- });
894
- const page = await context.newPage();
895
- await use(page);
896
- await page.close();
897
- await context.close();
898
- },
899
- page: async ({ AdminPage }, use) => {
900
- await use(AdminPage);
901
- },
902
- context: async ({ AdminPage }, use) => {
903
- await use(AdminPage.context());
904
- }
905
- });
906
-
907
- var __defProp$V = Object.defineProperty;
908
- var __defNormalProp$V = (obj, key, value) => key in obj ? __defProp$V(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
909
- var __publicField$V = (obj, key, value) => {
910
- __defNormalProp$V(obj, typeof key !== "symbol" ? key + "" : key, value);
911
- return value;
933
+ });
934
+ const result = await resp.json();
935
+ return result.data[0].id;
912
936
  };
913
- class Actor {
914
- constructor(name, page) {
915
- __publicField$V(this, "page");
916
- __publicField$V(this, "name");
917
- __publicField$V(this, "expects", expect);
918
- this.name = name;
919
- this.page = page;
920
- }
921
- async attemptsTo(task) {
922
- const stepTitle = `${this.name} attempts to ${this.camelCaseToLowerCase(task.name)}`;
923
- await test$e.step(stepTitle, async () => await task());
924
- }
925
- async goesTo(url) {
926
- const stepTitle = `${this.name} navigates to "${url}"`;
927
- await test$e.step(stepTitle, async () => {
928
- await this.page.goto(url);
929
- await this.page.addStyleTag({
930
- content: `
931
- .sf-toolbar {
932
- width: 0 !important;
933
- height: 0 !important;
934
- display: none !important;
935
- pointer-events: none !important;
936
- }
937
- `.trim()
938
- });
939
- });
940
- }
941
- camelCaseToLowerCase(str) {
942
- return str.replace(/[A-Z]/g, (letter) => ` ${letter.toLowerCase()}`);
943
- }
944
- }
945
-
946
- const test$9 = test$e.extend({
947
- ShopCustomer: async ({ StorefrontPage }, use) => {
948
- const shopCustomer = new Actor("Shop customer", StorefrontPage);
949
- await use(shopCustomer);
950
- },
951
- ShopAdmin: async ({ AdminPage }, use) => {
952
- const shopAdmin = new Actor("Shop administrator", AdminPage);
953
- await use(shopAdmin);
954
- }
955
- });
956
-
957
- function createRandomImage(width = 800, height = 600) {
958
- const buffer = Buffer.alloc(width * height * 4);
959
- let i = 0;
960
- while (i < buffer.length) {
961
- buffer[i++] = Math.floor(Math.random() * 256);
962
- }
963
- return new Image(width, height, buffer);
937
+ function extractIdFromUrl(url) {
938
+ const segments = url.split("/");
939
+ return segments.length > 0 ? segments[segments.length - 1] : null;
964
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
+ };
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;
@@ -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");
@@ -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
  },
@@ -4478,8 +4479,9 @@ var __publicField$w = (obj, key, value) => {
4478
4479
  return value;
4479
4480
  };
4480
4481
  class ProductDetail {
4481
- constructor(page) {
4482
+ constructor(page, instanceMeta) {
4482
4483
  this.page = page;
4484
+ this.instanceMeta = instanceMeta;
4483
4485
  /**
4484
4486
  * Save interactions
4485
4487
  */
@@ -4574,10 +4576,19 @@ class ProductDetail {
4574
4576
  this.propertyOptionSizeMedium = this.propertyOptionGrid.getByLabel("Medium");
4575
4577
  this.propertyOptionSizeLarge = this.propertyOptionGrid.getByLabel("Large");
4576
4578
  this.specificationsTabLink = page.getByRole("tab", { name: "Specifications" });
4577
- this.customFieldCard = page.locator(".mt-card").getByText("Custom fields");
4579
+ if (satisfies(instanceMeta.version, "<6.7")) {
4580
+ this.customFieldCard = page.locator(".sw-card").getByText("Custom fields");
4581
+ } else {
4582
+ this.customFieldCard = page.locator(".mt-card").getByText("Custom fields");
4583
+ }
4578
4584
  }
4579
4585
  async getCustomFieldSetCardContentByName(customFieldSetName) {
4580
- const customFieldCard = this.page.locator(".mt-card").filter({ hasText: "Custom fields" });
4586
+ let customFieldCard;
4587
+ if (satisfies(this.instanceMeta.version, "<6.7")) {
4588
+ customFieldCard = this.page.locator(".sw-card").filter({ hasText: "Custom fields" });
4589
+ } else {
4590
+ customFieldCard = this.page.locator(".mt-card").filter({ hasText: "Custom fields" });
4591
+ }
4581
4592
  const customFieldSetTab = customFieldCard.getByText(customFieldSetName);
4582
4593
  const customFieldSetTabCustomContent = customFieldCard.locator(`.sw-custom-field-set-renderer-tab-content__${customFieldSetName}`);
4583
4594
  return {
@@ -4713,7 +4724,11 @@ class CustomerDetail {
4713
4724
  this.editButton = page.getByRole("button", { name: "Edit" });
4714
4725
  this.generalTab = page.getByRole("link", { name: "General" });
4715
4726
  this.accountCard = page.locator(".sw-customer-card");
4716
- this.customFieldCard = page.locator(".mt-card").getByText("Custom fields");
4727
+ if (satisfies(instanceMeta.version, "<6.7")) {
4728
+ this.customFieldCard = page.locator(".sw-card").getByText("Custom fields");
4729
+ } else {
4730
+ this.customFieldCard = page.locator(".mt-card").getByText("Custom fields");
4731
+ }
4717
4732
  this.customFieldSetTabs = this.customFieldCard.locator(".sw-tabs-item");
4718
4733
  this.customFieldSetTabCustomContent = this.customFieldCard.locator(".sw-tabs__custom-content");
4719
4734
  if (satisfies(instanceMeta.version, "<6.7")) {
@@ -4727,7 +4742,12 @@ class CustomerDetail {
4727
4742
  this.tagItems = this.tagList.locator(".sw-select-selection-list__item");
4728
4743
  }
4729
4744
  async getCustomFieldSetCardContentByName(customFieldSetName) {
4730
- const customFieldCard = this.page.locator(".mt-card").filter({ hasText: "Custom fields" });
4745
+ let customFieldCard;
4746
+ if (satisfies(this.instanceMeta.version, "<6.7")) {
4747
+ customFieldCard = this.page.locator(".sw-card").filter({ hasText: "Custom fields" });
4748
+ } else {
4749
+ customFieldCard = this.page.locator(".mt-card").filter({ hasText: "Custom fields" });
4750
+ }
4731
4751
  const customFieldSetTab = customFieldCard.getByText(customFieldSetName);
4732
4752
  const customFieldSetTabCustomContent = customFieldCard.locator(`.sw-custom-field-set-renderer-tab-content__${customFieldSetName}`);
4733
4753
  return {
@@ -5566,8 +5586,9 @@ var __publicField$a = (obj, key, value) => {
5566
5586
  return value;
5567
5587
  };
5568
5588
  class CategoryDetail {
5569
- constructor(page) {
5589
+ constructor(page, instanceMeta) {
5570
5590
  this.page = page;
5591
+ this.instanceMeta = instanceMeta;
5571
5592
  __publicField$a(this, "saveButton");
5572
5593
  __publicField$a(this, "cancelButton");
5573
5594
  __publicField$a(this, "customFieldCard");
@@ -5575,12 +5596,21 @@ class CategoryDetail {
5575
5596
  __publicField$a(this, "customFieldSetTabCustomContent");
5576
5597
  this.saveButton = page.getByRole("button", { name: "Save" });
5577
5598
  this.cancelButton = page.getByRole("button", { name: "Cancel" });
5578
- this.customFieldCard = page.locator(".mt-card").getByText("Custom fields");
5599
+ if (satisfies(instanceMeta.version, "<6.7")) {
5600
+ this.customFieldCard = page.locator(".sw-card").getByText("Custom fields");
5601
+ } else {
5602
+ this.customFieldCard = page.locator(".mt-card").getByText("Custom fields");
5603
+ }
5579
5604
  this.customFieldSetTabs = this.customFieldCard.locator(".sw-tabs-item");
5580
5605
  this.customFieldSetTabCustomContent = this.customFieldCard.locator(".sw-tabs__custom-content");
5581
5606
  }
5582
5607
  async getCustomFieldSetCardContentByName(customFieldSetName) {
5583
- const customFieldCard = this.page.locator(".mt-card").filter({ hasText: "Custom fields" });
5608
+ let customFieldCard;
5609
+ if (satisfies(this.instanceMeta.version, "<6.7")) {
5610
+ customFieldCard = this.page.locator(".sw-card").filter({ hasText: "Custom fields" });
5611
+ } else {
5612
+ customFieldCard = this.page.locator(".mt-card").filter({ hasText: "Custom fields" });
5613
+ }
5584
5614
  const customFieldSetTab = customFieldCard.getByText(customFieldSetName);
5585
5615
  const customFieldSetTabCustomContent = customFieldCard.locator(`.sw-custom-field-set-renderer-tab-content__${customFieldSetName}`);
5586
5616
  return {
@@ -5787,12 +5817,21 @@ class ManufacturerDetail extends ManufacturerCreate {
5787
5817
  __publicField$4(this, "customFieldCard");
5788
5818
  __publicField$4(this, "customFieldSetTabs");
5789
5819
  __publicField$4(this, "customFieldSetTabCustomContent");
5790
- this.customFieldCard = page.locator(".mt-card").getByText("Custom fields");
5820
+ if (satisfies(instanceMeta.version, "<6.7")) {
5821
+ this.customFieldCard = page.locator(".sw-card").getByText("Custom fields");
5822
+ } else {
5823
+ this.customFieldCard = page.locator(".mt-card").getByText("Custom fields");
5824
+ }
5791
5825
  this.customFieldSetTabs = this.customFieldCard.locator(".sw-tabs-item");
5792
5826
  this.customFieldSetTabCustomContent = this.customFieldCard.locator(".sw-tabs__custom-content");
5793
5827
  }
5794
5828
  async getCustomFieldSetCardContentByName(customFieldSetName) {
5795
- const customFieldCard = this.page.locator(".mt-card").filter({ hasText: "Custom fields" });
5829
+ let customFieldCard;
5830
+ if (satisfies(this.instanceMeta.version, "<6.7")) {
5831
+ customFieldCard = this.page.locator(".mt-card").filter({ hasText: "Custom fields" });
5832
+ } else {
5833
+ customFieldCard = this.page.locator(".mt-card").filter({ hasText: "Custom fields" });
5834
+ }
5796
5835
  const customFieldSetTab = customFieldCard.getByText(customFieldSetName);
5797
5836
  const customFieldSetTabCustomContent = customFieldCard.locator(`.sw-custom-field-set-renderer-tab-content__${customFieldSetName}`);
5798
5837
  return {
@@ -6088,9 +6127,9 @@ const AdminPageObjects = {
6088
6127
  ProductBulkEdit,
6089
6128
  CustomerBulkEdit
6090
6129
  };
6091
- const test$5 = test$e.extend({
6092
- AdminProductDetail: async ({ AdminPage }, use) => {
6093
- await use(new ProductDetail(AdminPage));
6130
+ const test$6 = test$f.extend({
6131
+ AdminProductDetail: async ({ AdminPage, InstanceMeta }, use) => {
6132
+ await use(new ProductDetail(AdminPage, InstanceMeta));
6094
6133
  },
6095
6134
  AdminOrderDetail: async ({ AdminPage }, use) => {
6096
6135
  await use(new OrderDetail(AdminPage));
@@ -6140,8 +6179,8 @@ const test$5 = test$e.extend({
6140
6179
  AdminCategories: async ({ AdminPage }, use) => {
6141
6180
  await use(new Categories(AdminPage));
6142
6181
  },
6143
- AdminCategoryDetail: async ({ AdminPage }, use) => {
6144
- await use(new CategoryDetail(AdminPage));
6182
+ AdminCategoryDetail: async ({ AdminPage, InstanceMeta }, use) => {
6183
+ await use(new CategoryDetail(AdminPage, InstanceMeta));
6145
6184
  },
6146
6185
  AdminLandingPageDetail: async ({ AdminPage }, use) => {
6147
6186
  await use(new LandingPageDetail(AdminPage));
@@ -6187,7 +6226,7 @@ const test$5 = test$e.extend({
6187
6226
  }
6188
6227
  });
6189
6228
 
6190
- const ProductData = test$e.extend({
6229
+ const ProductData = test$f.extend({
6191
6230
  ProductData: async ({ IdProvider, SalesChannelBaseConfig, AdminApiContext, DefaultSalesChannel }, use) => {
6192
6231
  const { id: productId, uuid: productUuid } = IdProvider.getIdPair();
6193
6232
  const productName = `Product_test_${productId}`;
@@ -6236,7 +6275,7 @@ const ProductData = test$e.extend({
6236
6275
  }
6237
6276
  });
6238
6277
 
6239
- const CategoryData = test$e.extend({
6278
+ const CategoryData = test$f.extend({
6240
6279
  CategoryData: async ({ IdProvider, AdminApiContext, DefaultSalesChannel, ProductData }, use) => {
6241
6280
  const { id: categoryId, uuid: categoryUuid } = IdProvider.getIdPair();
6242
6281
  const categoryName = `Category-${categoryId}`;
@@ -6263,7 +6302,7 @@ const CategoryData = test$e.extend({
6263
6302
  }
6264
6303
  });
6265
6304
 
6266
- const DigitalProductData = test$e.extend({
6305
+ const DigitalProductData = test$f.extend({
6267
6306
  DigitalProductData: async ({ ProductData, IdProvider, AdminApiContext }, use) => {
6268
6307
  const newMediaResource = await AdminApiContext.post("./media?_response", {
6269
6308
  data: {
@@ -6318,7 +6357,7 @@ const DigitalProductData = test$e.extend({
6318
6357
  }
6319
6358
  });
6320
6359
 
6321
- const PropertiesData = test$e.extend({
6360
+ const PropertiesData = test$f.extend({
6322
6361
  PropertiesData: async ({ AdminApiContext }, use) => {
6323
6362
  const propertyGroupColorResponse = await AdminApiContext.post("property-group?_response=1", {
6324
6363
  data: {
@@ -6368,7 +6407,7 @@ const PropertiesData = test$e.extend({
6368
6407
  }
6369
6408
  });
6370
6409
 
6371
- const CartWithProductData = test$e.extend({
6410
+ const CartWithProductData = test$f.extend({
6372
6411
  CartWithProductData: async ({ StoreApiContext, DefaultSalesChannel, ProductData }, use) => {
6373
6412
  await StoreApiContext.login(DefaultSalesChannel.customer);
6374
6413
  const cartResponse = await StoreApiContext.post("checkout/cart", {
@@ -6394,7 +6433,7 @@ const CartWithProductData = test$e.extend({
6394
6433
  }
6395
6434
  });
6396
6435
 
6397
- const PromotionWithCodeData = test$e.extend({
6436
+ const PromotionWithCodeData = test$f.extend({
6398
6437
  PromotionWithCodeData: async ({ AdminApiContext, DefaultSalesChannel, IdProvider }, use) => {
6399
6438
  const promotionCode = `${IdProvider.getIdPair().id}`;
6400
6439
  const promotionName = `Test Promotion ${promotionCode}`;
@@ -6436,7 +6475,7 @@ const PromotionWithCodeData = test$e.extend({
6436
6475
  }
6437
6476
  });
6438
6477
 
6439
- const MediaData = test$e.extend({
6478
+ const MediaData = test$f.extend({
6440
6479
  MediaData: async ({ AdminApiContext, IdProvider }, use) => {
6441
6480
  const imageId = IdProvider.getIdPair().id;
6442
6481
  const imageFilePath = `./tmp/image-${imageId}.png`;
@@ -6483,7 +6522,7 @@ const MediaData = test$e.extend({
6483
6522
  }
6484
6523
  });
6485
6524
 
6486
- const OrderData = test$e.extend({
6525
+ const OrderData = test$f.extend({
6487
6526
  OrderData: async ({ IdProvider, AdminApiContext, SalesChannelBaseConfig, DefaultSalesChannel, ProductData }, use) => {
6488
6527
  const requests = {
6489
6528
  currencyEUR: getCurrency("EUR", AdminApiContext),
@@ -6700,7 +6739,7 @@ const OrderData = test$e.extend({
6700
6739
  }
6701
6740
  });
6702
6741
 
6703
- const TagData = test$e.extend({
6742
+ const TagData = test$f.extend({
6704
6743
  TagData: async ({ IdProvider, AdminApiContext }, use) => {
6705
6744
  const tagUUID = IdProvider.getIdPair().uuid;
6706
6745
  const tagId = IdProvider.getIdPair().id;
@@ -6719,7 +6758,7 @@ const TagData = test$e.extend({
6719
6758
  }
6720
6759
  });
6721
6760
 
6722
- const test$4 = mergeTests(
6761
+ const test$5 = mergeTests(
6723
6762
  ProductData,
6724
6763
  CategoryData,
6725
6764
  DigitalProductData,
@@ -6731,7 +6770,7 @@ const test$4 = mergeTests(
6731
6770
  TagData
6732
6771
  );
6733
6772
 
6734
- const SaveProduct = test$e.extend({
6773
+ const SaveProduct = test$f.extend({
6735
6774
  SaveProduct: async ({ ShopAdmin, AdminProductDetail }, use) => {
6736
6775
  const task = () => {
6737
6776
  return async function SaveProduct2() {
@@ -6749,7 +6788,7 @@ const SaveProduct = test$e.extend({
6749
6788
  }
6750
6789
  });
6751
6790
 
6752
- const ExpectNotification = test$e.extend({
6791
+ const ExpectNotification = test$f.extend({
6753
6792
  ExpectNotification: async ({ ShopAdmin }, use) => {
6754
6793
  const task = (message, close = true) => {
6755
6794
  return async function ExpectNotification2() {
@@ -6765,7 +6804,7 @@ const ExpectNotification = test$e.extend({
6765
6804
  }
6766
6805
  });
6767
6806
 
6768
- const CreateLinkTypeCategory = test$e.extend({
6807
+ const CreateLinkTypeCategory = test$f.extend({
6769
6808
  CreateLinkTypeCategory: async ({ AdminCategories, AdminCategoryDetail, TestDataService }, use) => {
6770
6809
  const task = (categoryData, categoryCustomizableLinkData, parentCategoryName) => {
6771
6810
  return async function CreateLinkTypeCategory2() {
@@ -6816,7 +6855,7 @@ const CreateLinkTypeCategory = test$e.extend({
6816
6855
  }
6817
6856
  });
6818
6857
 
6819
- const BulkEditProducts = test$e.extend({
6858
+ const BulkEditProducts = test$f.extend({
6820
6859
  BulkEditProducts: async ({ AdminProductBulkEdit, AdminProductListing }, use) => {
6821
6860
  const task = (products, changes) => {
6822
6861
  return async function BulkEditProducts2() {
@@ -6915,7 +6954,7 @@ const BulkEditProducts = test$e.extend({
6915
6954
  }
6916
6955
  });
6917
6956
 
6918
- const BulkEditCustomers = test$e.extend({
6957
+ const BulkEditCustomers = test$f.extend({
6919
6958
  BulkEditCustomers: async ({ ShopAdmin, AdminCustomerListing, AdminCustomerBulkEdit }, use) => {
6920
6959
  const task = (customers, accountData, tagData, customFieldData) => {
6921
6960
  return async function BulkEditCustomers2() {
@@ -6994,7 +7033,7 @@ var RuleType = /* @__PURE__ */ ((RuleType2) => {
6994
7033
  return RuleType2;
6995
7034
  })(RuleType || {});
6996
7035
 
6997
- const AssignEntitiesToRule = test$e.extend({
7036
+ const AssignEntitiesToRule = test$f.extend({
6998
7037
  AssignEntitiesToRule: async ({ AdminRuleDetail }, use) => {
6999
7038
  const task = (assignableEntities) => {
7000
7039
  return async function AssignEntitiesToRule2() {
@@ -7035,7 +7074,7 @@ const AssignEntitiesToRule = test$e.extend({
7035
7074
  }
7036
7075
  });
7037
7076
 
7038
- const test$3 = mergeTests(
7077
+ const test$4 = mergeTests(
7039
7078
  SaveProduct,
7040
7079
  ExpectNotification,
7041
7080
  CreateLinkTypeCategory,
@@ -7044,7 +7083,7 @@ const test$3 = mergeTests(
7044
7083
  AssignEntitiesToRule
7045
7084
  );
7046
7085
 
7047
- const Login = test$e.extend({
7086
+ const Login = test$f.extend({
7048
7087
  Login: async ({ ShopCustomer, DefaultSalesChannel, StorefrontAccountLogin, StorefrontAccount }, use) => {
7049
7088
  const task = (customCustomer) => {
7050
7089
  return async function Login2() {
@@ -7060,7 +7099,7 @@ const Login = test$e.extend({
7060
7099
  }
7061
7100
  });
7062
7101
 
7063
- const Logout = test$e.extend({
7102
+ const Logout = test$f.extend({
7064
7103
  Logout: async ({ ShopCustomer, StorefrontAccountLogin }, use) => {
7065
7104
  const task = () => {
7066
7105
  return async function Logout2() {
@@ -7074,7 +7113,7 @@ const Logout = test$e.extend({
7074
7113
  }
7075
7114
  });
7076
7115
 
7077
- const Register = test$e.extend({
7116
+ const Register = test$f.extend({
7078
7117
  Register: async ({ StorefrontAccountLogin, IdProvider, TestDataService }, use) => {
7079
7118
  let registeredEmail = "";
7080
7119
  const defaultRegistrationData = {
@@ -7124,7 +7163,7 @@ const Register = test$e.extend({
7124
7163
  }
7125
7164
  });
7126
7165
 
7127
- const RegisterGuest = test$e.extend({
7166
+ const RegisterGuest = test$f.extend({
7128
7167
  RegisterGuest: async ({ StorefrontAccountLogin, AdminApiContext }, use) => {
7129
7168
  const registrationData = {
7130
7169
  firstName: "Jeff",
@@ -7172,7 +7211,7 @@ const RegisterGuest = test$e.extend({
7172
7211
  }
7173
7212
  });
7174
7213
 
7175
- const ChangeStorefrontCurrency = test$e.extend({
7214
+ const ChangeStorefrontCurrency = test$f.extend({
7176
7215
  ChangeStorefrontCurrency: async ({ StorefrontHome }, use) => {
7177
7216
  const task = (isoCode) => {
7178
7217
  return async function ChangeStorefrontCurrency2() {
@@ -7184,7 +7223,7 @@ const ChangeStorefrontCurrency = test$e.extend({
7184
7223
  }
7185
7224
  });
7186
7225
 
7187
- const AddNewAddress = test$e.extend({
7226
+ const AddNewAddress = test$f.extend({
7188
7227
  AddNewAddress: async ({ StorefrontAccountAddresses, StorefrontAccountAddressCreate }, use) => {
7189
7228
  const task = (address) => {
7190
7229
  return async function AddNewAddress2() {
@@ -7207,7 +7246,7 @@ const AddNewAddress = test$e.extend({
7207
7246
  }
7208
7247
  });
7209
7248
 
7210
- const AddProductToCart = test$e.extend({
7249
+ const AddProductToCart = test$f.extend({
7211
7250
  AddProductToCart: async ({ ShopCustomer, StorefrontProductDetail }, use) => {
7212
7251
  const task = (ProductData, quantity = "1") => {
7213
7252
  return async function AddProductToCart2() {
@@ -7221,7 +7260,7 @@ const AddProductToCart = test$e.extend({
7221
7260
  }
7222
7261
  });
7223
7262
 
7224
- const ProceedFromProductToCheckout = test$e.extend({
7263
+ const ProceedFromProductToCheckout = test$f.extend({
7225
7264
  ProceedFromProductToCheckout: async ({ ShopCustomer, StorefrontProductDetail, StorefrontCheckoutConfirm }, use) => {
7226
7265
  const task = () => {
7227
7266
  return async function ProceedFromProductToCheckout2() {
@@ -7233,7 +7272,7 @@ const ProceedFromProductToCheckout = test$e.extend({
7233
7272
  }
7234
7273
  });
7235
7274
 
7236
- const ProceedFromCartToCheckout = test$e.extend({
7275
+ const ProceedFromCartToCheckout = test$f.extend({
7237
7276
  ProceedFromCartToCheckout: async ({
7238
7277
  ShopCustomer,
7239
7278
  StorefrontCheckoutCart,
@@ -7249,7 +7288,7 @@ const ProceedFromCartToCheckout = test$e.extend({
7249
7288
  }
7250
7289
  });
7251
7290
 
7252
- const ChangeProductQuantity = test$e.extend({
7291
+ const ChangeProductQuantity = test$f.extend({
7253
7292
  ChangeProductQuantity: async ({
7254
7293
  ShopCustomer,
7255
7294
  StorefrontCheckoutCart
@@ -7265,7 +7304,7 @@ const ChangeProductQuantity = test$e.extend({
7265
7304
  }
7266
7305
  });
7267
7306
 
7268
- const ConfirmTermsAndConditions = test$e.extend({
7307
+ const ConfirmTermsAndConditions = test$f.extend({
7269
7308
  ConfirmTermsAndConditions: async ({ ShopCustomer, StorefrontCheckoutConfirm }, use) => {
7270
7309
  const task = () => {
7271
7310
  return async function ConfirmTermsAndConditions2() {
@@ -7277,7 +7316,7 @@ const ConfirmTermsAndConditions = test$e.extend({
7277
7316
  }
7278
7317
  });
7279
7318
 
7280
- const SelectCashOnDeliveryPaymentOption = test$e.extend({
7319
+ const SelectCashOnDeliveryPaymentOption = test$f.extend({
7281
7320
  SelectCashOnDeliveryPaymentOption: async ({ ShopCustomer, StorefrontCheckoutConfirm }, use) => {
7282
7321
  const task = () => {
7283
7322
  return async function SelectCashOnDeliveryPaymentOption2() {
@@ -7289,7 +7328,7 @@ const SelectCashOnDeliveryPaymentOption = test$e.extend({
7289
7328
  }
7290
7329
  });
7291
7330
 
7292
- const SelectInvoicePaymentOption = test$e.extend({
7331
+ const SelectInvoicePaymentOption = test$f.extend({
7293
7332
  SelectInvoicePaymentOption: async ({ ShopCustomer, StorefrontCheckoutConfirm }, use) => {
7294
7333
  const task = () => {
7295
7334
  return async function SelectInvoicePaymentOption2() {
@@ -7301,7 +7340,7 @@ const SelectInvoicePaymentOption = test$e.extend({
7301
7340
  }
7302
7341
  });
7303
7342
 
7304
- const SelectPaidInAdvancePaymentOption = test$e.extend({
7343
+ const SelectPaidInAdvancePaymentOption = test$f.extend({
7305
7344
  SelectPaidInAdvancePaymentOption: async ({ ShopCustomer, StorefrontCheckoutConfirm }, use) => {
7306
7345
  const task = () => {
7307
7346
  return async function SelectPaidInAdvancePaymentOption2() {
@@ -7313,7 +7352,7 @@ const SelectPaidInAdvancePaymentOption = test$e.extend({
7313
7352
  }
7314
7353
  });
7315
7354
 
7316
- const SelectStandardShippingOption = test$e.extend({
7355
+ const SelectStandardShippingOption = test$f.extend({
7317
7356
  SelectStandardShippingOption: async ({ ShopCustomer, StorefrontCheckoutConfirm }, use) => {
7318
7357
  const task = () => {
7319
7358
  return async function SelectStandardShippingOption2() {
@@ -7325,7 +7364,7 @@ const SelectStandardShippingOption = test$e.extend({
7325
7364
  }
7326
7365
  });
7327
7366
 
7328
- const SelectExpressShippingOption = test$e.extend({
7367
+ const SelectExpressShippingOption = test$f.extend({
7329
7368
  SelectExpressShippingOption: async ({ ShopCustomer, StorefrontCheckoutConfirm }, use) => {
7330
7369
  const task = () => {
7331
7370
  return async function SelectExpressShippingOption2() {
@@ -7337,7 +7376,7 @@ const SelectExpressShippingOption = test$e.extend({
7337
7376
  }
7338
7377
  });
7339
7378
 
7340
- const SubmitOrder = test$e.extend({
7379
+ const SubmitOrder = test$f.extend({
7341
7380
  SubmitOrder: async ({ ShopCustomer, StorefrontCheckoutConfirm, StorefrontCheckoutFinish }, use) => {
7342
7381
  const task = () => {
7343
7382
  return async function SubmitOrder2() {
@@ -7349,7 +7388,7 @@ const SubmitOrder = test$e.extend({
7349
7388
  }
7350
7389
  });
7351
7390
 
7352
- const OpenSearchResultPage = test$e.extend({
7391
+ const OpenSearchResultPage = test$f.extend({
7353
7392
  OpenSearchResultPage: async ({ StorefrontSearch }, use) => {
7354
7393
  const task = (searchTerm) => {
7355
7394
  return async function OpenSearchResultPage2() {
@@ -7361,7 +7400,7 @@ const OpenSearchResultPage = test$e.extend({
7361
7400
  }
7362
7401
  });
7363
7402
 
7364
- const OpenSearchSuggestPage = test$e.extend({
7403
+ const OpenSearchSuggestPage = test$f.extend({
7365
7404
  OpenSearchSuggestPage: async ({ StorefrontSearchSuggest }, use) => {
7366
7405
  const task = (searchTerm) => {
7367
7406
  return async function OpenSearchSuggestPage2() {
@@ -7373,7 +7412,7 @@ const OpenSearchSuggestPage = test$e.extend({
7373
7412
  }
7374
7413
  });
7375
7414
 
7376
- const SearchForTerm = test$e.extend({
7415
+ const SearchForTerm = test$f.extend({
7377
7416
  SearchForTerm: async ({ StorefrontSearchSuggest }, use) => {
7378
7417
  const task = (searchTerm) => {
7379
7418
  return async function SearchForTerm2() {
@@ -7385,7 +7424,7 @@ const SearchForTerm = test$e.extend({
7385
7424
  }
7386
7425
  });
7387
7426
 
7388
- const ValidateAccessibility = test$e.extend({
7427
+ const ValidateAccessibility = test$f.extend({
7389
7428
  ValidateAccessibility: async ({ ShopCustomer }, use) => {
7390
7429
  const task = (pageName, assertViolations = true, createReport = true, ruleTags = ["wcag2a", "wcag2aa", "wcag2aaa", "wcag21a", "wcag21aa", "best-practice"], outputDir = "test-results/AccessibilityReports") => {
7391
7430
  return async function ValidateAccessibility2() {
@@ -7414,7 +7453,7 @@ const ValidateAccessibility = test$e.extend({
7414
7453
  }
7415
7454
  });
7416
7455
 
7417
- const AddProductToCartFromWishlist = test$e.extend({
7456
+ const AddProductToCartFromWishlist = test$f.extend({
7418
7457
  AddProductToCartFromWishlist: async ({ ShopCustomer, StorefrontWishlist, StorefrontOffCanvasCart }, use) => {
7419
7458
  const task = (ProductData) => {
7420
7459
  return async function AddProductToCartFromWishlist2() {
@@ -7431,7 +7470,7 @@ const AddProductToCartFromWishlist = test$e.extend({
7431
7470
  await use(task);
7432
7471
  }
7433
7472
  });
7434
- const RemoveProductFromWishlist = test$e.extend({
7473
+ const RemoveProductFromWishlist = test$f.extend({
7435
7474
  RemoveProductFromWishlist: async ({ StorefrontHome, StorefrontWishlist }, use) => {
7436
7475
  const task = (ProductData) => {
7437
7476
  return async function RemoveProductFromWishlist2() {
@@ -7443,7 +7482,7 @@ const RemoveProductFromWishlist = test$e.extend({
7443
7482
  await use(task);
7444
7483
  }
7445
7484
  });
7446
- const AddProductToWishlist = test$e.extend({
7485
+ const AddProductToWishlist = test$f.extend({
7447
7486
  AddProductToWishlist: async ({ StorefrontHome, ShopCustomer }, use) => {
7448
7487
  const task = (ProductData) => {
7449
7488
  return async function AddProductToWishlist2() {
@@ -7456,7 +7495,7 @@ const AddProductToWishlist = test$e.extend({
7456
7495
  }
7457
7496
  });
7458
7497
 
7459
- const test$2 = mergeTests(
7498
+ const test$3 = mergeTests(
7460
7499
  Login,
7461
7500
  Logout,
7462
7501
  Register,
@@ -7577,7 +7616,7 @@ class FeatureService {
7577
7616
  }
7578
7617
  }
7579
7618
 
7580
- const test$1 = test$e.extend({
7619
+ const test$2 = test$f.extend({
7581
7620
  FeatureService: async ({ AdminApiContext }, use) => {
7582
7621
  const service = new FeatureService(AdminApiContext);
7583
7622
  await use(service);
@@ -7585,19 +7624,93 @@ const test$1 = test$e.extend({
7585
7624
  }
7586
7625
  });
7587
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
+
7588
7700
  const test = mergeTests(
7589
- test$7,
7701
+ test$8,
7702
+ test$d,
7703
+ test$1,
7590
7704
  test$c,
7591
7705
  test$b,
7592
7706
  test$a,
7593
7707
  test$9,
7594
- test$8,
7595
- test$1,
7708
+ test$2,
7709
+ test$7,
7596
7710
  test$6,
7597
7711
  test$5,
7598
7712
  test$4,
7599
- test$3,
7600
- test$2
7713
+ test$3
7601
7714
  );
7602
7715
 
7603
- 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 };