@shopware-ag/acceptance-test-suite 11.38.0 → 12.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +136 -12
- package/dist/index.d.ts +136 -12
- package/dist/index.mjs +656 -467
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -14,17 +14,17 @@ const test$d = test$e.extend({
|
|
|
14
14
|
SalesChannelBaseConfig: [
|
|
15
15
|
async ({ Country, Currency, Language, PaymentMethod, ShippingMethod, SnippetSet, Tax, Theme }, use) => {
|
|
16
16
|
await use({
|
|
17
|
-
|
|
18
|
-
enGBLanguageId: Language.id,
|
|
17
|
+
currentLocaleId: Language.translationCode.id,
|
|
19
18
|
storefrontTypeId: "8a243080f92e4c719546314b577cf82b",
|
|
20
|
-
|
|
19
|
+
currentCurrencyId: Currency.id,
|
|
21
20
|
defaultCurrencyId: "b7d2554b0ce847cd82f3ac9bd1c0dfca",
|
|
21
|
+
currentLanguageId: Language.id,
|
|
22
22
|
defaultLanguageId: "2fbb5fe2e29a4d70aa5854ce7ce3e20b",
|
|
23
23
|
invoicePaymentMethodId: PaymentMethod.id,
|
|
24
24
|
defaultShippingMethod: ShippingMethod.id,
|
|
25
25
|
taxId: Tax.id,
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
currentCountryId: Country.id,
|
|
27
|
+
currentSnippetSetId: SnippetSet.id,
|
|
28
28
|
defaultThemeId: Theme.id,
|
|
29
29
|
appUrl: process.env["APP_URL"],
|
|
30
30
|
adminUrl: process.env["ADMIN_URL"] || `${process.env["APP_URL"]}admin/`
|
|
@@ -41,7 +41,7 @@ const test$d = test$e.extend({
|
|
|
41
41
|
const { uuid: customerUuid } = IdProvider.getWorkerDerivedStableId("customer");
|
|
42
42
|
const baseUrl = `${SalesChannelBaseConfig.appUrl}test-${uuid}/`;
|
|
43
43
|
await AdminApiContext.delete(`./customer/${customerUuid}`);
|
|
44
|
-
const wantedLanguages = /* @__PURE__ */ new Set([SalesChannelBaseConfig.
|
|
44
|
+
const wantedLanguages = /* @__PURE__ */ new Set([SalesChannelBaseConfig.currentLanguageId, SalesChannelBaseConfig.defaultLanguageId]);
|
|
45
45
|
const languages = [];
|
|
46
46
|
const result = await AdminApiContext.get(`./sales-channel/${uuid}/languages`);
|
|
47
47
|
if (result.ok()) {
|
|
@@ -66,11 +66,11 @@ const test$d = test$e.extend({
|
|
|
66
66
|
id: uuid,
|
|
67
67
|
name: `${id} acceptance test`,
|
|
68
68
|
typeId: SalesChannelBaseConfig.storefrontTypeId,
|
|
69
|
-
languageId: SalesChannelBaseConfig.
|
|
70
|
-
currencyId: SalesChannelBaseConfig.
|
|
69
|
+
languageId: SalesChannelBaseConfig.currentLanguageId,
|
|
70
|
+
currencyId: SalesChannelBaseConfig.currentCurrencyId,
|
|
71
71
|
paymentMethodId: SalesChannelBaseConfig.invoicePaymentMethodId,
|
|
72
72
|
shippingMethodId: SalesChannelBaseConfig.defaultShippingMethod,
|
|
73
|
-
countryId: SalesChannelBaseConfig.
|
|
73
|
+
countryId: SalesChannelBaseConfig.currentCountryId,
|
|
74
74
|
accessKey: "SWSC" + uuid,
|
|
75
75
|
homeEnabled: true,
|
|
76
76
|
navigationCategory: {
|
|
@@ -80,22 +80,24 @@ const test$d = test$e.extend({
|
|
|
80
80
|
type: "page",
|
|
81
81
|
productAssignmentType: "product"
|
|
82
82
|
},
|
|
83
|
-
domains: [
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
83
|
+
domains: [
|
|
84
|
+
{
|
|
85
|
+
id: domainUuid,
|
|
86
|
+
url: baseUrl,
|
|
87
|
+
languageId: SalesChannelBaseConfig.currentLanguageId,
|
|
88
|
+
snippetSetId: SalesChannelBaseConfig.currentSnippetSetId,
|
|
89
|
+
currencyId: SalesChannelBaseConfig.currentCurrencyId
|
|
90
|
+
}
|
|
91
|
+
],
|
|
90
92
|
customerGroup: {
|
|
91
93
|
id: customerGroupUuid,
|
|
92
94
|
name: `${id} Acceptance test`
|
|
93
95
|
},
|
|
94
96
|
languages,
|
|
95
|
-
countries: [{ id: SalesChannelBaseConfig.
|
|
97
|
+
countries: [{ id: SalesChannelBaseConfig.currentCountryId }],
|
|
96
98
|
shippingMethods: [{ id: SalesChannelBaseConfig.defaultShippingMethod }],
|
|
97
99
|
paymentMethods: [{ id: SalesChannelBaseConfig.invoicePaymentMethodId }],
|
|
98
|
-
currencies: [{ id: SalesChannelBaseConfig.
|
|
100
|
+
currencies: [{ id: SalesChannelBaseConfig.currentCurrencyId }]
|
|
99
101
|
}
|
|
100
102
|
]
|
|
101
103
|
}
|
|
@@ -110,14 +112,14 @@ const test$d = test$e.extend({
|
|
|
110
112
|
email: `customer_${id}@example.com`,
|
|
111
113
|
password: "shopware",
|
|
112
114
|
salutationId: salutations.data[0].id,
|
|
113
|
-
languageId: SalesChannelBaseConfig.
|
|
115
|
+
languageId: SalesChannelBaseConfig.currentLanguageId,
|
|
114
116
|
defaultShippingAddress: {
|
|
115
117
|
firstName: `${id} admin`,
|
|
116
118
|
lastName: `${id} admin`,
|
|
117
119
|
city: "not",
|
|
118
120
|
street: "not",
|
|
119
121
|
zipcode: "not",
|
|
120
|
-
countryId: SalesChannelBaseConfig.
|
|
122
|
+
countryId: SalesChannelBaseConfig.currentCountryId,
|
|
121
123
|
salutationId: salutations.data[0].id
|
|
122
124
|
},
|
|
123
125
|
defaultBillingAddress: {
|
|
@@ -126,7 +128,7 @@ const test$d = test$e.extend({
|
|
|
126
128
|
city: "not",
|
|
127
129
|
street: "not",
|
|
128
130
|
zipcode: "not",
|
|
129
|
-
countryId: SalesChannelBaseConfig.
|
|
131
|
+
countryId: SalesChannelBaseConfig.currentCountryId,
|
|
130
132
|
salutationId: salutations.data[0].id
|
|
131
133
|
},
|
|
132
134
|
firstName: `${id} admin`,
|
|
@@ -139,10 +141,7 @@ const test$d = test$e.extend({
|
|
|
139
141
|
const customerRespPromise = AdminApiContext.post("./customer?_response", {
|
|
140
142
|
data: customerData
|
|
141
143
|
});
|
|
142
|
-
const [customerResp, salesChannelResp] = await Promise.all([
|
|
143
|
-
customerRespPromise,
|
|
144
|
-
salesChannelPromise
|
|
145
|
-
]);
|
|
144
|
+
const [customerResp, salesChannelResp] = await Promise.all([customerRespPromise, salesChannelPromise]);
|
|
146
145
|
expect(customerResp.ok()).toBeTruthy();
|
|
147
146
|
expect(salesChannelResp.ok()).toBeTruthy();
|
|
148
147
|
const customer = await customerResp.json();
|
|
@@ -612,7 +611,7 @@ const general$a = {
|
|
|
612
611
|
"delete": "Delete",
|
|
613
612
|
customFields: "Custom fields"
|
|
614
613
|
};
|
|
615
|
-
const actions$
|
|
614
|
+
const actions$h = {
|
|
616
615
|
createCategory: "Create category",
|
|
617
616
|
addLandingPage: "Add landing page",
|
|
618
617
|
configureHomePage: "Configure home page",
|
|
@@ -643,7 +642,7 @@ const entities$1 = {
|
|
|
643
642
|
};
|
|
644
643
|
const administrationCategory = {
|
|
645
644
|
general: general$a,
|
|
646
|
-
actions: actions$
|
|
645
|
+
actions: actions$h,
|
|
647
646
|
tabs: tabs$9,
|
|
648
647
|
fields: fields$9,
|
|
649
648
|
headings: headings$5,
|
|
@@ -722,7 +721,7 @@ const detail$n = {
|
|
|
722
721
|
const general$9 = {
|
|
723
722
|
customFields: "Custom fields"
|
|
724
723
|
};
|
|
725
|
-
const actions$
|
|
724
|
+
const actions$g = {
|
|
726
725
|
edit: "Edit",
|
|
727
726
|
"delete": "Delete",
|
|
728
727
|
cancel: "Cancel",
|
|
@@ -738,11 +737,11 @@ const administrationCustomField = {
|
|
|
738
737
|
create: create$d,
|
|
739
738
|
detail: detail$n,
|
|
740
739
|
general: general$9,
|
|
741
|
-
actions: actions$
|
|
740
|
+
actions: actions$g,
|
|
742
741
|
dialogs: dialogs$7
|
|
743
742
|
};
|
|
744
743
|
|
|
745
|
-
const buttons$
|
|
744
|
+
const buttons$f = {
|
|
746
745
|
agree: "Agree",
|
|
747
746
|
disableDataSharing: "Disable data sharing"
|
|
748
747
|
};
|
|
@@ -754,7 +753,7 @@ const headlines$1 = {
|
|
|
754
753
|
dataConsent: "Data Consent"
|
|
755
754
|
};
|
|
756
755
|
const administrationDataSharing = {
|
|
757
|
-
buttons: buttons$
|
|
756
|
+
buttons: buttons$f,
|
|
758
757
|
messages: messages$7,
|
|
759
758
|
headlines: headlines$1
|
|
760
759
|
};
|
|
@@ -911,7 +910,7 @@ const create$9 = {
|
|
|
911
910
|
const detail$j = {
|
|
912
911
|
customFields: "Custom fields"
|
|
913
912
|
};
|
|
914
|
-
const actions$
|
|
913
|
+
const actions$f = {
|
|
915
914
|
edit: "Edit",
|
|
916
915
|
"delete": "Delete",
|
|
917
916
|
cancel: "Cancel"
|
|
@@ -923,10 +922,27 @@ const administrationManufacturer = {
|
|
|
923
922
|
listing: listing$h,
|
|
924
923
|
create: create$9,
|
|
925
924
|
detail: detail$j,
|
|
926
|
-
actions: actions$
|
|
925
|
+
actions: actions$f,
|
|
927
926
|
dialogs: dialogs$6
|
|
928
927
|
};
|
|
929
928
|
|
|
929
|
+
const buttons$e = {
|
|
930
|
+
uploadFile: "Upload file",
|
|
931
|
+
addNewFolder: "Add new folder"
|
|
932
|
+
};
|
|
933
|
+
const search$2 = {
|
|
934
|
+
placeholder: "Search current folder..."
|
|
935
|
+
};
|
|
936
|
+
const actions$e = {
|
|
937
|
+
rename: "Rename",
|
|
938
|
+
"delete": "Delete"
|
|
939
|
+
};
|
|
940
|
+
const administrationMedia = {
|
|
941
|
+
buttons: buttons$e,
|
|
942
|
+
search: search$2,
|
|
943
|
+
actions: actions$e
|
|
944
|
+
};
|
|
945
|
+
|
|
930
946
|
const detail$i = {
|
|
931
947
|
items: "Items",
|
|
932
948
|
sendDocument: "Send document",
|
|
@@ -943,7 +959,7 @@ const tabs$8 = {
|
|
|
943
959
|
const listing$g = {
|
|
944
960
|
addOrder: "Add order"
|
|
945
961
|
};
|
|
946
|
-
const actions$
|
|
962
|
+
const actions$d = {
|
|
947
963
|
view: "View",
|
|
948
964
|
"delete": "Delete",
|
|
949
965
|
cancel: "Cancel"
|
|
@@ -956,7 +972,7 @@ const administrationOrder = {
|
|
|
956
972
|
contextMenu: contextMenu$1,
|
|
957
973
|
tabs: tabs$8,
|
|
958
974
|
listing: listing$g,
|
|
959
|
-
actions: actions$
|
|
975
|
+
actions: actions$d,
|
|
960
976
|
dialogs: dialogs$5
|
|
961
977
|
};
|
|
962
978
|
|
|
@@ -989,7 +1005,7 @@ const cards$1 = {
|
|
|
989
1005
|
const headings$4 = {
|
|
990
1006
|
promotionCodes: "Promotion codes"
|
|
991
1007
|
};
|
|
992
|
-
const actions$
|
|
1008
|
+
const actions$c = {
|
|
993
1009
|
addPromotion: "Add promotion",
|
|
994
1010
|
addDiscount: "Add discount",
|
|
995
1011
|
duplicate: "Duplicate",
|
|
@@ -1005,11 +1021,11 @@ const administrationPromotion = {
|
|
|
1005
1021
|
tabs: tabs$7,
|
|
1006
1022
|
cards: cards$1,
|
|
1007
1023
|
headings: headings$4,
|
|
1008
|
-
actions: actions$
|
|
1024
|
+
actions: actions$c,
|
|
1009
1025
|
fields: fields$8
|
|
1010
1026
|
};
|
|
1011
1027
|
|
|
1012
|
-
const buttons$
|
|
1028
|
+
const buttons$d = {
|
|
1013
1029
|
createRule: "Create rule",
|
|
1014
1030
|
add: "Add",
|
|
1015
1031
|
addAssignment: "Add assignment",
|
|
@@ -1027,7 +1043,7 @@ const testData$1 = {
|
|
|
1027
1043
|
ruleDescription: "Rule description"
|
|
1028
1044
|
};
|
|
1029
1045
|
const administrationRule = {
|
|
1030
|
-
buttons: buttons$
|
|
1046
|
+
buttons: buttons$d,
|
|
1031
1047
|
fields: fields$7,
|
|
1032
1048
|
errors: errors$4,
|
|
1033
1049
|
testData: testData$1
|
|
@@ -1076,13 +1092,13 @@ const fields$6 = {
|
|
|
1076
1092
|
username: "Username",
|
|
1077
1093
|
email: "Email"
|
|
1078
1094
|
};
|
|
1079
|
-
const buttons$
|
|
1095
|
+
const buttons$c = {
|
|
1080
1096
|
deselectAll: "Deselect all"
|
|
1081
1097
|
};
|
|
1082
1098
|
const administrationYourProfile = {
|
|
1083
1099
|
tabs: tabs$6,
|
|
1084
1100
|
fields: fields$6,
|
|
1085
|
-
buttons: buttons$
|
|
1101
|
+
buttons: buttons$c
|
|
1086
1102
|
};
|
|
1087
1103
|
|
|
1088
1104
|
const listing$e = {
|
|
@@ -1109,7 +1125,7 @@ const administrationCustomerGroup = {
|
|
|
1109
1125
|
const welcome$1 = {
|
|
1110
1126
|
text: "Welcome to the Shopware 6 Administration"
|
|
1111
1127
|
};
|
|
1112
|
-
const buttons$
|
|
1128
|
+
const buttons$b = {
|
|
1113
1129
|
install: "Install",
|
|
1114
1130
|
installMigrationAssistant: "Install Migration Assistant",
|
|
1115
1131
|
installDemoData: "Install demo data"
|
|
@@ -1141,7 +1157,7 @@ const regions$1 = {
|
|
|
1141
1157
|
};
|
|
1142
1158
|
const administrationFirstRunWizard = {
|
|
1143
1159
|
welcome: welcome$1,
|
|
1144
|
-
buttons: buttons$
|
|
1160
|
+
buttons: buttons$b,
|
|
1145
1161
|
headers: headers$1,
|
|
1146
1162
|
fields: fields$5,
|
|
1147
1163
|
placeholders: placeholders$1,
|
|
@@ -1151,7 +1167,7 @@ const administrationFirstRunWizard = {
|
|
|
1151
1167
|
const headings$3 = {
|
|
1152
1168
|
futureProofStore: "Future proof your store with Shopware Services"
|
|
1153
1169
|
};
|
|
1154
|
-
const buttons$
|
|
1170
|
+
const buttons$a = {
|
|
1155
1171
|
activateServices: "Activate Services",
|
|
1156
1172
|
grantPermissions: "Grant permissions",
|
|
1157
1173
|
deactivate: "Deactivate",
|
|
@@ -1171,7 +1187,7 @@ const dashboard$1 = {
|
|
|
1171
1187
|
};
|
|
1172
1188
|
const administrationShopwareServices = {
|
|
1173
1189
|
headings: headings$3,
|
|
1174
|
-
buttons: buttons$
|
|
1190
|
+
buttons: buttons$a,
|
|
1175
1191
|
modals: modals$3,
|
|
1176
1192
|
messages: messages$5,
|
|
1177
1193
|
links: links$1,
|
|
@@ -1212,7 +1228,7 @@ const tabs$5 = {
|
|
|
1212
1228
|
seo: "SEO",
|
|
1213
1229
|
reviews: "Reviews"
|
|
1214
1230
|
};
|
|
1215
|
-
const buttons$
|
|
1231
|
+
const buttons$9 = {
|
|
1216
1232
|
save: "Save",
|
|
1217
1233
|
uploadFile: "Upload file",
|
|
1218
1234
|
generateVariants: "Generate variants",
|
|
@@ -1222,6 +1238,14 @@ const buttons$8 = {
|
|
|
1222
1238
|
const modals$2 = {
|
|
1223
1239
|
generateVariants: "Generate variants"
|
|
1224
1240
|
};
|
|
1241
|
+
const propertyValues$1 = {
|
|
1242
|
+
blue: "Blue",
|
|
1243
|
+
red: "Red",
|
|
1244
|
+
green: "Green",
|
|
1245
|
+
small: "Small",
|
|
1246
|
+
medium: "Medium",
|
|
1247
|
+
large: "Large"
|
|
1248
|
+
};
|
|
1225
1249
|
const administrationProduct = {
|
|
1226
1250
|
detail: detail$e,
|
|
1227
1251
|
variants: variants$1,
|
|
@@ -1230,8 +1254,9 @@ const administrationProduct = {
|
|
|
1230
1254
|
bulkEdit: bulkEdit$2,
|
|
1231
1255
|
listing: listing$d,
|
|
1232
1256
|
tabs: tabs$5,
|
|
1233
|
-
buttons: buttons$
|
|
1234
|
-
modals: modals$2
|
|
1257
|
+
buttons: buttons$9,
|
|
1258
|
+
modals: modals$2,
|
|
1259
|
+
propertyValues: propertyValues$1
|
|
1235
1260
|
};
|
|
1236
1261
|
|
|
1237
1262
|
const common$8 = {
|
|
@@ -1289,6 +1314,7 @@ const addresses$1 = {
|
|
|
1289
1314
|
postalCode: "Postal code",
|
|
1290
1315
|
state: "State",
|
|
1291
1316
|
editAddress: "Edit address",
|
|
1317
|
+
addNewAddress: "Add new address",
|
|
1292
1318
|
useAsDefaultBilling: "Use as default billing address",
|
|
1293
1319
|
useAsDefaultShipping: "Use as default shipping address",
|
|
1294
1320
|
deliveryNotPossible: "A delivery to this country is not possible."
|
|
@@ -1350,7 +1376,7 @@ const common$7 = {
|
|
|
1350
1376
|
street: "Street",
|
|
1351
1377
|
postalCode: "Postal code"
|
|
1352
1378
|
};
|
|
1353
|
-
const actions$
|
|
1379
|
+
const actions$b = {
|
|
1354
1380
|
editAddress: "Edit address",
|
|
1355
1381
|
useAsDefaultBilling: "Use as default billing address",
|
|
1356
1382
|
useAsDefaultShipping: "Use as default shipping address",
|
|
@@ -1361,7 +1387,7 @@ const messages$4 = {
|
|
|
1361
1387
|
};
|
|
1362
1388
|
const storefrontAddress = {
|
|
1363
1389
|
common: common$7,
|
|
1364
|
-
actions: actions$
|
|
1390
|
+
actions: actions$b,
|
|
1365
1391
|
messages: messages$4
|
|
1366
1392
|
};
|
|
1367
1393
|
|
|
@@ -1557,7 +1583,7 @@ const storefrontLogin = {
|
|
|
1557
1583
|
register: register$2
|
|
1558
1584
|
};
|
|
1559
1585
|
|
|
1560
|
-
const actions$
|
|
1586
|
+
const actions$a = {
|
|
1561
1587
|
cancelOrder: "Cancel order",
|
|
1562
1588
|
back: "Back"
|
|
1563
1589
|
};
|
|
@@ -1566,7 +1592,7 @@ const shipping$1 = {
|
|
|
1566
1592
|
express: "Express"
|
|
1567
1593
|
};
|
|
1568
1594
|
const storefrontOrder = {
|
|
1569
|
-
actions: actions$
|
|
1595
|
+
actions: actions$a,
|
|
1570
1596
|
shipping: shipping$1
|
|
1571
1597
|
};
|
|
1572
1598
|
|
|
@@ -1584,13 +1610,13 @@ const methods$3 = {
|
|
|
1584
1610
|
paidInAdvance: "Paid in advance",
|
|
1585
1611
|
invoice: "Invoice"
|
|
1586
1612
|
};
|
|
1587
|
-
const actions$
|
|
1613
|
+
const actions$9 = {
|
|
1588
1614
|
change: "Change",
|
|
1589
1615
|
completePayment: "Complete payment"
|
|
1590
1616
|
};
|
|
1591
1617
|
const storefrontPayment = {
|
|
1592
1618
|
methods: methods$3,
|
|
1593
|
-
actions: actions$
|
|
1619
|
+
actions: actions$9
|
|
1594
1620
|
};
|
|
1595
1621
|
|
|
1596
1622
|
const passwordRecovery$1 = "Password recovery";
|
|
@@ -1617,14 +1643,14 @@ const storefrontRecover = {
|
|
|
1617
1643
|
const general$6 = {
|
|
1618
1644
|
title: "Shopping cart"
|
|
1619
1645
|
};
|
|
1620
|
-
const buttons$
|
|
1646
|
+
const buttons$8 = {
|
|
1621
1647
|
goToCheckout: "Go to checkout",
|
|
1622
1648
|
goToCart: "Display shopping cart",
|
|
1623
1649
|
continueShopping: "Continue shopping"
|
|
1624
1650
|
};
|
|
1625
1651
|
const storefrontOffCanvasCart = {
|
|
1626
1652
|
general: general$6,
|
|
1627
|
-
buttons: buttons$
|
|
1653
|
+
buttons: buttons$8
|
|
1628
1654
|
};
|
|
1629
1655
|
|
|
1630
1656
|
const general$5 = {
|
|
@@ -1635,7 +1661,7 @@ const general$5 = {
|
|
|
1635
1661
|
"delete": "Löschen",
|
|
1636
1662
|
customFields: "Feld"
|
|
1637
1663
|
};
|
|
1638
|
-
const actions$
|
|
1664
|
+
const actions$8 = {
|
|
1639
1665
|
createCategory: "Kategorie erstellen",
|
|
1640
1666
|
addLandingPage: "Landingpage hinzufügen",
|
|
1641
1667
|
configureHomePage: "Startseite konfigurieren",
|
|
@@ -1666,7 +1692,7 @@ const entities = {
|
|
|
1666
1692
|
};
|
|
1667
1693
|
const deAdministrationCategory = {
|
|
1668
1694
|
general: general$5,
|
|
1669
|
-
actions: actions$
|
|
1695
|
+
actions: actions$8,
|
|
1670
1696
|
tabs: tabs$4,
|
|
1671
1697
|
fields: fields$4,
|
|
1672
1698
|
headings: headings$2,
|
|
@@ -1755,7 +1781,7 @@ const common$5 = {
|
|
|
1755
1781
|
};
|
|
1756
1782
|
const listing$9 = {
|
|
1757
1783
|
addCustomField: "Eigenes Feld hinzufügen",
|
|
1758
|
-
addNewSet: "
|
|
1784
|
+
addNewSet: "Set anlegen"
|
|
1759
1785
|
};
|
|
1760
1786
|
const create$6 = {
|
|
1761
1787
|
title: "Neues eigenes Feld",
|
|
@@ -1781,7 +1807,7 @@ const detail$b = {
|
|
|
1781
1807
|
const general$4 = {
|
|
1782
1808
|
customFields: "Feld"
|
|
1783
1809
|
};
|
|
1784
|
-
const actions$
|
|
1810
|
+
const actions$7 = {
|
|
1785
1811
|
edit: "Bearbeiten",
|
|
1786
1812
|
"delete": "Löschen",
|
|
1787
1813
|
cancel: "Abbrechen",
|
|
@@ -1797,7 +1823,7 @@ const deAdministrationCustomField = {
|
|
|
1797
1823
|
create: create$6,
|
|
1798
1824
|
detail: detail$b,
|
|
1799
1825
|
general: general$4,
|
|
1800
|
-
actions: actions$
|
|
1826
|
+
actions: actions$7,
|
|
1801
1827
|
dialogs: dialogs$3
|
|
1802
1828
|
};
|
|
1803
1829
|
|
|
@@ -1826,7 +1852,7 @@ const deAdministrationDashboard = {
|
|
|
1826
1852
|
order: order
|
|
1827
1853
|
};
|
|
1828
1854
|
|
|
1829
|
-
const buttons$
|
|
1855
|
+
const buttons$7 = {
|
|
1830
1856
|
agree: "Zustimmen",
|
|
1831
1857
|
disableDataSharing: "Datenfreigabe deaktivieren"
|
|
1832
1858
|
};
|
|
@@ -1838,7 +1864,7 @@ const headlines = {
|
|
|
1838
1864
|
dataConsent: "Dateneinverständnis"
|
|
1839
1865
|
};
|
|
1840
1866
|
const deAdministrationDataSharing = {
|
|
1841
|
-
buttons: buttons$
|
|
1867
|
+
buttons: buttons$7,
|
|
1842
1868
|
messages: messages$3,
|
|
1843
1869
|
headlines: headlines
|
|
1844
1870
|
};
|
|
@@ -1847,7 +1873,7 @@ const listing$8 = {
|
|
|
1847
1873
|
addDocument: "Dokument hinzufügen"
|
|
1848
1874
|
};
|
|
1849
1875
|
const types = {
|
|
1850
|
-
invoice: "
|
|
1876
|
+
invoice: "invoice"
|
|
1851
1877
|
};
|
|
1852
1878
|
const detail$a = {
|
|
1853
1879
|
displayDocumentInMyAccount: "Dokument in \"Mein Konto\" Bereich anzeigen",
|
|
@@ -1862,7 +1888,7 @@ const deAdministrationDocument = {
|
|
|
1862
1888
|
const welcome = {
|
|
1863
1889
|
text: "Willkommen bei der Shopware 6 Administration"
|
|
1864
1890
|
};
|
|
1865
|
-
const buttons$
|
|
1891
|
+
const buttons$6 = {
|
|
1866
1892
|
install: "Installieren",
|
|
1867
1893
|
installMigrationAssistant: "Migration Assistant installieren",
|
|
1868
1894
|
installDemoData: "Demodaten installieren"
|
|
@@ -1894,7 +1920,7 @@ const regions = {
|
|
|
1894
1920
|
};
|
|
1895
1921
|
const deAdministrationFirstRunWizard = {
|
|
1896
1922
|
welcome: welcome,
|
|
1897
|
-
buttons: buttons$
|
|
1923
|
+
buttons: buttons$6,
|
|
1898
1924
|
headers: headers,
|
|
1899
1925
|
fields: fields$3,
|
|
1900
1926
|
placeholders: placeholders,
|
|
@@ -1914,7 +1940,7 @@ const create$5 = {
|
|
|
1914
1940
|
addAction: "Hinzufügen",
|
|
1915
1941
|
addConditionIf: "Hinzufügen",
|
|
1916
1942
|
addActionThen: "Hinzufügen",
|
|
1917
|
-
newFlow: "
|
|
1943
|
+
newFlow: "Neuer Flow",
|
|
1918
1944
|
name: "Name",
|
|
1919
1945
|
description: "Beschreibung",
|
|
1920
1946
|
priority: "Priority",
|
|
@@ -2018,7 +2044,7 @@ const deAdministrationLogin = {
|
|
|
2018
2044
|
};
|
|
2019
2045
|
|
|
2020
2046
|
const listing$5 = {
|
|
2021
|
-
addManufacturer: "Hersteller
|
|
2047
|
+
addManufacturer: "Hersteller anlegen"
|
|
2022
2048
|
};
|
|
2023
2049
|
const create$2 = {
|
|
2024
2050
|
name: "Name",
|
|
@@ -2029,7 +2055,7 @@ const create$2 = {
|
|
|
2029
2055
|
const detail$6 = {
|
|
2030
2056
|
customFields: "Zusatzfelder"
|
|
2031
2057
|
};
|
|
2032
|
-
const actions$
|
|
2058
|
+
const actions$6 = {
|
|
2033
2059
|
edit: "Bearbeiten",
|
|
2034
2060
|
"delete": "Löschen",
|
|
2035
2061
|
cancel: "Abbrechen"
|
|
@@ -2041,12 +2067,29 @@ const deAdministrationManufacturer = {
|
|
|
2041
2067
|
listing: listing$5,
|
|
2042
2068
|
create: create$2,
|
|
2043
2069
|
detail: detail$6,
|
|
2044
|
-
actions: actions$
|
|
2070
|
+
actions: actions$6,
|
|
2045
2071
|
dialogs: dialogs$2
|
|
2046
2072
|
};
|
|
2047
2073
|
|
|
2074
|
+
const buttons$5 = {
|
|
2075
|
+
uploadFile: "Dateien hochladen",
|
|
2076
|
+
addNewFolder: "Neuen Ordner hinzufügen"
|
|
2077
|
+
};
|
|
2078
|
+
const search$1 = {
|
|
2079
|
+
placeholder: "Durchsuche den aktuellen Ordner ..."
|
|
2080
|
+
};
|
|
2081
|
+
const actions$5 = {
|
|
2082
|
+
rename: "Umbenennen",
|
|
2083
|
+
"delete": "Löschen"
|
|
2084
|
+
};
|
|
2085
|
+
const deAdministrationMedia = {
|
|
2086
|
+
buttons: buttons$5,
|
|
2087
|
+
search: search$1,
|
|
2088
|
+
actions: actions$5
|
|
2089
|
+
};
|
|
2090
|
+
|
|
2048
2091
|
const detail$5 = {
|
|
2049
|
-
items: "
|
|
2092
|
+
items: "Positionen",
|
|
2050
2093
|
sendDocument: "Dokument senden",
|
|
2051
2094
|
openActionsMenu: "Aktionsmenü öffnen"
|
|
2052
2095
|
};
|
|
@@ -2117,7 +2160,7 @@ const detail$3 = {
|
|
|
2117
2160
|
customFields: "Feld",
|
|
2118
2161
|
colorProperty: "Color",
|
|
2119
2162
|
sizeProperty: "Size",
|
|
2120
|
-
stockPlaceholder: "
|
|
2163
|
+
stockPlaceholder: "Gib den Lagerbestand ein ...",
|
|
2121
2164
|
restockTimePlaceholder: "Lagerbestand"
|
|
2122
2165
|
};
|
|
2123
2166
|
const errors$1 = {
|
|
@@ -2156,6 +2199,14 @@ const buttons$4 = {
|
|
|
2156
2199
|
const modals$1 = {
|
|
2157
2200
|
generateVariants: "Generate variants"
|
|
2158
2201
|
};
|
|
2202
|
+
const propertyValues = {
|
|
2203
|
+
blue: "Blau",
|
|
2204
|
+
red: "Rot",
|
|
2205
|
+
green: "Grün",
|
|
2206
|
+
small: "Klein",
|
|
2207
|
+
medium: "Mittel",
|
|
2208
|
+
large: "Groß"
|
|
2209
|
+
};
|
|
2159
2210
|
const deAdministrationProduct = {
|
|
2160
2211
|
listing: listing$3,
|
|
2161
2212
|
create: create$1,
|
|
@@ -2166,7 +2217,8 @@ const deAdministrationProduct = {
|
|
|
2166
2217
|
bulkEdit: bulkEdit,
|
|
2167
2218
|
tabs: tabs$2,
|
|
2168
2219
|
buttons: buttons$4,
|
|
2169
|
-
modals: modals$1
|
|
2220
|
+
modals: modals$1,
|
|
2221
|
+
propertyValues: propertyValues
|
|
2170
2222
|
};
|
|
2171
2223
|
|
|
2172
2224
|
const listing$2 = {
|
|
@@ -2203,10 +2255,10 @@ const tabs$1 = {
|
|
|
2203
2255
|
discounts: "Rabatte"
|
|
2204
2256
|
};
|
|
2205
2257
|
const headings$1 = {
|
|
2206
|
-
promotionCodes: "
|
|
2258
|
+
promotionCodes: "Aktionscodes"
|
|
2207
2259
|
};
|
|
2208
2260
|
const cards = {
|
|
2209
|
-
preConditions: "
|
|
2261
|
+
preConditions: "Voraussetzungen"
|
|
2210
2262
|
};
|
|
2211
2263
|
const deAdministrationPromotion = {
|
|
2212
2264
|
listing: listing$2,
|
|
@@ -2376,7 +2428,7 @@ const orders = {
|
|
|
2376
2428
|
download: "Herunterladen",
|
|
2377
2429
|
cancelOrder: "Bestellung stornieren",
|
|
2378
2430
|
repeatOrder: "Bestellung wiederholen",
|
|
2379
|
-
changePaymentMethod: "
|
|
2431
|
+
changePaymentMethod: "Zahlungsart ändern",
|
|
2380
2432
|
actions: "Aktionen",
|
|
2381
2433
|
expand: "Erweitern",
|
|
2382
2434
|
showDetails: "Details anzeigen",
|
|
@@ -2395,6 +2447,7 @@ const addresses = {
|
|
|
2395
2447
|
postalCode: "Postleitzahl",
|
|
2396
2448
|
state: "Bundesland",
|
|
2397
2449
|
editAddress: "Adresse bearbeiten",
|
|
2450
|
+
addNewAddress: "Neue Adresse hinzufügen",
|
|
2398
2451
|
useAsDefaultBilling: "Als Standard-Rechnungsadresse verwenden",
|
|
2399
2452
|
useAsDefaultShipping: "Als Standard-Versandadresse verwenden",
|
|
2400
2453
|
deliveryNotPossible: "Eine Lieferung in dieses Land ist nicht möglich."
|
|
@@ -2519,13 +2572,13 @@ const confirm = {
|
|
|
2519
2572
|
agreeToTerms: "Ich stimme den AGBs zu",
|
|
2520
2573
|
revocationNotice: "Widerrufsbelehrung",
|
|
2521
2574
|
completeOrder: "Bestellung abschließen",
|
|
2522
|
-
submitOrder: "
|
|
2523
|
-
termsAndConditions: "Ich habe die
|
|
2524
|
-
immediateAccessToDigitalProduct: "
|
|
2575
|
+
submitOrder: "Zahlungspflichtig bestellen",
|
|
2576
|
+
termsAndConditions: "Ich habe die AGB gelesen und bin mit ihnen einverstanden.",
|
|
2577
|
+
immediateAccessToDigitalProduct: "Ja, ich möchte sofort Zugang zu dem digitalen Inhalt und weiß, dass mein Widerrufsrecht mit dem Zugang erlischt."
|
|
2525
2578
|
};
|
|
2526
2579
|
const finish = {
|
|
2527
|
-
thankYou: "Vielen Dank für Ihre Bestellung
|
|
2528
|
-
thankYouForOrder: "Vielen Dank für Ihre Bestellung
|
|
2580
|
+
thankYou: "Vielen Dank für Ihre Bestellung",
|
|
2581
|
+
thankYouForOrder: "Vielen Dank für Ihre Bestellung",
|
|
2529
2582
|
orderNumber: "Bestellnummer",
|
|
2530
2583
|
orderConfirmation: "Bestellbestätigung",
|
|
2531
2584
|
continueShopping: "Weiter einkaufen",
|
|
@@ -2598,7 +2651,7 @@ const deStorefrontContact = {
|
|
|
2598
2651
|
};
|
|
2599
2652
|
|
|
2600
2653
|
const skipToContentLink = "Zum Hauptinhalt springen";
|
|
2601
|
-
const searchInputAriaLabel = "Suchbegriff eingeben...";
|
|
2654
|
+
const searchInputAriaLabel = "Suchbegriff eingeben ...";
|
|
2602
2655
|
const deStorefrontHeader = {
|
|
2603
2656
|
skipToContentLink: skipToContentLink,
|
|
2604
2657
|
searchInputAriaLabel: searchInputAriaLabel
|
|
@@ -2844,6 +2897,7 @@ const BUNDLED_RESOURCES = {
|
|
|
2844
2897
|
"administration/flowBuilder": administrationFlowBuilder,
|
|
2845
2898
|
"administration/dashboard": administrationDashboard,
|
|
2846
2899
|
"administration/manufacturer": administrationManufacturer,
|
|
2900
|
+
"administration/media": administrationMedia,
|
|
2847
2901
|
"administration/order": administrationOrder,
|
|
2848
2902
|
"administration/payment": administrationPayment,
|
|
2849
2903
|
"administration/promotion": administrationPromotion,
|
|
@@ -2887,6 +2941,7 @@ const BUNDLED_RESOURCES = {
|
|
|
2887
2941
|
"administration/layout": deAdministrationLayout,
|
|
2888
2942
|
"administration/login": deAdministrationLogin,
|
|
2889
2943
|
"administration/manufacturer": deAdministrationManufacturer,
|
|
2944
|
+
"administration/media": deAdministrationMedia,
|
|
2890
2945
|
"administration/order": deAdministrationOrder,
|
|
2891
2946
|
"administration/payment": deAdministrationPayment,
|
|
2892
2947
|
"administration/product": deAdministrationProduct,
|
|
@@ -2927,6 +2982,7 @@ const baseNamespaces = {
|
|
|
2927
2982
|
flowBuilder: administrationFlowBuilder,
|
|
2928
2983
|
dashboard: administrationDashboard,
|
|
2929
2984
|
manufacturer: administrationManufacturer,
|
|
2985
|
+
media: administrationMedia,
|
|
2930
2986
|
order: administrationOrder,
|
|
2931
2987
|
payment: administrationPayment,
|
|
2932
2988
|
promotion: administrationPromotion,
|
|
@@ -2958,6 +3014,382 @@ const baseNamespaces = {
|
|
|
2958
3014
|
}
|
|
2959
3015
|
};
|
|
2960
3016
|
|
|
3017
|
+
const LOCALE_MAPPINGS = {
|
|
3018
|
+
"en-US": { countryCode: "US", currencyCode: "USD", currencySymbol: "$", languageCode: "en-US" },
|
|
3019
|
+
"en-GB": { countryCode: "GB", currencyCode: "GBP", currencySymbol: "\xA3", languageCode: "en-GB" },
|
|
3020
|
+
"en-DE": { countryCode: "DE", currencyCode: "EUR", currencySymbol: "\u20AC", languageCode: "en-GB" },
|
|
3021
|
+
"de-DE": { countryCode: "DE", currencyCode: "EUR", currencySymbol: "\u20AC", languageCode: "de-DE" }
|
|
3022
|
+
};
|
|
3023
|
+
const COUNTRY_ADDRESS_DATA = {
|
|
3024
|
+
DE: {
|
|
3025
|
+
street: "Ebbinghof 10",
|
|
3026
|
+
city: "Sch\xF6ppingen",
|
|
3027
|
+
country: "Germany",
|
|
3028
|
+
postalCode: "48624",
|
|
3029
|
+
vatRegNo: "DE1234567890"
|
|
3030
|
+
},
|
|
3031
|
+
US: {
|
|
3032
|
+
street: "1600 Pennsylvania Avenue NW",
|
|
3033
|
+
city: "Washington",
|
|
3034
|
+
country: "United States",
|
|
3035
|
+
postalCode: "20500",
|
|
3036
|
+
vatRegNo: "US123456789"
|
|
3037
|
+
},
|
|
3038
|
+
GB: {
|
|
3039
|
+
street: "10 Downing Street",
|
|
3040
|
+
city: "London",
|
|
3041
|
+
country: "United Kingdom",
|
|
3042
|
+
postalCode: "SW1A 2AA",
|
|
3043
|
+
vatRegNo: "GB123456789"
|
|
3044
|
+
}
|
|
3045
|
+
};
|
|
3046
|
+
const getCountryAddressData = (countryCode) => {
|
|
3047
|
+
const code = countryCode || getCountryCodeFromLocale(getLocale());
|
|
3048
|
+
if (code in COUNTRY_ADDRESS_DATA) {
|
|
3049
|
+
return COUNTRY_ADDRESS_DATA[code];
|
|
3050
|
+
}
|
|
3051
|
+
return COUNTRY_ADDRESS_DATA.GB;
|
|
3052
|
+
};
|
|
3053
|
+
const getLocale = () => {
|
|
3054
|
+
const rawLocale = process.env.LANG || process.env.LANGUAGE || process.env.lang || "en-GB";
|
|
3055
|
+
const locale = rawLocale.split(".")[0].replace(/_/g, "-");
|
|
3056
|
+
return LOCALE_MAPPINGS[locale] ? locale : "en-GB";
|
|
3057
|
+
};
|
|
3058
|
+
const getLanguageCode = (locale) => {
|
|
3059
|
+
const mapping = LOCALE_MAPPINGS[locale];
|
|
3060
|
+
return mapping ? mapping.languageCode : "en-GB";
|
|
3061
|
+
};
|
|
3062
|
+
const getCountryCodeFromLocale = (locale) => {
|
|
3063
|
+
const mapping = LOCALE_MAPPINGS[locale];
|
|
3064
|
+
return mapping ? mapping.countryCode : "GB";
|
|
3065
|
+
};
|
|
3066
|
+
const getCurrencyCodeFromLocale = (locale) => {
|
|
3067
|
+
const mapping = LOCALE_MAPPINGS[locale];
|
|
3068
|
+
return mapping ? mapping.currencyCode : "GBP";
|
|
3069
|
+
};
|
|
3070
|
+
const getCurrencySymbolFromLocale = (locale) => {
|
|
3071
|
+
const mapping = LOCALE_MAPPINGS[locale];
|
|
3072
|
+
return mapping ? mapping.currencySymbol : "\xA3";
|
|
3073
|
+
};
|
|
3074
|
+
const getLanguageData = async (adminApiContext, languageCode) => {
|
|
3075
|
+
const code = languageCode || getLanguageCode(getLocale());
|
|
3076
|
+
const resp = await adminApiContext.post("search/language", {
|
|
3077
|
+
data: {
|
|
3078
|
+
limit: 1,
|
|
3079
|
+
filter: [
|
|
3080
|
+
{
|
|
3081
|
+
type: "equals",
|
|
3082
|
+
field: "translationCode.code",
|
|
3083
|
+
value: code
|
|
3084
|
+
}
|
|
3085
|
+
],
|
|
3086
|
+
associations: { translationCode: {} }
|
|
3087
|
+
}
|
|
3088
|
+
});
|
|
3089
|
+
const result = await resp.json();
|
|
3090
|
+
if (result.data.length === 0) {
|
|
3091
|
+
throw new Error(`Language ${code} not found`);
|
|
3092
|
+
}
|
|
3093
|
+
return result.data[0];
|
|
3094
|
+
};
|
|
3095
|
+
const getSnippetSetId = async (adminApiContext, languageCode) => {
|
|
3096
|
+
const code = languageCode || getLanguageCode(getLocale());
|
|
3097
|
+
const resp = await adminApiContext.post("search/snippet-set", {
|
|
3098
|
+
data: {
|
|
3099
|
+
limit: 1,
|
|
3100
|
+
filter: [
|
|
3101
|
+
{
|
|
3102
|
+
type: "equals",
|
|
3103
|
+
field: "iso",
|
|
3104
|
+
value: code
|
|
3105
|
+
}
|
|
3106
|
+
]
|
|
3107
|
+
}
|
|
3108
|
+
});
|
|
3109
|
+
const result = await resp.json();
|
|
3110
|
+
return result.data[0].id;
|
|
3111
|
+
};
|
|
3112
|
+
const getCurrency = async (adminApiContext, isoCode) => {
|
|
3113
|
+
const code = isoCode || getCurrencyCodeFromLocale(getLocale());
|
|
3114
|
+
const resp = await adminApiContext.post("search/currency", {
|
|
3115
|
+
data: {
|
|
3116
|
+
limit: 1,
|
|
3117
|
+
filter: [
|
|
3118
|
+
{
|
|
3119
|
+
type: "equals",
|
|
3120
|
+
field: "isoCode",
|
|
3121
|
+
value: code
|
|
3122
|
+
}
|
|
3123
|
+
]
|
|
3124
|
+
}
|
|
3125
|
+
});
|
|
3126
|
+
const result = await resp.json();
|
|
3127
|
+
if (result.data.length === 0) {
|
|
3128
|
+
throw new Error(`Currency ${code} not found`);
|
|
3129
|
+
}
|
|
3130
|
+
return result.data[0];
|
|
3131
|
+
};
|
|
3132
|
+
const getTaxId = async (adminApiContext) => {
|
|
3133
|
+
const resp = await adminApiContext.post("search/tax", {
|
|
3134
|
+
data: { limit: 1 }
|
|
3135
|
+
});
|
|
3136
|
+
const result = await resp.json();
|
|
3137
|
+
return result.data[0].id;
|
|
3138
|
+
};
|
|
3139
|
+
const getPaymentMethodId = async (adminApiContext, handlerId) => {
|
|
3140
|
+
const handler = handlerId || "Shopware\\Core\\Checkout\\Payment\\Cart\\PaymentHandler\\InvoicePayment";
|
|
3141
|
+
const resp = await adminApiContext.post("search/payment-method", {
|
|
3142
|
+
data: {
|
|
3143
|
+
limit: 1,
|
|
3144
|
+
filter: [
|
|
3145
|
+
{
|
|
3146
|
+
type: "equals",
|
|
3147
|
+
field: "handlerIdentifier",
|
|
3148
|
+
value: handler
|
|
3149
|
+
}
|
|
3150
|
+
]
|
|
3151
|
+
}
|
|
3152
|
+
});
|
|
3153
|
+
const result = await resp.json();
|
|
3154
|
+
return result.data[0].id;
|
|
3155
|
+
};
|
|
3156
|
+
const getDefaultShippingMethodId = async (adminApiContext) => {
|
|
3157
|
+
const resp = await adminApiContext.post("search/shipping-method", {
|
|
3158
|
+
data: {
|
|
3159
|
+
limit: 1,
|
|
3160
|
+
filter: [
|
|
3161
|
+
{
|
|
3162
|
+
type: "equals",
|
|
3163
|
+
field: "name",
|
|
3164
|
+
value: "Standard"
|
|
3165
|
+
}
|
|
3166
|
+
]
|
|
3167
|
+
}
|
|
3168
|
+
});
|
|
3169
|
+
const result = await resp.json();
|
|
3170
|
+
return result.data[0].id;
|
|
3171
|
+
};
|
|
3172
|
+
const getShippingMethodId = async (name, adminApiContext) => {
|
|
3173
|
+
const resp = await adminApiContext.post("search/shipping-method", {
|
|
3174
|
+
data: {
|
|
3175
|
+
limit: 1,
|
|
3176
|
+
filter: [
|
|
3177
|
+
{
|
|
3178
|
+
type: "equals",
|
|
3179
|
+
field: "name",
|
|
3180
|
+
value: name
|
|
3181
|
+
}
|
|
3182
|
+
]
|
|
3183
|
+
}
|
|
3184
|
+
});
|
|
3185
|
+
const result = await resp.json();
|
|
3186
|
+
return result.data[0].id;
|
|
3187
|
+
};
|
|
3188
|
+
const getCountryId = async (iso2, adminApiContext) => {
|
|
3189
|
+
const resp = await adminApiContext.post("search/country", {
|
|
3190
|
+
data: {
|
|
3191
|
+
limit: 1,
|
|
3192
|
+
filter: [
|
|
3193
|
+
{
|
|
3194
|
+
type: "equals",
|
|
3195
|
+
field: "iso",
|
|
3196
|
+
value: iso2
|
|
3197
|
+
}
|
|
3198
|
+
]
|
|
3199
|
+
}
|
|
3200
|
+
});
|
|
3201
|
+
const result = await resp.json();
|
|
3202
|
+
return result.data[0].id;
|
|
3203
|
+
};
|
|
3204
|
+
const getThemeId = async (technicalName, adminApiContext) => {
|
|
3205
|
+
const resp = await adminApiContext.post("search/theme", {
|
|
3206
|
+
data: {
|
|
3207
|
+
limit: 1,
|
|
3208
|
+
filter: [
|
|
3209
|
+
{
|
|
3210
|
+
type: "equals",
|
|
3211
|
+
field: "technicalName",
|
|
3212
|
+
value: technicalName
|
|
3213
|
+
}
|
|
3214
|
+
]
|
|
3215
|
+
}
|
|
3216
|
+
});
|
|
3217
|
+
const result = await resp.json();
|
|
3218
|
+
return result.data[0].id;
|
|
3219
|
+
};
|
|
3220
|
+
const getSalutationId = async (salutationKey, adminApiContext) => {
|
|
3221
|
+
const resp = await adminApiContext.post("search/salutation", {
|
|
3222
|
+
data: {
|
|
3223
|
+
limit: 1,
|
|
3224
|
+
filter: [
|
|
3225
|
+
{
|
|
3226
|
+
type: "equals",
|
|
3227
|
+
field: "salutationKey",
|
|
3228
|
+
value: salutationKey
|
|
3229
|
+
}
|
|
3230
|
+
]
|
|
3231
|
+
}
|
|
3232
|
+
});
|
|
3233
|
+
const result = await resp.json();
|
|
3234
|
+
return result.data[0].id;
|
|
3235
|
+
};
|
|
3236
|
+
const getStateMachineId = async (technicalName, adminApiContext) => {
|
|
3237
|
+
const resp = await adminApiContext.post("search/state-machine", {
|
|
3238
|
+
data: {
|
|
3239
|
+
limit: 1,
|
|
3240
|
+
filter: [
|
|
3241
|
+
{
|
|
3242
|
+
type: "equals",
|
|
3243
|
+
field: "technicalName",
|
|
3244
|
+
value: technicalName
|
|
3245
|
+
}
|
|
3246
|
+
]
|
|
3247
|
+
}
|
|
3248
|
+
});
|
|
3249
|
+
const result = await resp.json();
|
|
3250
|
+
return result.data[0].id;
|
|
3251
|
+
};
|
|
3252
|
+
const getStateMachineStateId = async (stateMachineId, adminApiContext) => {
|
|
3253
|
+
const resp = await adminApiContext.post("search/state-machine-state", {
|
|
3254
|
+
data: {
|
|
3255
|
+
limit: 1,
|
|
3256
|
+
filter: [
|
|
3257
|
+
{
|
|
3258
|
+
type: "equals",
|
|
3259
|
+
field: "stateMachineId",
|
|
3260
|
+
value: stateMachineId
|
|
3261
|
+
}
|
|
3262
|
+
]
|
|
3263
|
+
}
|
|
3264
|
+
});
|
|
3265
|
+
const result = await resp.json();
|
|
3266
|
+
return result.data[0].id;
|
|
3267
|
+
};
|
|
3268
|
+
const getFlowId = async (flowName, adminApiContext) => {
|
|
3269
|
+
const resp = await adminApiContext.post("./search/flow", {
|
|
3270
|
+
data: {
|
|
3271
|
+
limit: 1,
|
|
3272
|
+
filter: [
|
|
3273
|
+
{
|
|
3274
|
+
type: "equals",
|
|
3275
|
+
field: "name",
|
|
3276
|
+
value: flowName
|
|
3277
|
+
}
|
|
3278
|
+
]
|
|
3279
|
+
}
|
|
3280
|
+
});
|
|
3281
|
+
const result = await resp.json();
|
|
3282
|
+
return result.data[0].id;
|
|
3283
|
+
};
|
|
3284
|
+
const getOrderTransactionId = async (orderId, adminApiContext) => {
|
|
3285
|
+
const orderTransactionResponse = await adminApiContext.get(`order/${orderId}/transactions?_response`);
|
|
3286
|
+
const { data: orderTransaction } = await orderTransactionResponse.json();
|
|
3287
|
+
return orderTransaction[0].id;
|
|
3288
|
+
};
|
|
3289
|
+
const getMediaId = async (fileName, adminApiContext) => {
|
|
3290
|
+
const resp = await adminApiContext.post("./search/media", {
|
|
3291
|
+
data: {
|
|
3292
|
+
limit: 1,
|
|
3293
|
+
filter: [
|
|
3294
|
+
{
|
|
3295
|
+
type: "equals",
|
|
3296
|
+
field: "fileName",
|
|
3297
|
+
value: fileName
|
|
3298
|
+
}
|
|
3299
|
+
]
|
|
3300
|
+
}
|
|
3301
|
+
});
|
|
3302
|
+
const result = await resp.json();
|
|
3303
|
+
return result.data[0].id;
|
|
3304
|
+
};
|
|
3305
|
+
const getFlowTemplate = async (flowTemplateId, adminApiContext) => {
|
|
3306
|
+
const flowTemplateResponse = await adminApiContext.post(`search/flow-template`, {
|
|
3307
|
+
data: {
|
|
3308
|
+
limit: 1,
|
|
3309
|
+
filter: [
|
|
3310
|
+
{
|
|
3311
|
+
type: "equals",
|
|
3312
|
+
field: "id",
|
|
3313
|
+
value: flowTemplateId
|
|
3314
|
+
}
|
|
3315
|
+
]
|
|
3316
|
+
}
|
|
3317
|
+
});
|
|
3318
|
+
const result = await flowTemplateResponse.json();
|
|
3319
|
+
return result.data[0];
|
|
3320
|
+
};
|
|
3321
|
+
const getFlow = async (flowId, adminApiContext) => {
|
|
3322
|
+
const flowResponse = await adminApiContext.post(`search/flow`, {
|
|
3323
|
+
data: {
|
|
3324
|
+
limit: 1,
|
|
3325
|
+
filter: [
|
|
3326
|
+
{
|
|
3327
|
+
type: "equals",
|
|
3328
|
+
field: "id",
|
|
3329
|
+
value: flowId
|
|
3330
|
+
}
|
|
3331
|
+
],
|
|
3332
|
+
associations: { sequences: {} }
|
|
3333
|
+
}
|
|
3334
|
+
});
|
|
3335
|
+
const result = await flowResponse.json();
|
|
3336
|
+
return result.data[0];
|
|
3337
|
+
};
|
|
3338
|
+
const compareFlowTemplateWithFlow = async (flowId, flowTemplateId, adminApiContext) => {
|
|
3339
|
+
const flowTemplateData = await getFlowTemplate(flowTemplateId, adminApiContext);
|
|
3340
|
+
const flowData = await getFlow(flowId, adminApiContext);
|
|
3341
|
+
if (flowTemplateData.config.eventName != flowData.eventName) {
|
|
3342
|
+
return false;
|
|
3343
|
+
}
|
|
3344
|
+
let i = 0;
|
|
3345
|
+
for (const sequenceTemplate of flowTemplateData.config.sequences) {
|
|
3346
|
+
if (sequenceTemplate.actionName != flowData.sequences[i].actionName) {
|
|
3347
|
+
return false;
|
|
3348
|
+
}
|
|
3349
|
+
if (JSON.stringify(sequenceTemplate.config) != JSON.stringify(flowData.sequences[i].config)) {
|
|
3350
|
+
return false;
|
|
3351
|
+
}
|
|
3352
|
+
i++;
|
|
3353
|
+
}
|
|
3354
|
+
return true;
|
|
3355
|
+
};
|
|
3356
|
+
function extractIdFromUrl(url) {
|
|
3357
|
+
const segments = url.split("/");
|
|
3358
|
+
return segments.length > 0 ? segments[segments.length - 1] : null;
|
|
3359
|
+
}
|
|
3360
|
+
const setOrderStatus = async (orderId, orderStatus, adminApiContext) => {
|
|
3361
|
+
return await adminApiContext.post(`./_action/order/${orderId}/state/${orderStatus}`);
|
|
3362
|
+
};
|
|
3363
|
+
const getPromotionWithDiscount = async (promotionId, adminApiContext) => {
|
|
3364
|
+
const resp = await adminApiContext.post("search/promotion", {
|
|
3365
|
+
data: {
|
|
3366
|
+
limit: 1,
|
|
3367
|
+
associations: {
|
|
3368
|
+
discounts: {
|
|
3369
|
+
limit: 10,
|
|
3370
|
+
type: "equals",
|
|
3371
|
+
field: "promotionId",
|
|
3372
|
+
value: promotionId
|
|
3373
|
+
}
|
|
3374
|
+
},
|
|
3375
|
+
filter: [
|
|
3376
|
+
{
|
|
3377
|
+
type: "equals",
|
|
3378
|
+
field: "id",
|
|
3379
|
+
value: promotionId
|
|
3380
|
+
}
|
|
3381
|
+
]
|
|
3382
|
+
}
|
|
3383
|
+
});
|
|
3384
|
+
const { data: promotion } = await resp.json();
|
|
3385
|
+
return promotion[0];
|
|
3386
|
+
};
|
|
3387
|
+
const updateAdminUser = async (adminUserId, adminApiContext, data) => {
|
|
3388
|
+
await adminApiContext.patch(`user/${adminUserId}?_response=basic`, {
|
|
3389
|
+
data
|
|
3390
|
+
});
|
|
3391
|
+
};
|
|
3392
|
+
|
|
2961
3393
|
function normalizeLanguage(input) {
|
|
2962
3394
|
if (!input) return "en";
|
|
2963
3395
|
const first = input.split(",")[0].split(";")[0].trim().replace(/\.(?:UTF-8|utf-8|utf8)$/i, "").replace(/_/g, "-");
|
|
@@ -3002,7 +3434,7 @@ class LanguageHelper {
|
|
|
3002
3434
|
const i18nextKey = `${area}/${namespace}:${keyParts.join(":")}`;
|
|
3003
3435
|
return this.i18nInstance.t(i18nextKey, options);
|
|
3004
3436
|
}
|
|
3005
|
-
return fallbackTranslate(key, this.resources);
|
|
3437
|
+
return fallbackTranslate(key, this.resources, options);
|
|
3006
3438
|
}
|
|
3007
3439
|
static async createInstance(rawLanguage, customResources) {
|
|
3008
3440
|
const lng = normalizeLanguage(rawLanguage);
|
|
@@ -3047,22 +3479,9 @@ function setCurrentContext(context) {
|
|
|
3047
3479
|
function getCurrentContext() {
|
|
3048
3480
|
return contextStore.getStore();
|
|
3049
3481
|
}
|
|
3050
|
-
|
|
3051
|
-
async function getGlobalTranslator(customResources) {
|
|
3052
|
-
if (!globalTranslator) {
|
|
3053
|
-
try {
|
|
3054
|
-
const language = process.env.LANG || process.env.LANGUAGE || process.env.lang || "en";
|
|
3055
|
-
globalTranslator = await LanguageHelper.createInstance(language, customResources);
|
|
3056
|
-
} catch (error) {
|
|
3057
|
-
console.warn("Could not initialize global translator, using fallback:", error);
|
|
3058
|
-
return null;
|
|
3059
|
-
}
|
|
3060
|
-
}
|
|
3061
|
-
return globalTranslator;
|
|
3062
|
-
}
|
|
3063
|
-
function fallbackTranslate(key, customResources) {
|
|
3482
|
+
function fallbackTranslate(key, customResources, options) {
|
|
3064
3483
|
const [area, namespace, ...keyPath] = key.split(":");
|
|
3065
|
-
const language =
|
|
3484
|
+
const language = getLocale();
|
|
3066
3485
|
const normalizedLang = language.toLowerCase().startsWith("de") ? "de" : "en";
|
|
3067
3486
|
const resources = customResources?.[normalizedLang] || BUNDLED_RESOURCES[normalizedLang];
|
|
3068
3487
|
const resourceKey = `${area}/${namespace}`;
|
|
@@ -3077,7 +3496,16 @@ function fallbackTranslate(key, customResources) {
|
|
|
3077
3496
|
return key;
|
|
3078
3497
|
}
|
|
3079
3498
|
}
|
|
3080
|
-
|
|
3499
|
+
if (typeof value === "string") {
|
|
3500
|
+
if (options) {
|
|
3501
|
+
return value.replace(/\{\{(\w+)\}\}/g, (match, varName) => {
|
|
3502
|
+
const replacement = options[varName];
|
|
3503
|
+
return replacement !== void 0 ? String(replacement) : match;
|
|
3504
|
+
});
|
|
3505
|
+
}
|
|
3506
|
+
return value;
|
|
3507
|
+
}
|
|
3508
|
+
return key;
|
|
3081
3509
|
}
|
|
3082
3510
|
return key;
|
|
3083
3511
|
}
|
|
@@ -3089,18 +3517,7 @@ function translate(key, options) {
|
|
|
3089
3517
|
return translator.translate(key, options);
|
|
3090
3518
|
}
|
|
3091
3519
|
}
|
|
3092
|
-
|
|
3093
|
-
return globalTranslator.translate(key, options);
|
|
3094
|
-
}
|
|
3095
|
-
if (!globalTranslator) {
|
|
3096
|
-
getGlobalTranslator().catch(() => {
|
|
3097
|
-
});
|
|
3098
|
-
}
|
|
3099
|
-
return fallbackTranslate(key);
|
|
3100
|
-
}
|
|
3101
|
-
if (typeof window === "undefined") {
|
|
3102
|
-
getGlobalTranslator().catch(() => {
|
|
3103
|
-
});
|
|
3520
|
+
return fallbackTranslate(key, void 0, options);
|
|
3104
3521
|
}
|
|
3105
3522
|
|
|
3106
3523
|
const LanguageHelper$1 = {
|
|
@@ -3160,7 +3577,7 @@ async function createNewAdminPageContext(merchant, browser, SalesChannelBaseConf
|
|
|
3160
3577
|
|
|
3161
3578
|
const test$b = test$e.extend({
|
|
3162
3579
|
AdminPage: async ({ IdProvider, AdminApiContext, SalesChannelBaseConfig, browser, CustomTranslationResources }, use) => {
|
|
3163
|
-
const locale =
|
|
3580
|
+
const locale = getLocale();
|
|
3164
3581
|
const languageHelper = await LanguageHelper.createInstance(locale, CustomTranslationResources);
|
|
3165
3582
|
const { id, uuid } = IdProvider.getIdPair();
|
|
3166
3583
|
const adminUser = {
|
|
@@ -3168,7 +3585,7 @@ const test$b = test$e.extend({
|
|
|
3168
3585
|
username: `admin_${id}`,
|
|
3169
3586
|
firstName: `${id} admin`,
|
|
3170
3587
|
lastName: `${id} admin`,
|
|
3171
|
-
localeId: SalesChannelBaseConfig.
|
|
3588
|
+
localeId: SalesChannelBaseConfig.currentLocaleId,
|
|
3172
3589
|
email: `admin_${id}@example.com`,
|
|
3173
3590
|
timezone: "Europe/Berlin",
|
|
3174
3591
|
password: "shopware",
|
|
@@ -3188,7 +3605,7 @@ const test$b = test$e.extend({
|
|
|
3188
3605
|
},
|
|
3189
3606
|
StorefrontPage: async ({ DefaultSalesChannel, SalesChannelBaseConfig, browser, AdminApiContext, InstanceMeta, CustomTranslationResources }, use) => {
|
|
3190
3607
|
const { url, salesChannel } = DefaultSalesChannel;
|
|
3191
|
-
const locale =
|
|
3608
|
+
const locale = getLocale();
|
|
3192
3609
|
const languageHelper = await LanguageHelper.createInstance(locale, CustomTranslationResources);
|
|
3193
3610
|
const context = await browser.newContext({
|
|
3194
3611
|
baseURL: url,
|
|
@@ -3219,7 +3636,7 @@ const test$b = test$e.extend({
|
|
|
3219
3636
|
await context.close();
|
|
3220
3637
|
},
|
|
3221
3638
|
InstallPage: async ({ browser, CustomTranslationResources }, use) => {
|
|
3222
|
-
const locale =
|
|
3639
|
+
const locale = getLocale();
|
|
3223
3640
|
const languageHelper = await LanguageHelper.createInstance(locale, CustomTranslationResources);
|
|
3224
3641
|
const context = await browser.newContext({
|
|
3225
3642
|
baseURL: process.env["APP_URL"],
|
|
@@ -3365,290 +3782,6 @@ function encodeImage(image) {
|
|
|
3365
3782
|
return Buffer.from(encode(image));
|
|
3366
3783
|
}
|
|
3367
3784
|
|
|
3368
|
-
const getLanguageData = async (languageCode, adminApiContext) => {
|
|
3369
|
-
const resp = await adminApiContext.post("search/language", {
|
|
3370
|
-
data: {
|
|
3371
|
-
limit: 1,
|
|
3372
|
-
filter: [{
|
|
3373
|
-
type: "equals",
|
|
3374
|
-
field: "translationCode.code",
|
|
3375
|
-
value: languageCode
|
|
3376
|
-
}],
|
|
3377
|
-
associations: { translationCode: {} }
|
|
3378
|
-
}
|
|
3379
|
-
});
|
|
3380
|
-
const result = await resp.json();
|
|
3381
|
-
if (result.data.length === 0) {
|
|
3382
|
-
throw new Error(`Language ${languageCode} not found`);
|
|
3383
|
-
}
|
|
3384
|
-
return result.data[0];
|
|
3385
|
-
};
|
|
3386
|
-
const getSnippetSetId = async (languageCode, adminApiContext) => {
|
|
3387
|
-
const resp = await adminApiContext.post("search/snippet-set", {
|
|
3388
|
-
data: {
|
|
3389
|
-
limit: 1,
|
|
3390
|
-
filter: [{
|
|
3391
|
-
type: "equals",
|
|
3392
|
-
field: "iso",
|
|
3393
|
-
value: languageCode
|
|
3394
|
-
}]
|
|
3395
|
-
}
|
|
3396
|
-
});
|
|
3397
|
-
const result = await resp.json();
|
|
3398
|
-
return result.data[0].id;
|
|
3399
|
-
};
|
|
3400
|
-
const getCurrency = async (isoCode, adminApiContext) => {
|
|
3401
|
-
const resp = await adminApiContext.post("search/currency", {
|
|
3402
|
-
data: {
|
|
3403
|
-
limit: 1,
|
|
3404
|
-
filter: [{
|
|
3405
|
-
type: "equals",
|
|
3406
|
-
field: "isoCode",
|
|
3407
|
-
value: isoCode
|
|
3408
|
-
}]
|
|
3409
|
-
}
|
|
3410
|
-
});
|
|
3411
|
-
const result = await resp.json();
|
|
3412
|
-
if (result.data.length === 0) {
|
|
3413
|
-
throw new Error(`Currency ${isoCode} not found`);
|
|
3414
|
-
}
|
|
3415
|
-
return result.data[0];
|
|
3416
|
-
};
|
|
3417
|
-
const getTaxId = async (adminApiContext) => {
|
|
3418
|
-
const resp = await adminApiContext.post("search/tax", {
|
|
3419
|
-
data: { limit: 1 }
|
|
3420
|
-
});
|
|
3421
|
-
const result = await resp.json();
|
|
3422
|
-
return result.data[0].id;
|
|
3423
|
-
};
|
|
3424
|
-
const getPaymentMethodId = async (adminApiContext, handlerId) => {
|
|
3425
|
-
const handler = handlerId || "Shopware\\Core\\Checkout\\Payment\\Cart\\PaymentHandler\\InvoicePayment";
|
|
3426
|
-
const resp = await adminApiContext.post("search/payment-method", {
|
|
3427
|
-
data: {
|
|
3428
|
-
limit: 1,
|
|
3429
|
-
filter: [{
|
|
3430
|
-
type: "equals",
|
|
3431
|
-
field: "handlerIdentifier",
|
|
3432
|
-
value: handler
|
|
3433
|
-
}]
|
|
3434
|
-
}
|
|
3435
|
-
});
|
|
3436
|
-
const result = await resp.json();
|
|
3437
|
-
return result.data[0].id;
|
|
3438
|
-
};
|
|
3439
|
-
const getDefaultShippingMethodId = async (adminApiContext) => {
|
|
3440
|
-
const resp = await adminApiContext.post("search/shipping-method", {
|
|
3441
|
-
data: {
|
|
3442
|
-
limit: 1,
|
|
3443
|
-
filter: [{
|
|
3444
|
-
type: "equals",
|
|
3445
|
-
field: "name",
|
|
3446
|
-
value: "Standard"
|
|
3447
|
-
}]
|
|
3448
|
-
}
|
|
3449
|
-
});
|
|
3450
|
-
const result = await resp.json();
|
|
3451
|
-
return result.data[0].id;
|
|
3452
|
-
};
|
|
3453
|
-
const getShippingMethodId = async (name, adminApiContext) => {
|
|
3454
|
-
const resp = await adminApiContext.post("search/shipping-method", {
|
|
3455
|
-
data: {
|
|
3456
|
-
limit: 1,
|
|
3457
|
-
filter: [{
|
|
3458
|
-
type: "equals",
|
|
3459
|
-
field: "name",
|
|
3460
|
-
value: name
|
|
3461
|
-
}]
|
|
3462
|
-
}
|
|
3463
|
-
});
|
|
3464
|
-
const result = await resp.json();
|
|
3465
|
-
return result.data[0].id;
|
|
3466
|
-
};
|
|
3467
|
-
const getCountryId = async (iso2, adminApiContext) => {
|
|
3468
|
-
const resp = await adminApiContext.post("search/country", {
|
|
3469
|
-
data: {
|
|
3470
|
-
limit: 1,
|
|
3471
|
-
filter: [{
|
|
3472
|
-
type: "equals",
|
|
3473
|
-
field: "iso",
|
|
3474
|
-
value: iso2
|
|
3475
|
-
}]
|
|
3476
|
-
}
|
|
3477
|
-
});
|
|
3478
|
-
const result = await resp.json();
|
|
3479
|
-
return result.data[0].id;
|
|
3480
|
-
};
|
|
3481
|
-
const getThemeId = async (technicalName, adminApiContext) => {
|
|
3482
|
-
const resp = await adminApiContext.post("search/theme", {
|
|
3483
|
-
data: {
|
|
3484
|
-
limit: 1,
|
|
3485
|
-
filter: [{
|
|
3486
|
-
type: "equals",
|
|
3487
|
-
field: "technicalName",
|
|
3488
|
-
value: technicalName
|
|
3489
|
-
}]
|
|
3490
|
-
}
|
|
3491
|
-
});
|
|
3492
|
-
const result = await resp.json();
|
|
3493
|
-
return result.data[0].id;
|
|
3494
|
-
};
|
|
3495
|
-
const getSalutationId = async (salutationKey, adminApiContext) => {
|
|
3496
|
-
const resp = await adminApiContext.post("search/salutation", {
|
|
3497
|
-
data: {
|
|
3498
|
-
limit: 1,
|
|
3499
|
-
filter: [{
|
|
3500
|
-
type: "equals",
|
|
3501
|
-
field: "salutationKey",
|
|
3502
|
-
value: salutationKey
|
|
3503
|
-
}]
|
|
3504
|
-
}
|
|
3505
|
-
});
|
|
3506
|
-
const result = await resp.json();
|
|
3507
|
-
return result.data[0].id;
|
|
3508
|
-
};
|
|
3509
|
-
const getStateMachineId = async (technicalName, adminApiContext) => {
|
|
3510
|
-
const resp = await adminApiContext.post("search/state-machine", {
|
|
3511
|
-
data: {
|
|
3512
|
-
limit: 1,
|
|
3513
|
-
filter: [{
|
|
3514
|
-
type: "equals",
|
|
3515
|
-
field: "technicalName",
|
|
3516
|
-
value: technicalName
|
|
3517
|
-
}]
|
|
3518
|
-
}
|
|
3519
|
-
});
|
|
3520
|
-
const result = await resp.json();
|
|
3521
|
-
return result.data[0].id;
|
|
3522
|
-
};
|
|
3523
|
-
const getStateMachineStateId = async (stateMachineId, adminApiContext) => {
|
|
3524
|
-
const resp = await adminApiContext.post("search/state-machine-state", {
|
|
3525
|
-
data: {
|
|
3526
|
-
limit: 1,
|
|
3527
|
-
filter: [{
|
|
3528
|
-
type: "equals",
|
|
3529
|
-
field: "stateMachineId",
|
|
3530
|
-
value: stateMachineId
|
|
3531
|
-
}]
|
|
3532
|
-
}
|
|
3533
|
-
});
|
|
3534
|
-
const result = await resp.json();
|
|
3535
|
-
return result.data[0].id;
|
|
3536
|
-
};
|
|
3537
|
-
const getFlowId = async (flowName, adminApiContext) => {
|
|
3538
|
-
const resp = await adminApiContext.post("./search/flow", {
|
|
3539
|
-
data: {
|
|
3540
|
-
limit: 1,
|
|
3541
|
-
filter: [{
|
|
3542
|
-
type: "equals",
|
|
3543
|
-
field: "name",
|
|
3544
|
-
value: flowName
|
|
3545
|
-
}]
|
|
3546
|
-
}
|
|
3547
|
-
});
|
|
3548
|
-
const result = await resp.json();
|
|
3549
|
-
return result.data[0].id;
|
|
3550
|
-
};
|
|
3551
|
-
const getOrderTransactionId = async (orderId, adminApiContext) => {
|
|
3552
|
-
const orderTransactionResponse = await adminApiContext.get(`order/${orderId}/transactions?_response`);
|
|
3553
|
-
const { data: orderTransaction } = await orderTransactionResponse.json();
|
|
3554
|
-
return orderTransaction[0].id;
|
|
3555
|
-
};
|
|
3556
|
-
const getMediaId = async (fileName, adminApiContext) => {
|
|
3557
|
-
const resp = await adminApiContext.post("./search/media", {
|
|
3558
|
-
data: {
|
|
3559
|
-
limit: 1,
|
|
3560
|
-
filter: [{
|
|
3561
|
-
type: "equals",
|
|
3562
|
-
field: "fileName",
|
|
3563
|
-
value: fileName
|
|
3564
|
-
}]
|
|
3565
|
-
}
|
|
3566
|
-
});
|
|
3567
|
-
const result = await resp.json();
|
|
3568
|
-
return result.data[0].id;
|
|
3569
|
-
};
|
|
3570
|
-
const getFlowTemplate = async (flowTemplateId, adminApiContext) => {
|
|
3571
|
-
const flowTemplateResponse = await adminApiContext.post(`search/flow-template`, {
|
|
3572
|
-
data: {
|
|
3573
|
-
limit: 1,
|
|
3574
|
-
filter: [{
|
|
3575
|
-
type: "equals",
|
|
3576
|
-
field: "id",
|
|
3577
|
-
value: flowTemplateId
|
|
3578
|
-
}]
|
|
3579
|
-
}
|
|
3580
|
-
});
|
|
3581
|
-
const result = await flowTemplateResponse.json();
|
|
3582
|
-
return result.data[0];
|
|
3583
|
-
};
|
|
3584
|
-
const getFlow = async (flowId, adminApiContext) => {
|
|
3585
|
-
const flowResponse = await adminApiContext.post(`search/flow`, {
|
|
3586
|
-
data: {
|
|
3587
|
-
limit: 1,
|
|
3588
|
-
filter: [{
|
|
3589
|
-
type: "equals",
|
|
3590
|
-
field: "id",
|
|
3591
|
-
value: flowId
|
|
3592
|
-
}],
|
|
3593
|
-
associations: { sequences: {} }
|
|
3594
|
-
}
|
|
3595
|
-
});
|
|
3596
|
-
const result = await flowResponse.json();
|
|
3597
|
-
return result.data[0];
|
|
3598
|
-
};
|
|
3599
|
-
const compareFlowTemplateWithFlow = async (flowId, flowTemplateId, adminApiContext) => {
|
|
3600
|
-
const flowTemplateData = await getFlowTemplate(flowTemplateId, adminApiContext);
|
|
3601
|
-
const flowData = await getFlow(flowId, adminApiContext);
|
|
3602
|
-
if (flowTemplateData.config.eventName != flowData.eventName) {
|
|
3603
|
-
return false;
|
|
3604
|
-
}
|
|
3605
|
-
let i = 0;
|
|
3606
|
-
for (const sequenceTemplate of flowTemplateData.config.sequences) {
|
|
3607
|
-
if (sequenceTemplate.actionName != flowData.sequences[i].actionName) {
|
|
3608
|
-
return false;
|
|
3609
|
-
}
|
|
3610
|
-
if (JSON.stringify(sequenceTemplate.config) != JSON.stringify(flowData.sequences[i].config)) {
|
|
3611
|
-
return false;
|
|
3612
|
-
}
|
|
3613
|
-
i++;
|
|
3614
|
-
}
|
|
3615
|
-
return true;
|
|
3616
|
-
};
|
|
3617
|
-
function extractIdFromUrl(url) {
|
|
3618
|
-
const segments = url.split("/");
|
|
3619
|
-
return segments.length > 0 ? segments[segments.length - 1] : null;
|
|
3620
|
-
}
|
|
3621
|
-
const setOrderStatus = async (orderId, orderStatus, adminApiContext) => {
|
|
3622
|
-
return await adminApiContext.post(`./_action/order/${orderId}/state/${orderStatus}`);
|
|
3623
|
-
};
|
|
3624
|
-
const getPromotionWithDiscount = async (promotionId, adminApiContext) => {
|
|
3625
|
-
const resp = await adminApiContext.post("search/promotion", {
|
|
3626
|
-
data: {
|
|
3627
|
-
limit: 1,
|
|
3628
|
-
associations: {
|
|
3629
|
-
discounts: {
|
|
3630
|
-
limit: 10,
|
|
3631
|
-
type: "equals",
|
|
3632
|
-
field: "promotionId",
|
|
3633
|
-
value: promotionId
|
|
3634
|
-
}
|
|
3635
|
-
},
|
|
3636
|
-
filter: [{
|
|
3637
|
-
type: "equals",
|
|
3638
|
-
field: "id",
|
|
3639
|
-
value: promotionId
|
|
3640
|
-
}]
|
|
3641
|
-
}
|
|
3642
|
-
});
|
|
3643
|
-
const { data: promotion } = await resp.json();
|
|
3644
|
-
return promotion[0];
|
|
3645
|
-
};
|
|
3646
|
-
const updateAdminUser = async (adminUserId, adminApiContext, data) => {
|
|
3647
|
-
await adminApiContext.patch(`user/${adminUserId}?_response=basic`, {
|
|
3648
|
-
data
|
|
3649
|
-
});
|
|
3650
|
-
};
|
|
3651
|
-
|
|
3652
3785
|
class TestDataService {
|
|
3653
3786
|
AdminApiClient;
|
|
3654
3787
|
IdProvider;
|
|
@@ -4237,7 +4370,7 @@ class TestDataService {
|
|
|
4237
4370
|
/**
|
|
4238
4371
|
* Creates a new basic rule with the condition cart amount >= 1.
|
|
4239
4372
|
*
|
|
4240
|
-
* @param overrides - Specific data overrides that will be applied to the
|
|
4373
|
+
* @param overrides - Specific data overrides that will be applied to the basic rule data struct.
|
|
4241
4374
|
*/
|
|
4242
4375
|
async createBasicRule(overrides = {}, conditionType = "cartCartAmount", operator = ">=", amount = 1) {
|
|
4243
4376
|
const basicRule = this.getBasicRuleStruct(overrides, conditionType, operator, amount);
|
|
@@ -4381,7 +4514,7 @@ class TestDataService {
|
|
|
4381
4514
|
const salesChannelId = this.defaultSalesChannel.id;
|
|
4382
4515
|
const currencyId = this.defaultCurrencyId;
|
|
4383
4516
|
const languageId = this.defaultLanguageId;
|
|
4384
|
-
const snippetSetId = await getSnippetSetId(
|
|
4517
|
+
const snippetSetId = await getSnippetSetId(this.AdminApiClient);
|
|
4385
4518
|
const salesChannelDomainStruct = this.getSalesChannelDomainStruct(salesChannelId, currencyId, languageId, snippetSetId, overrides);
|
|
4386
4519
|
const response = await this.AdminApiClient.post(`sales-channel-domain?_response=detail`, {
|
|
4387
4520
|
data: salesChannelDomainStruct
|
|
@@ -4775,7 +4908,7 @@ class TestDataService {
|
|
|
4775
4908
|
* @param languageCode
|
|
4776
4909
|
*/
|
|
4777
4910
|
async getLanguageData(languageCode) {
|
|
4778
|
-
return await getLanguageData(
|
|
4911
|
+
return await getLanguageData(this.AdminApiClient, languageCode);
|
|
4779
4912
|
}
|
|
4780
4913
|
/**
|
|
4781
4914
|
* Retrieves a currency based on its ISO code.
|
|
@@ -5234,10 +5367,7 @@ class TestDataService {
|
|
|
5234
5367
|
const LETTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
5235
5368
|
const DIGITS = "0123456789";
|
|
5236
5369
|
const ALL_CHARS = LETTERS + DIGITS;
|
|
5237
|
-
const chars = Array.from(
|
|
5238
|
-
{ length },
|
|
5239
|
-
() => ALL_CHARS.charAt(Math.floor(Math.random() * ALL_CHARS.length))
|
|
5240
|
-
);
|
|
5370
|
+
const chars = Array.from({ length }, () => ALL_CHARS.charAt(Math.floor(Math.random() * ALL_CHARS.length)));
|
|
5241
5371
|
if (!chars.some((char) => DIGITS.includes(char))) {
|
|
5242
5372
|
const randomIndex = Math.floor(Math.random() * length);
|
|
5243
5373
|
chars[randomIndex] = DIGITS.charAt(Math.floor(Math.random() * DIGITS.length));
|
|
@@ -5489,6 +5619,7 @@ class TestDataService {
|
|
|
5489
5619
|
const { id, uuid: customerUuid } = this.IdProvider.getIdPair();
|
|
5490
5620
|
const firstName = "John";
|
|
5491
5621
|
const lastName = "Goldblum";
|
|
5622
|
+
const addressData = getCountryAddressData();
|
|
5492
5623
|
const basicCustomer = {
|
|
5493
5624
|
id: customerUuid,
|
|
5494
5625
|
email: `customer_${id}@example.com`,
|
|
@@ -5498,18 +5629,18 @@ class TestDataService {
|
|
|
5498
5629
|
defaultShippingAddress: {
|
|
5499
5630
|
firstName,
|
|
5500
5631
|
lastName,
|
|
5501
|
-
city:
|
|
5502
|
-
street:
|
|
5503
|
-
zipcode:
|
|
5632
|
+
city: addressData.city,
|
|
5633
|
+
street: addressData.street,
|
|
5634
|
+
zipcode: addressData.postalCode,
|
|
5504
5635
|
countryId,
|
|
5505
5636
|
salutationId
|
|
5506
5637
|
},
|
|
5507
5638
|
defaultBillingAddress: {
|
|
5508
5639
|
firstName,
|
|
5509
5640
|
lastName,
|
|
5510
|
-
city:
|
|
5511
|
-
street:
|
|
5512
|
-
zipcode:
|
|
5641
|
+
city: addressData.city,
|
|
5642
|
+
street: addressData.street,
|
|
5643
|
+
zipcode: addressData.postalCode,
|
|
5513
5644
|
countryId,
|
|
5514
5645
|
salutationId
|
|
5515
5646
|
},
|
|
@@ -6120,8 +6251,8 @@ const test$8 = test$e.extend({
|
|
|
6120
6251
|
const instanceStatusResponse = await context.get("./instance/status");
|
|
6121
6252
|
const instanceStatus = await instanceStatusResponse.json();
|
|
6122
6253
|
expect(instanceStatus.tags, 'expect instance to have "ci" tag').toContain("ci");
|
|
6123
|
-
const currency = await getCurrency(
|
|
6124
|
-
const language = await getLanguageData(
|
|
6254
|
+
const currency = await getCurrency(context);
|
|
6255
|
+
const language = await getLanguageData(context);
|
|
6125
6256
|
await context.post("./_actions/set-default-entities", { data: { currencyId: currency.id, languageId: language.id } });
|
|
6126
6257
|
const token = await AdminApiContext.authenticateWithUserPassword(context.context, context.options);
|
|
6127
6258
|
await context.post("./sbp/request-live-status", { headers: { Authorization: `Bearer ${token}` } });
|
|
@@ -6162,7 +6293,8 @@ const test$8 = test$e.extend({
|
|
|
6162
6293
|
Translate: [
|
|
6163
6294
|
async ({ CustomTranslationResources }, use) => {
|
|
6164
6295
|
const { LanguageHelper, setCurrentContext } = await Promise.resolve().then(function () { return LanguageHelper$1; });
|
|
6165
|
-
const
|
|
6296
|
+
const languageCode = getLanguageCode(getLocale());
|
|
6297
|
+
const languageHelper = await LanguageHelper.createInstance(languageCode.split("-")[0], CustomTranslationResources);
|
|
6166
6298
|
setCurrentContext({ languageHelper });
|
|
6167
6299
|
const contextualTranslate = (key, options) => {
|
|
6168
6300
|
return languageHelper.translate(key, options);
|
|
@@ -6555,7 +6687,7 @@ class CheckoutCart {
|
|
|
6555
6687
|
this.headline = page.getByRole("heading", { name: translate("storefront:checkout:cart.shoppingCart") });
|
|
6556
6688
|
this.goToCheckoutButton = page.getByRole("link", { name: translate("storefront:checkout:cart.goToCheckout") });
|
|
6557
6689
|
this.enterPromoInput = page.getByLabel(translate("storefront:checkout:cart.promoCode"));
|
|
6558
|
-
this.grandTotalPrice = page.locator(
|
|
6690
|
+
this.grandTotalPrice = page.locator(`dt:has-text("${translate("storefront:checkout:finish.grandTotal")}") + dd:visible`);
|
|
6559
6691
|
this.emptyCartAlert = page.getByText(translate("storefront:checkout:cart.emptyCart"));
|
|
6560
6692
|
this.stockReachedAlert = page.getByText(translate("storefront:checkout:cart.stockReached"));
|
|
6561
6693
|
this.cartLineItemImages = page.locator(".line-item-img-link");
|
|
@@ -7091,7 +7223,7 @@ class AccountAddresses extends BaseAccount {
|
|
|
7091
7223
|
constructor(page, instanceMeta) {
|
|
7092
7224
|
super(page);
|
|
7093
7225
|
this.instanceMeta = instanceMeta;
|
|
7094
|
-
this.addNewAddressButton = page.getByRole("link", { name:
|
|
7226
|
+
this.addNewAddressButton = page.getByRole("link", { name: translate("storefront:account:addresses.addNewAddress") });
|
|
7095
7227
|
this.editBillingAddressButton = page.getByRole("link", { name: translate("storefront:address:actions.editAddress") }).first();
|
|
7096
7228
|
this.editShippingAddressButton = page.getByRole("link", { name: translate("storefront:address:actions.editAddress") }).nth(1);
|
|
7097
7229
|
this.useDefaultBillingAddressButton = page.getByRole("button", { name: translate("storefront:address:actions.useAsDefaultBilling") });
|
|
@@ -7641,16 +7773,16 @@ class ProductDetail {
|
|
|
7641
7773
|
this.instanceMeta = instanceMeta;
|
|
7642
7774
|
this.contentView = page.locator(".sw-desktop__content");
|
|
7643
7775
|
this.productHeadline = page.locator(".smart-bar__header");
|
|
7644
|
-
this.savePhysicalProductButton = page.getByRole("button", { name: "
|
|
7776
|
+
this.savePhysicalProductButton = page.getByRole("button", { name: translate("administration:product:buttons.save") });
|
|
7645
7777
|
this.saveButtonCheckMark = page.locator(".icon--regular-checkmark-xs");
|
|
7646
7778
|
this.saveButtonLoadingSpinner = page.locator("sw-loader");
|
|
7647
|
-
this.specificationsTabLink = page.getByRole("tab", { name: "
|
|
7648
|
-
this.advancedPricingTabLink = page.getByRole("tab", { name: "
|
|
7649
|
-
this.variantsTabLink = page.getByRole("tab", { name: "
|
|
7650
|
-
this.layoutTabLink = page.getByRole("tab", { name: "
|
|
7651
|
-
this.crossSellingTabLink = page.getByRole("tab", { name: "
|
|
7652
|
-
this.SEOTabLink = page.getByRole("tab", { name: "
|
|
7653
|
-
this.reviewsTabLink = page.getByRole("tab", { name: "
|
|
7779
|
+
this.specificationsTabLink = page.getByRole("tab", { name: translate("administration:product:tabs.specifications") });
|
|
7780
|
+
this.advancedPricingTabLink = page.getByRole("tab", { name: translate("administration:product:tabs.advancedPricing") });
|
|
7781
|
+
this.variantsTabLink = page.getByRole("tab", { name: translate("administration:product:tabs.variants") });
|
|
7782
|
+
this.layoutTabLink = page.getByRole("tab", { name: translate("administration:product:tabs.layout") });
|
|
7783
|
+
this.crossSellingTabLink = page.getByRole("tab", { name: translate("administration:product:tabs.crossSelling") });
|
|
7784
|
+
this.SEOTabLink = page.getByRole("tab", { name: translate("administration:product:tabs.seo") });
|
|
7785
|
+
this.reviewsTabLink = page.getByRole("tab", { name: translate("administration:product:tabs.reviews") });
|
|
7654
7786
|
this.manufacturerDropdownText = page.locator(".sw-select-product__select_manufacturer");
|
|
7655
7787
|
this.priceGrossInput = page.locator("#sw-price-field-gross").first();
|
|
7656
7788
|
this.stockInput = page.getByPlaceholder(translate("administration:product:detail.stockPlaceholder"));
|
|
@@ -7663,25 +7795,25 @@ class ProductDetail {
|
|
|
7663
7795
|
} else {
|
|
7664
7796
|
this.releaseDateInput = page.locator(".dp__input_readonly");
|
|
7665
7797
|
}
|
|
7666
|
-
this.uploadMediaButton = page.getByRole("button", { name: "
|
|
7798
|
+
this.uploadMediaButton = page.getByRole("button", { name: translate("administration:product:buttons.uploadFile") });
|
|
7667
7799
|
this.coverImage = page.locator(".sw-product-media-form__cover-image");
|
|
7668
7800
|
this.productImage = page.locator(".sw-media-preview-v2__item");
|
|
7669
|
-
this.generateVariantsButton = page.getByRole("button", { name: "
|
|
7670
|
-
this.variantsModal = page.getByRole("dialog", { name: "
|
|
7671
|
-
this.variantsModalHeadline = this.variantsModal.getByRole("heading", { name: "
|
|
7672
|
-
this.variantsNextButton = this.variantsModal.getByRole("button", { name: "
|
|
7673
|
-
this.variantsSaveButton = this.variantsModal.getByRole("button", { name: "
|
|
7801
|
+
this.generateVariantsButton = page.getByRole("button", { name: translate("administration:product:buttons.generateVariants") });
|
|
7802
|
+
this.variantsModal = page.getByRole("dialog", { name: translate("administration:product:modals.generateVariants") });
|
|
7803
|
+
this.variantsModalHeadline = this.variantsModal.getByRole("heading", { name: translate("administration:product:modals.generateVariants") });
|
|
7804
|
+
this.variantsNextButton = this.variantsModal.getByRole("button", { name: translate("administration:product:buttons.next"), exact: true });
|
|
7805
|
+
this.variantsSaveButton = this.variantsModal.getByRole("button", { name: translate("administration:product:buttons.saveVariants") });
|
|
7674
7806
|
this.propertyName = (propertyName) => this.variantsModal.getByText(propertyName);
|
|
7675
7807
|
this.propertyValueCheckbox = (propertyValueName) => this.variantsModal.getByRole("row", { name: propertyValueName }).getByRole("checkbox");
|
|
7676
7808
|
this.propertyGroupColor = this.variantsModal.getByText(translate("administration:product:detail.colorProperty")).first();
|
|
7677
7809
|
this.propertyGroupSize = this.variantsModal.getByText(translate("administration:product:detail.sizeProperty")).first();
|
|
7678
7810
|
this.propertyOptionGrid = this.variantsModal.locator(".sw-property-search__tree-selection__option_grid");
|
|
7679
|
-
this.propertyOptionColorBlue = this.propertyOptionGrid.getByRole("row", { name: "
|
|
7680
|
-
this.propertyOptionColorRed = this.propertyOptionGrid.getByRole("row", { name: "
|
|
7681
|
-
this.propertyOptionColorGreen = this.propertyOptionGrid.getByRole("row", { name: "
|
|
7682
|
-
this.propertyOptionSizeSmall = this.propertyOptionGrid.getByRole("row", { name: "
|
|
7683
|
-
this.propertyOptionSizeMedium = this.propertyOptionGrid.getByRole("row", { name: "
|
|
7684
|
-
this.propertyOptionSizeLarge = this.propertyOptionGrid.getByRole("row", { name: "
|
|
7811
|
+
this.propertyOptionColorBlue = this.propertyOptionGrid.getByRole("row", { name: translate("administration:product:propertyValues.blue") }).getByRole("checkbox");
|
|
7812
|
+
this.propertyOptionColorRed = this.propertyOptionGrid.getByRole("row", { name: translate("administration:product:propertyValues.red") }).getByRole("checkbox");
|
|
7813
|
+
this.propertyOptionColorGreen = this.propertyOptionGrid.getByRole("row", { name: translate("administration:product:propertyValues.green") }).getByRole("checkbox");
|
|
7814
|
+
this.propertyOptionSizeSmall = this.propertyOptionGrid.getByRole("row", { name: translate("administration:product:propertyValues.small") }).getByRole("checkbox");
|
|
7815
|
+
this.propertyOptionSizeMedium = this.propertyOptionGrid.getByRole("row", { name: translate("administration:product:propertyValues.medium") }).getByRole("checkbox");
|
|
7816
|
+
this.propertyOptionSizeLarge = this.propertyOptionGrid.getByRole("row", { name: translate("administration:product:propertyValues.large") }).getByRole("checkbox");
|
|
7685
7817
|
if (satisfies(instanceMeta.version, "<6.7")) {
|
|
7686
7818
|
this.customFieldCard = page.locator(".sw-card").getByText(translate("administration:customField:general.customFields"));
|
|
7687
7819
|
} else {
|
|
@@ -7691,9 +7823,9 @@ class ProductDetail {
|
|
|
7691
7823
|
async getCustomFieldSetCardContentByName(customFieldSetName) {
|
|
7692
7824
|
let customFieldCard;
|
|
7693
7825
|
if (satisfies(this.instanceMeta.version, "<6.7")) {
|
|
7694
|
-
customFieldCard = this.page.locator(".sw-card").filter({ hasText: "
|
|
7826
|
+
customFieldCard = this.page.locator(".sw-card").filter({ hasText: translate("administration:customField:general.customFields") });
|
|
7695
7827
|
} else {
|
|
7696
|
-
customFieldCard = this.page.locator(".mt-card").filter({ hasText: "
|
|
7828
|
+
customFieldCard = this.page.locator(".mt-card").filter({ hasText: translate("administration:customField:general.customFields") });
|
|
7697
7829
|
}
|
|
7698
7830
|
const customFieldSetTab = customFieldCard.getByText(customFieldSetName);
|
|
7699
7831
|
const customFieldSetTabCustomContent = customFieldCard.locator(`.sw-custom-field-set-renderer-tab-content__${customFieldSetName}`);
|
|
@@ -8926,6 +9058,9 @@ class RuleCreate {
|
|
|
8926
9058
|
header;
|
|
8927
9059
|
nameInput;
|
|
8928
9060
|
priorityInput;
|
|
9061
|
+
descriptionInput;
|
|
9062
|
+
typeItem;
|
|
9063
|
+
tagItem;
|
|
8929
9064
|
conditionTypeSelectionInput;
|
|
8930
9065
|
conditionValueSelectionInput;
|
|
8931
9066
|
filtersResultPopoverSelectionList;
|
|
@@ -8940,6 +9075,9 @@ class RuleCreate {
|
|
|
8940
9075
|
this.header = page.locator(".smart-bar__header");
|
|
8941
9076
|
this.nameInput = page.getByLabel(translate("administration:rule:fields.name"));
|
|
8942
9077
|
this.priorityInput = page.getByLabel(translate("administration:rule:fields.priority"));
|
|
9078
|
+
this.descriptionInput = page.getByLabel("Description");
|
|
9079
|
+
this.typeItem = page.locator(".sw-settings-rule-detail__type-field").locator(".sw-select-selection-list__item");
|
|
9080
|
+
this.tagItem = page.locator(".sw-settings-rule-detail__tags-field").locator(".sw-select-selection-list__item");
|
|
8943
9081
|
this.conditionTypeSelectionInput = page.locator(".sw-condition-type-select").locator(".sw-single-select__selection");
|
|
8944
9082
|
this.conditionValueSelectionInput = page.locator(".sw-condition__value-content").locator(".sw-entity-single-select__selection");
|
|
8945
9083
|
this.filtersResultPopoverSelectionList = page.locator(".sw-select-result-list__content").getByRole("listitem");
|
|
@@ -8976,6 +9114,25 @@ class RuleDetail extends RuleCreate {
|
|
|
8976
9114
|
assignmentModal;
|
|
8977
9115
|
assignmentModalAddButton;
|
|
8978
9116
|
assignmentModalSearchField;
|
|
9117
|
+
conditionSelectField;
|
|
9118
|
+
conditionLineItemGoodsTotalOperator;
|
|
9119
|
+
conditionLineItemGoodsTotalValue;
|
|
9120
|
+
conditionDateRangeOperator;
|
|
9121
|
+
conditionDateRangeDateFieldFirst;
|
|
9122
|
+
conditionDateRangeDateFieldSecond;
|
|
9123
|
+
conditionCustomerSurnameOperator;
|
|
9124
|
+
conditionCustomerSurnameValue;
|
|
9125
|
+
conditionCartLineItemTaxationMatchOperator;
|
|
9126
|
+
conditionCartLineItemTaxationOperator;
|
|
9127
|
+
conditionCartLineItemTaxationValue;
|
|
9128
|
+
conditionTimeRangeValueFirst;
|
|
9129
|
+
conditionTimeRangeValueSecond;
|
|
9130
|
+
conditionOrderCreatedByAdminValue;
|
|
9131
|
+
conditionLineItemGoodsTotalFilter;
|
|
9132
|
+
conditionFilterModal;
|
|
9133
|
+
conditionCartLineItemInStockOperator;
|
|
9134
|
+
conditionCartLineItemInStockValue;
|
|
9135
|
+
conditionFilterModalCloseButtonX;
|
|
8979
9136
|
conditionORContainer;
|
|
8980
9137
|
adminMenuAvatar;
|
|
8981
9138
|
constructor(page, instanceMeta) {
|
|
@@ -8987,43 +9144,67 @@ class RuleDetail extends RuleCreate {
|
|
|
8987
9144
|
if (satisfies(instanceMeta.version, "<6.7.3")) {
|
|
8988
9145
|
this.shippingMethodAvailabilityRulesCardEmptyState = this.shippingMethodAvailabilityRulesCard.getByRole("alert");
|
|
8989
9146
|
} else {
|
|
8990
|
-
this.shippingMethodAvailabilityRulesCardEmptyState = this.shippingMethodAvailabilityRulesCard.
|
|
9147
|
+
this.shippingMethodAvailabilityRulesCardEmptyState = this.shippingMethodAvailabilityRulesCard.getByRole("heading", { name: "This rule is not in use", level: 2 });
|
|
8991
9148
|
}
|
|
8992
9149
|
this.shippingMethodAvailabilityRulesCardSearchField = this.shippingMethodAvailabilityRulesCard.getByRole("textbox");
|
|
8993
9150
|
this.taxProviderRulesCard = page.locator(".sw-settings-rule-detail-assignments__card-tax_provider");
|
|
8994
9151
|
if (satisfies(instanceMeta.version, "<6.7.3")) {
|
|
8995
9152
|
this.taxProviderRulesCardEmptyState = this.taxProviderRulesCard.getByRole("alert");
|
|
8996
9153
|
} else {
|
|
8997
|
-
this.taxProviderRulesCardEmptyState = this.taxProviderRulesCard.
|
|
9154
|
+
this.taxProviderRulesCardEmptyState = this.taxProviderRulesCard.getByRole("heading", { name: "This rule is not in use", level: 2 });
|
|
8998
9155
|
}
|
|
8999
9156
|
this.paymentMethodsAvailabilityRulesCard = page.locator(".sw-settings-rule-detail-assignments__card-payment_method");
|
|
9000
9157
|
if (satisfies(instanceMeta.version, "<6.7.3")) {
|
|
9001
9158
|
this.paymentMethodsAvailabilityRulesCardEmptyState = this.paymentMethodsAvailabilityRulesCard.getByRole("alert");
|
|
9002
9159
|
} else {
|
|
9003
|
-
this.paymentMethodsAvailabilityRulesCardEmptyState = this.paymentMethodsAvailabilityRulesCard.
|
|
9160
|
+
this.paymentMethodsAvailabilityRulesCardEmptyState = this.paymentMethodsAvailabilityRulesCard.getByRole("heading", { name: "This rule is not in use", level: 2 });
|
|
9004
9161
|
}
|
|
9005
9162
|
this.paymentMethodsAvailabilityRulesCardLink = page.locator(".sw-settings-rule-detail-assignments__card-payment_method").getByRole("link");
|
|
9006
9163
|
this.promotionOrderRulesCard = page.locator(".sw-settings-rule-detail-assignments__card-promotion_order_rule");
|
|
9007
9164
|
if (satisfies(instanceMeta.version, "<6.7.3")) {
|
|
9008
9165
|
this.promotionOrderRulesCardEmptyState = this.promotionOrderRulesCard.getByRole("alert");
|
|
9009
9166
|
} else {
|
|
9010
|
-
this.promotionOrderRulesCardEmptyState = this.promotionOrderRulesCard.
|
|
9167
|
+
this.promotionOrderRulesCardEmptyState = this.promotionOrderRulesCard.getByRole("heading", { name: "This rule is not in use", level: 2 });
|
|
9011
9168
|
}
|
|
9012
9169
|
this.promotionCustomerRulesCard = page.locator(".sw-settings-rule-detail-assignments__card-promotion_customer_rule");
|
|
9013
9170
|
if (satisfies(instanceMeta.version, "<6.7.3")) {
|
|
9014
9171
|
this.promotionCustomerRulesCardEmptyState = this.promotionCustomerRulesCard.getByRole("alert");
|
|
9015
9172
|
} else {
|
|
9016
|
-
this.promotionCustomerRulesCardEmptyState = this.promotionCustomerRulesCard.
|
|
9173
|
+
this.promotionCustomerRulesCardEmptyState = this.promotionCustomerRulesCard.getByRole("heading", { name: "This rule is not in use", level: 2 });
|
|
9017
9174
|
}
|
|
9018
9175
|
this.promotionCartRulesCard = page.locator(".sw-settings-rule-detail-assignments__card-promotion_cart_rule");
|
|
9019
9176
|
if (satisfies(instanceMeta.version, "<6.7.3")) {
|
|
9020
9177
|
this.promotionCartRulesCardEmptyState = this.promotionCartRulesCard.getByRole("alert");
|
|
9021
9178
|
} else {
|
|
9022
|
-
this.promotionCartRulesCardEmptyState = this.promotionCartRulesCard.
|
|
9179
|
+
this.promotionCartRulesCardEmptyState = this.promotionCartRulesCard.getByRole("heading", { name: "This rule is not in use", level: 2 });
|
|
9023
9180
|
}
|
|
9024
9181
|
this.assignmentModal = page.locator(".sw-settings-rule-add-assignment-modal");
|
|
9025
9182
|
this.assignmentModalSearchField = this.assignmentModal.getByRole("textbox");
|
|
9026
9183
|
this.adminMenuAvatar = page.locator(".sw-admin-menu__avatar");
|
|
9184
|
+
this.conditionSelectField = page.locator(".sw-condition-tree").locator(".sw-condition-type-select");
|
|
9185
|
+
this.conditionLineItemGoodsTotalOperator = page.locator(".sw-condition-line-item-goods-total").locator(".sw-single-select__selection-text");
|
|
9186
|
+
this.conditionLineItemGoodsTotalValue = page.locator(".sw-condition-line-item-goods-total").getByRole("textbox");
|
|
9187
|
+
this.conditionLineItemGoodsTotalFilter = page.locator(".sw-condition-line-item-goods-total__filter").getByRole("button");
|
|
9188
|
+
this.conditionDateRangeOperator = page.locator(".sw-condition-date-range").locator(".sw-single-select__selection-text");
|
|
9189
|
+
if (satisfies(instanceMeta.version, "<6.7.3")) {
|
|
9190
|
+
this.conditionDateRangeDateFieldFirst = page.locator(".sw-condition-date-range").locator(".flatpickr-input").first();
|
|
9191
|
+
this.conditionDateRangeDateFieldSecond = page.locator(".sw-condition-date-range").locator(".flatpickr-input").last();
|
|
9192
|
+
} else {
|
|
9193
|
+
this.conditionDateRangeDateFieldFirst = page.locator(".mt-datepicker__wrapper").locator(".dp__input").first();
|
|
9194
|
+
this.conditionDateRangeDateFieldSecond = page.locator(".mt-datepicker__wrapper").locator(".dp__input").nth(1);
|
|
9195
|
+
}
|
|
9196
|
+
this.conditionCustomerSurnameOperator = page.locator(".sw-condition__condition-type-customerLastName").locator(".sw-single-select__selection-text");
|
|
9197
|
+
this.conditionCustomerSurnameValue = page.locator(".sw-condition__condition-type-customerLastName").getByRole("textbox");
|
|
9198
|
+
this.conditionCartLineItemTaxationMatchOperator = page.locator(".sw-condition-base-line-item__matches-all");
|
|
9199
|
+
this.conditionCartLineItemTaxationOperator = page.locator(".sw-condition__condition-type-cartLineItemTaxation").locator(".sw-single-select__selection-text");
|
|
9200
|
+
this.conditionCartLineItemTaxationValue = page.locator(".sw-condition__condition-type-cartLineItemTaxation").locator(".sw-select-selection-list__item");
|
|
9201
|
+
this.conditionTimeRangeValueFirst = page.locator(".sw-condition-time-range").getByRole("textbox").first();
|
|
9202
|
+
this.conditionTimeRangeValueSecond = page.locator(".sw-condition-time-range").getByRole("textbox").last();
|
|
9203
|
+
this.conditionOrderCreatedByAdminValue = page.locator(".sw-condition__condition-type-orderCreatedByAdmin").locator(".sw-select__selection");
|
|
9204
|
+
this.conditionFilterModal = page.locator(".sw-modal__header").getByText("Filter");
|
|
9205
|
+
this.conditionFilterModalCloseButtonX = page.locator(".sw-modal__header").getByRole("button");
|
|
9206
|
+
this.conditionCartLineItemInStockOperator = page.locator(".sw-condition__condition-type-cartLineItemStock").locator(".sw-single-select__selection-text");
|
|
9207
|
+
this.conditionCartLineItemInStockValue = page.locator(".sw-condition__condition-type-cartLineItemStock").getByRole("textbox");
|
|
9027
9208
|
if (satisfies(instanceMeta.version, "<6.7")) {
|
|
9028
9209
|
this.assignmentModalAddButton = this.assignmentModal.locator(".sw-button--primary").getByText(translate("administration:rule:buttons.add"));
|
|
9029
9210
|
} else {
|
|
@@ -9046,14 +9227,20 @@ class RuleListing {
|
|
|
9046
9227
|
header;
|
|
9047
9228
|
grid;
|
|
9048
9229
|
page;
|
|
9230
|
+
gridCell;
|
|
9049
9231
|
constructor(page) {
|
|
9050
9232
|
this.page = page;
|
|
9051
9233
|
this.createRuleButton = page.getByText(translate("administration:rule:buttons.createRule"));
|
|
9052
9234
|
this.header = page.locator(".smart-bar__header");
|
|
9053
9235
|
this.grid = page.locator(".sw-data-grid__table)");
|
|
9236
|
+
this.gridCell = page.locator(".sw-data-grid__cell--name");
|
|
9054
9237
|
}
|
|
9055
|
-
url() {
|
|
9056
|
-
|
|
9238
|
+
url(searchTerm) {
|
|
9239
|
+
let url = "#/sw/settings/rule/index";
|
|
9240
|
+
if (searchTerm.length > 0) {
|
|
9241
|
+
url += `?limit=25&page=1&term=${searchTerm}`;
|
|
9242
|
+
}
|
|
9243
|
+
return url;
|
|
9057
9244
|
}
|
|
9058
9245
|
}
|
|
9059
9246
|
|
|
@@ -9424,7 +9611,7 @@ class DocumentDetail {
|
|
|
9424
9611
|
page;
|
|
9425
9612
|
constructor(page) {
|
|
9426
9613
|
this.page = page;
|
|
9427
|
-
this.showInAccountSwitch = page.getByRole("checkbox", { name:
|
|
9614
|
+
this.showInAccountSwitch = page.getByRole("checkbox", { name: translate("administration:document:detail.displayDocumentInMyAccount") });
|
|
9428
9615
|
this.saveButton = page.getByRole("button", { name: translate("administration:document:detail.save") });
|
|
9429
9616
|
this.documentTypeSelect = page.locator(".sw-settings-document-detail__select-type");
|
|
9430
9617
|
}
|
|
@@ -9643,9 +9830,9 @@ class Media {
|
|
|
9643
9830
|
searchInput;
|
|
9644
9831
|
constructor(page) {
|
|
9645
9832
|
this.page = page;
|
|
9646
|
-
this.uploadFileButton = page.getByRole("button", { name: "
|
|
9647
|
-
this.addNewFolderButton = page.getByRole("button", { name: "
|
|
9648
|
-
this.searchInput = page.getByPlaceholder("
|
|
9833
|
+
this.uploadFileButton = page.getByRole("button", { name: translate("administration:media:buttons.uploadFile") });
|
|
9834
|
+
this.addNewFolderButton = page.getByRole("button", { name: translate("administration:media:buttons.addNewFolder") });
|
|
9835
|
+
this.searchInput = page.getByPlaceholder(translate("administration:media:search.placeholder"));
|
|
9649
9836
|
this.mediaGridItems = page.locator(".sw-media-media-item");
|
|
9650
9837
|
this.mediaItemCheckbox = page.locator('.sw-media-base-item__selected-indicator input[type="checkbox"]');
|
|
9651
9838
|
this.mediaItemPreview = page.locator(".sw-media-preview-v2__item");
|
|
@@ -10444,7 +10631,7 @@ const MediaData = test$e.extend({
|
|
|
10444
10631
|
const OrderData = test$e.extend({
|
|
10445
10632
|
OrderData: async ({ IdProvider, AdminApiContext, SalesChannelBaseConfig, DefaultSalesChannel, ProductData }, use) => {
|
|
10446
10633
|
const requests = {
|
|
10447
|
-
currencyEUR: getCurrency(
|
|
10634
|
+
currencyEUR: getCurrency(AdminApiContext),
|
|
10448
10635
|
mrSalutationId: getSalutationId("mr", AdminApiContext),
|
|
10449
10636
|
orderStateId: getStateMachineId("order.state", AdminApiContext),
|
|
10450
10637
|
orderTransactionStateId: getStateMachineId("order_transaction.state", AdminApiContext),
|
|
@@ -10464,8 +10651,8 @@ const OrderData = test$e.extend({
|
|
|
10464
10651
|
const orderResponse = await AdminApiContext.post("./order?_response=detail", {
|
|
10465
10652
|
data: {
|
|
10466
10653
|
billingAddressId: addressId,
|
|
10467
|
-
currencyId: SalesChannelBaseConfig.
|
|
10468
|
-
languageId: SalesChannelBaseConfig.
|
|
10654
|
+
currencyId: SalesChannelBaseConfig.currentCurrencyId,
|
|
10655
|
+
languageId: SalesChannelBaseConfig.currentLanguageId,
|
|
10469
10656
|
salesChannelId: DefaultSalesChannel.salesChannel.id,
|
|
10470
10657
|
stateId: orderStateStateMachineStateId,
|
|
10471
10658
|
orderDateTime: "2024-02-01 07:00:00",
|
|
@@ -10497,7 +10684,7 @@ const OrderData = test$e.extend({
|
|
|
10497
10684
|
street: `${orderId} street`,
|
|
10498
10685
|
zipcode: `${orderId} zipcode`,
|
|
10499
10686
|
city: `${orderId} city`,
|
|
10500
|
-
countryId: SalesChannelBaseConfig.
|
|
10687
|
+
countryId: SalesChannelBaseConfig.currentCountryId,
|
|
10501
10688
|
company: `${orderId} company`,
|
|
10502
10689
|
vatId: null,
|
|
10503
10690
|
phoneNumber: `${orderId}`
|
|
@@ -10581,6 +10768,7 @@ const OrderData = test$e.extend({
|
|
|
10581
10768
|
percentage: 100
|
|
10582
10769
|
}
|
|
10583
10770
|
],
|
|
10771
|
+
// prettier-ignore
|
|
10584
10772
|
listPrice: 8,
|
|
10585
10773
|
isCalculated: true,
|
|
10586
10774
|
referencePriceDefinition: null
|
|
@@ -10599,7 +10787,7 @@ const OrderData = test$e.extend({
|
|
|
10599
10787
|
street: "Shortstreet 5",
|
|
10600
10788
|
zipcode: "12345",
|
|
10601
10789
|
city: "Doe City",
|
|
10602
|
-
countryId: SalesChannelBaseConfig.
|
|
10790
|
+
countryId: SalesChannelBaseConfig.currentCountryId,
|
|
10603
10791
|
phoneNumber: "123 456 789"
|
|
10604
10792
|
},
|
|
10605
10793
|
shippingDateEarliest: "2024-03-01 07:00:00",
|
|
@@ -11188,6 +11376,8 @@ const Logout = test$e.extend({
|
|
|
11188
11376
|
const Register = test$e.extend({
|
|
11189
11377
|
Register: async ({ StorefrontAccountLogin, IdProvider, TestDataService }, use) => {
|
|
11190
11378
|
let registeredEmail = "";
|
|
11379
|
+
const countryCode = getCountryCodeFromLocale(getLocale());
|
|
11380
|
+
const countryDefaults = getCountryAddressData(countryCode);
|
|
11191
11381
|
const defaultRegistrationData = {
|
|
11192
11382
|
isCommercial: false,
|
|
11193
11383
|
isGuest: false,
|
|
@@ -11196,13 +11386,9 @@ const Register = test$e.extend({
|
|
|
11196
11386
|
lastName: "Goldblum",
|
|
11197
11387
|
email: `${IdProvider.getIdPair().uuid}@test.com`,
|
|
11198
11388
|
password: "shopware",
|
|
11199
|
-
|
|
11200
|
-
city: "Sch\xF6ppingen",
|
|
11201
|
-
country: "Germany",
|
|
11202
|
-
postalCode: "48624",
|
|
11389
|
+
...countryDefaults,
|
|
11203
11390
|
company: "shopware",
|
|
11204
|
-
department: "Operations"
|
|
11205
|
-
vatRegNo: "DE1234567890"
|
|
11391
|
+
department: "Operations"
|
|
11206
11392
|
};
|
|
11207
11393
|
const task = (overrides, isCommercial) => {
|
|
11208
11394
|
return async function Register2() {
|
|
@@ -11727,7 +11913,8 @@ const test$2 = test$e.extend({
|
|
|
11727
11913
|
const test$1 = test$e.extend({
|
|
11728
11914
|
Country: [
|
|
11729
11915
|
async ({ AdminApiContext }, use) => {
|
|
11730
|
-
const
|
|
11916
|
+
const countryCode = getCountryCodeFromLocale(getLocale());
|
|
11917
|
+
const countryId = await getCountryId(countryCode, AdminApiContext);
|
|
11731
11918
|
await use({
|
|
11732
11919
|
id: countryId
|
|
11733
11920
|
});
|
|
@@ -11736,7 +11923,7 @@ const test$1 = test$e.extend({
|
|
|
11736
11923
|
],
|
|
11737
11924
|
Currency: [
|
|
11738
11925
|
async ({ AdminApiContext }, use) => {
|
|
11739
|
-
const currency = await getCurrency(
|
|
11926
|
+
const currency = await getCurrency(AdminApiContext);
|
|
11740
11927
|
await use({
|
|
11741
11928
|
id: currency.id
|
|
11742
11929
|
});
|
|
@@ -11745,7 +11932,9 @@ const test$1 = test$e.extend({
|
|
|
11745
11932
|
],
|
|
11746
11933
|
Language: [
|
|
11747
11934
|
async ({ AdminApiContext }, use) => {
|
|
11748
|
-
const
|
|
11935
|
+
const locale = getLocale();
|
|
11936
|
+
const languageCode = getLanguageCode(locale);
|
|
11937
|
+
const language = await getLanguageData(AdminApiContext, languageCode);
|
|
11749
11938
|
await use(language);
|
|
11750
11939
|
},
|
|
11751
11940
|
{ scope: "worker" }
|
|
@@ -11770,7 +11959,7 @@ const test$1 = test$e.extend({
|
|
|
11770
11959
|
],
|
|
11771
11960
|
SnippetSet: [
|
|
11772
11961
|
async ({ AdminApiContext }, use) => {
|
|
11773
|
-
const snippedSetId = await getSnippetSetId(
|
|
11962
|
+
const snippedSetId = await getSnippetSetId(AdminApiContext);
|
|
11774
11963
|
await use({
|
|
11775
11964
|
id: snippedSetId
|
|
11776
11965
|
});
|
|
@@ -12068,4 +12257,4 @@ const test = mergeTests(
|
|
|
12068
12257
|
test$3
|
|
12069
12258
|
);
|
|
12070
12259
|
|
|
12071
|
-
export { AdminPageObjects, BUNDLED_RESOURCES, IdProvider, LanguageHelper, RuleType, StorefrontPageObjects, TestDataService, assertScreenshot, baseNamespaces, compareFlowTemplateWithFlow, createRandomImage, encodeImage, extractIdFromUrl, getCountryId, getCurrency, getCurrentContext, getDefaultShippingMethodId, getFlow, getFlowId, getFlowTemplate, getLanguageData, getMediaId, getOrderTransactionId, getPaymentMethodId, getPromotionWithDiscount, getSalutationId, getShippingMethodId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, hideElements, isSaaSInstance, isThemeCompiled, replaceElements, replaceElementsIndividually, setCurrentContext, setOrderStatus, setViewport, test, translate, updateAdminUser };
|
|
12260
|
+
export { AdminPageObjects, BUNDLED_RESOURCES, COUNTRY_ADDRESS_DATA, IdProvider, LanguageHelper, RuleType, StorefrontPageObjects, TestDataService, assertScreenshot, baseNamespaces, compareFlowTemplateWithFlow, createRandomImage, encodeImage, extractIdFromUrl, getCountryAddressData, getCountryCodeFromLocale, getCountryId, getCurrency, getCurrencyCodeFromLocale, getCurrencySymbolFromLocale, getCurrentContext, getDefaultShippingMethodId, getFlow, getFlowId, getFlowTemplate, getLanguageCode, getLanguageData, getLocale, getMediaId, getOrderTransactionId, getPaymentMethodId, getPromotionWithDiscount, getSalutationId, getShippingMethodId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, hideElements, isSaaSInstance, isThemeCompiled, replaceElements, replaceElementsIndividually, setCurrentContext, setOrderStatus, setViewport, test, translate, updateAdminUser };
|