@shopware-ag/acceptance-test-suite 2.3.2 → 2.3.6
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 +17 -11
- package/dist/index.d.ts +17 -11
- package/dist/index.mjs +71 -83
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -27,8 +27,8 @@ declare class AdminApiContext {
|
|
|
27
27
|
constructor(context: APIRequestContext, options: AdminApiContextOptions);
|
|
28
28
|
static create(options?: AdminApiContextOptions): Promise<AdminApiContext>;
|
|
29
29
|
private static createApiRequestContext;
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
static authenticateWithClientCredentials(context: APIRequestContext, options: AdminApiContextOptions): Promise<string>;
|
|
31
|
+
static authenticateWithUserPassword(context: APIRequestContext, options: AdminApiContextOptions): Promise<string>;
|
|
32
32
|
isAuthenticated(): boolean;
|
|
33
33
|
get<PAYLOAD>(url: string, options?: RequestOptions$1<PAYLOAD>): Promise<APIResponse>;
|
|
34
34
|
post<PAYLOAD>(url: string, options?: RequestOptions$1<PAYLOAD>): Promise<APIResponse>;
|
|
@@ -157,7 +157,7 @@ type Tag = components['schemas']['Tag'] & {
|
|
|
157
157
|
type Rule = components['schemas']['Rule'] & {
|
|
158
158
|
id: string;
|
|
159
159
|
};
|
|
160
|
-
type Currency = components['schemas']['Currency'] & {
|
|
160
|
+
type Currency$1 = components['schemas']['Currency'] & {
|
|
161
161
|
id: string;
|
|
162
162
|
};
|
|
163
163
|
type Order = components['schemas']['Order'] & {
|
|
@@ -386,7 +386,7 @@ declare class TestDataService {
|
|
|
386
386
|
*
|
|
387
387
|
* @param isoCode - The ISO code of the currency, for example "EUR".
|
|
388
388
|
*/
|
|
389
|
-
getCurrency(isoCode: string): Promise<Currency>;
|
|
389
|
+
getCurrency(isoCode: string): Promise<Currency$1>;
|
|
390
390
|
/**
|
|
391
391
|
* Retrieves a rule based on its name.
|
|
392
392
|
*
|
|
@@ -480,7 +480,7 @@ declare class TestDataService {
|
|
|
480
480
|
active: boolean;
|
|
481
481
|
} & Partial<Category$1>;
|
|
482
482
|
getBasicCustomerStruct(salesChannelId: string, customerGroupId: string, languageId: string, countryId: string, defaultPaymentMethodId: string, salutationId: string, overrides?: Partial<Customer>): Partial<Customer>;
|
|
483
|
-
getBasicOrderStruct(lineItems: SimpleLineItem[], languageId: string, currency: Currency, paymentMethod: PaymentMethod, shippingMethod: ShippingMethod, orderState: StateMachineState, deliveryState: StateMachineState, transactionState: StateMachineState, customer: Customer, customerAddress: CustomerAddress, salesChannelId?: string, overrides?: Partial<Order>): Partial<Order>;
|
|
483
|
+
getBasicOrderStruct(lineItems: SimpleLineItem[], languageId: string, currency: Currency$1, paymentMethod: PaymentMethod, shippingMethod: ShippingMethod, orderState: StateMachineState, deliveryState: StateMachineState, transactionState: StateMachineState, customer: Customer, customerAddress: CustomerAddress, salesChannelId?: string, overrides?: Partial<Order>): Partial<Order>;
|
|
484
484
|
getBasicProductLineItemStruct(lineItem: SimpleLineItem): {
|
|
485
485
|
productId: string;
|
|
486
486
|
referencedId: string;
|
|
@@ -528,7 +528,7 @@ interface TestDataFixtureTypes {
|
|
|
528
528
|
|
|
529
529
|
interface HelperFixtureTypes {
|
|
530
530
|
IdProvider: IdProvider;
|
|
531
|
-
SaaSInstanceSetup: (
|
|
531
|
+
SaaSInstanceSetup: () => Promise<void>;
|
|
532
532
|
}
|
|
533
533
|
|
|
534
534
|
interface StoreBaseConfig {
|
|
@@ -995,12 +995,18 @@ interface DataFixtureTypes {
|
|
|
995
995
|
interface FixtureTypes extends ApiContextTypes, PageContextTypes, ActorFixtureTypes, TestDataFixtureTypes, HelperFixtureTypes, DefaultSalesChannelTypes, StorefrontPageTypes, AdministrationPageTypes, DataFixtureTypes {
|
|
996
996
|
}
|
|
997
997
|
|
|
998
|
-
|
|
998
|
+
type Language = components['schemas']['Currency'] & {
|
|
999
999
|
id: string;
|
|
1000
|
-
|
|
1001
|
-
|
|
1000
|
+
translationCode: components['schemas']['Locale'] & {
|
|
1001
|
+
id: string;
|
|
1002
|
+
};
|
|
1003
|
+
};
|
|
1004
|
+
declare const getLanguageData: (languageCode: string, adminApiContext: AdminApiContext) => Promise<Language>;
|
|
1002
1005
|
declare const getSnippetSetId: (languageCode: string, adminApiContext: AdminApiContext) => Promise<string>;
|
|
1003
|
-
|
|
1006
|
+
type Currency = components['schemas']['Currency'] & {
|
|
1007
|
+
id: string;
|
|
1008
|
+
};
|
|
1009
|
+
declare const getCurrency: (isoCode: string, adminApiContext: AdminApiContext) => Promise<Currency>;
|
|
1004
1010
|
declare const getTaxId: (adminApiContext: AdminApiContext) => Promise<string>;
|
|
1005
1011
|
declare const getPaymentMethodId: (adminApiContext: AdminApiContext, handlerId?: string) => Promise<string>;
|
|
1006
1012
|
declare const getDefaultShippingMethodId: (adminApiContext: AdminApiContext) => Promise<string>;
|
|
@@ -1059,4 +1065,4 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
|
|
|
1059
1065
|
ValidateAccessibility: (pageName: string, assertViolations?: boolean | undefined, createReport?: boolean | undefined, ruleTags?: string[] | undefined, outputDir?: string | undefined) => () => Promise<void>;
|
|
1060
1066
|
}, _playwright_test.PlaywrightWorkerArgs & _playwright_test.PlaywrightWorkerOptions & FixtureTypes>;
|
|
1061
1067
|
|
|
1062
|
-
export { AdminPageObjects, type Category$1 as Category, type CreatedRecord, type Currency, type Customer, type CustomerAddress, type DataServiceOptions, type FixtureTypes, type Media, type Order, type PageObject, type PaymentMethod, type Price, type Product, type ProductPrice, type Promotion, type PropertyGroup, type Rule, type SalesChannel, type Salutation, type ShippingMethod, type SimpleLineItem, type StateMachine, type StateMachineState, StorefrontPageObjects, type SyncApiOperation, type Tag, type Task, TestDataService, createRandomImage, extractIdFromUrl, getCountryId, getCurrency, getDefaultShippingMethodId, getFlowId, getLanguageData, getMediaId, getOrderTransactionId, getPaymentMethodId, getSalutationId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, isSaaSInstance, isThemeCompiled, setOrderStatus, test };
|
|
1068
|
+
export { AdminPageObjects, type Category$1 as Category, type CreatedRecord, type Currency$1 as Currency, type Customer, type CustomerAddress, type DataServiceOptions, type FixtureTypes, type Media, type Order, type PageObject, type PaymentMethod, type Price, type Product, type ProductPrice, type Promotion, type PropertyGroup, type Rule, type SalesChannel, type Salutation, type ShippingMethod, type SimpleLineItem, type StateMachine, type StateMachineState, StorefrontPageObjects, type SyncApiOperation, type Tag, type Task, TestDataService, createRandomImage, extractIdFromUrl, getCountryId, getCurrency, getDefaultShippingMethodId, getFlowId, getLanguageData, getMediaId, getOrderTransactionId, getPaymentMethodId, getSalutationId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, isSaaSInstance, isThemeCompiled, setOrderStatus, test };
|
package/dist/index.d.ts
CHANGED
|
@@ -27,8 +27,8 @@ declare class AdminApiContext {
|
|
|
27
27
|
constructor(context: APIRequestContext, options: AdminApiContextOptions);
|
|
28
28
|
static create(options?: AdminApiContextOptions): Promise<AdminApiContext>;
|
|
29
29
|
private static createApiRequestContext;
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
static authenticateWithClientCredentials(context: APIRequestContext, options: AdminApiContextOptions): Promise<string>;
|
|
31
|
+
static authenticateWithUserPassword(context: APIRequestContext, options: AdminApiContextOptions): Promise<string>;
|
|
32
32
|
isAuthenticated(): boolean;
|
|
33
33
|
get<PAYLOAD>(url: string, options?: RequestOptions$1<PAYLOAD>): Promise<APIResponse>;
|
|
34
34
|
post<PAYLOAD>(url: string, options?: RequestOptions$1<PAYLOAD>): Promise<APIResponse>;
|
|
@@ -157,7 +157,7 @@ type Tag = components['schemas']['Tag'] & {
|
|
|
157
157
|
type Rule = components['schemas']['Rule'] & {
|
|
158
158
|
id: string;
|
|
159
159
|
};
|
|
160
|
-
type Currency = components['schemas']['Currency'] & {
|
|
160
|
+
type Currency$1 = components['schemas']['Currency'] & {
|
|
161
161
|
id: string;
|
|
162
162
|
};
|
|
163
163
|
type Order = components['schemas']['Order'] & {
|
|
@@ -386,7 +386,7 @@ declare class TestDataService {
|
|
|
386
386
|
*
|
|
387
387
|
* @param isoCode - The ISO code of the currency, for example "EUR".
|
|
388
388
|
*/
|
|
389
|
-
getCurrency(isoCode: string): Promise<Currency>;
|
|
389
|
+
getCurrency(isoCode: string): Promise<Currency$1>;
|
|
390
390
|
/**
|
|
391
391
|
* Retrieves a rule based on its name.
|
|
392
392
|
*
|
|
@@ -480,7 +480,7 @@ declare class TestDataService {
|
|
|
480
480
|
active: boolean;
|
|
481
481
|
} & Partial<Category$1>;
|
|
482
482
|
getBasicCustomerStruct(salesChannelId: string, customerGroupId: string, languageId: string, countryId: string, defaultPaymentMethodId: string, salutationId: string, overrides?: Partial<Customer>): Partial<Customer>;
|
|
483
|
-
getBasicOrderStruct(lineItems: SimpleLineItem[], languageId: string, currency: Currency, paymentMethod: PaymentMethod, shippingMethod: ShippingMethod, orderState: StateMachineState, deliveryState: StateMachineState, transactionState: StateMachineState, customer: Customer, customerAddress: CustomerAddress, salesChannelId?: string, overrides?: Partial<Order>): Partial<Order>;
|
|
483
|
+
getBasicOrderStruct(lineItems: SimpleLineItem[], languageId: string, currency: Currency$1, paymentMethod: PaymentMethod, shippingMethod: ShippingMethod, orderState: StateMachineState, deliveryState: StateMachineState, transactionState: StateMachineState, customer: Customer, customerAddress: CustomerAddress, salesChannelId?: string, overrides?: Partial<Order>): Partial<Order>;
|
|
484
484
|
getBasicProductLineItemStruct(lineItem: SimpleLineItem): {
|
|
485
485
|
productId: string;
|
|
486
486
|
referencedId: string;
|
|
@@ -528,7 +528,7 @@ interface TestDataFixtureTypes {
|
|
|
528
528
|
|
|
529
529
|
interface HelperFixtureTypes {
|
|
530
530
|
IdProvider: IdProvider;
|
|
531
|
-
SaaSInstanceSetup: (
|
|
531
|
+
SaaSInstanceSetup: () => Promise<void>;
|
|
532
532
|
}
|
|
533
533
|
|
|
534
534
|
interface StoreBaseConfig {
|
|
@@ -995,12 +995,18 @@ interface DataFixtureTypes {
|
|
|
995
995
|
interface FixtureTypes extends ApiContextTypes, PageContextTypes, ActorFixtureTypes, TestDataFixtureTypes, HelperFixtureTypes, DefaultSalesChannelTypes, StorefrontPageTypes, AdministrationPageTypes, DataFixtureTypes {
|
|
996
996
|
}
|
|
997
997
|
|
|
998
|
-
|
|
998
|
+
type Language = components['schemas']['Currency'] & {
|
|
999
999
|
id: string;
|
|
1000
|
-
|
|
1001
|
-
|
|
1000
|
+
translationCode: components['schemas']['Locale'] & {
|
|
1001
|
+
id: string;
|
|
1002
|
+
};
|
|
1003
|
+
};
|
|
1004
|
+
declare const getLanguageData: (languageCode: string, adminApiContext: AdminApiContext) => Promise<Language>;
|
|
1002
1005
|
declare const getSnippetSetId: (languageCode: string, adminApiContext: AdminApiContext) => Promise<string>;
|
|
1003
|
-
|
|
1006
|
+
type Currency = components['schemas']['Currency'] & {
|
|
1007
|
+
id: string;
|
|
1008
|
+
};
|
|
1009
|
+
declare const getCurrency: (isoCode: string, adminApiContext: AdminApiContext) => Promise<Currency>;
|
|
1004
1010
|
declare const getTaxId: (adminApiContext: AdminApiContext) => Promise<string>;
|
|
1005
1011
|
declare const getPaymentMethodId: (adminApiContext: AdminApiContext, handlerId?: string) => Promise<string>;
|
|
1006
1012
|
declare const getDefaultShippingMethodId: (adminApiContext: AdminApiContext) => Promise<string>;
|
|
@@ -1059,4 +1065,4 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
|
|
|
1059
1065
|
ValidateAccessibility: (pageName: string, assertViolations?: boolean | undefined, createReport?: boolean | undefined, ruleTags?: string[] | undefined, outputDir?: string | undefined) => () => Promise<void>;
|
|
1060
1066
|
}, _playwright_test.PlaywrightWorkerArgs & _playwright_test.PlaywrightWorkerOptions & FixtureTypes>;
|
|
1061
1067
|
|
|
1062
|
-
export { AdminPageObjects, type Category$1 as Category, type CreatedRecord, type Currency, type Customer, type CustomerAddress, type DataServiceOptions, type FixtureTypes, type Media, type Order, type PageObject, type PaymentMethod, type Price, type Product, type ProductPrice, type Promotion, type PropertyGroup, type Rule, type SalesChannel, type Salutation, type ShippingMethod, type SimpleLineItem, type StateMachine, type StateMachineState, StorefrontPageObjects, type SyncApiOperation, type Tag, type Task, TestDataService, createRandomImage, extractIdFromUrl, getCountryId, getCurrency, getDefaultShippingMethodId, getFlowId, getLanguageData, getMediaId, getOrderTransactionId, getPaymentMethodId, getSalutationId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, isSaaSInstance, isThemeCompiled, setOrderStatus, test };
|
|
1068
|
+
export { AdminPageObjects, type Category$1 as Category, type CreatedRecord, type Currency$1 as Currency, type Customer, type CustomerAddress, type DataServiceOptions, type FixtureTypes, type Media, type Order, type PageObject, type PaymentMethod, type Price, type Product, type ProductPrice, type Promotion, type PropertyGroup, type Rule, type SalesChannel, type Salutation, type ShippingMethod, type SimpleLineItem, type StateMachine, type StateMachineState, StorefrontPageObjects, type SyncApiOperation, type Tag, type Task, TestDataService, createRandomImage, extractIdFromUrl, getCountryId, getCurrency, getDefaultShippingMethodId, getFlowId, getLanguageData, getMediaId, getOrderTransactionId, getPaymentMethodId, getSalutationId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, isSaaSInstance, isThemeCompiled, setOrderStatus, test };
|
package/dist/index.mjs
CHANGED
|
@@ -20,10 +20,10 @@ const getLanguageData = async (languageCode, adminApiContext) => {
|
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
22
|
const result = await resp.json();
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
if (result.data.length === 0) {
|
|
24
|
+
throw new Error(`Language ${languageCode} not found`);
|
|
25
|
+
}
|
|
26
|
+
return result.data[0];
|
|
27
27
|
};
|
|
28
28
|
const getSnippetSetId = async (languageCode, adminApiContext) => {
|
|
29
29
|
const resp = await adminApiContext.post("search/snippet-set", {
|
|
@@ -51,6 +51,9 @@ const getCurrency = async (isoCode, adminApiContext) => {
|
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
53
|
const result = await resp.json();
|
|
54
|
+
if (result.data.length === 0) {
|
|
55
|
+
throw new Error(`Currency ${isoCode} not found`);
|
|
56
|
+
}
|
|
54
57
|
return result.data[0];
|
|
55
58
|
};
|
|
56
59
|
const getTaxId = async (adminApiContext) => {
|
|
@@ -217,7 +220,7 @@ const test$b = test$d.extend({
|
|
|
217
220
|
const lang = await requests.language;
|
|
218
221
|
const currency = await requests.currencyEUR;
|
|
219
222
|
await use({
|
|
220
|
-
enGBLocaleId: lang.
|
|
223
|
+
enGBLocaleId: lang.translationCode.id,
|
|
221
224
|
enGBLanguageId: lang.id,
|
|
222
225
|
storefrontTypeId: "8a243080f92e4c719546314b577cf82b",
|
|
223
226
|
eurCurrencyId: currency.id,
|
|
@@ -1439,6 +1442,20 @@ class TestDataService {
|
|
|
1439
1442
|
At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
|
|
1440
1443
|
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
|
|
1441
1444
|
At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.`.trim();
|
|
1445
|
+
const prices = [
|
|
1446
|
+
{
|
|
1447
|
+
currencyId: this.defaultSalesChannel.currencyId,
|
|
1448
|
+
gross: 10,
|
|
1449
|
+
linked: false,
|
|
1450
|
+
net: 8.4
|
|
1451
|
+
},
|
|
1452
|
+
{
|
|
1453
|
+
currencyId,
|
|
1454
|
+
gross: 10,
|
|
1455
|
+
linked: false,
|
|
1456
|
+
net: 8.4
|
|
1457
|
+
}
|
|
1458
|
+
];
|
|
1442
1459
|
let basicProduct = {
|
|
1443
1460
|
id: productUuid,
|
|
1444
1461
|
name: productName,
|
|
@@ -1447,18 +1464,8 @@ class TestDataService {
|
|
|
1447
1464
|
taxId,
|
|
1448
1465
|
active: true,
|
|
1449
1466
|
stock: 10,
|
|
1450
|
-
price:
|
|
1451
|
-
|
|
1452
|
-
gross: 10,
|
|
1453
|
-
linked: false,
|
|
1454
|
-
net: 8.4
|
|
1455
|
-
}],
|
|
1456
|
-
purchasePrices: [{
|
|
1457
|
-
currencyId,
|
|
1458
|
-
gross: 8,
|
|
1459
|
-
linked: false,
|
|
1460
|
-
net: 6.7
|
|
1461
|
-
}]
|
|
1467
|
+
price: prices,
|
|
1468
|
+
purchasePrices: prices
|
|
1462
1469
|
};
|
|
1463
1470
|
if (this.defaultCategoryId) {
|
|
1464
1471
|
basicProduct = Object.assign({}, basicProduct, {
|
|
@@ -1478,41 +1485,35 @@ class TestDataService {
|
|
|
1478
1485
|
return Object.assign({}, basicProduct, overrides);
|
|
1479
1486
|
}
|
|
1480
1487
|
getProductPriceRangeStruct(currencyId, ruleId) {
|
|
1481
|
-
|
|
1482
|
-
|
|
1488
|
+
const p = (gross, net) => [
|
|
1489
|
+
{
|
|
1490
|
+
currencyId: this.defaultSalesChannel.currencyId,
|
|
1491
|
+
gross,
|
|
1492
|
+
net,
|
|
1493
|
+
linked: false
|
|
1494
|
+
},
|
|
1495
|
+
{
|
|
1483
1496
|
currencyId,
|
|
1484
|
-
gross
|
|
1485
|
-
net
|
|
1497
|
+
gross,
|
|
1498
|
+
net,
|
|
1486
1499
|
linked: false
|
|
1487
|
-
}
|
|
1500
|
+
}
|
|
1501
|
+
];
|
|
1502
|
+
return {
|
|
1503
|
+
price: p(100, 84.03),
|
|
1488
1504
|
prices: [{
|
|
1489
1505
|
ruleId,
|
|
1490
|
-
price:
|
|
1491
|
-
currencyId,
|
|
1492
|
-
gross: 100,
|
|
1493
|
-
net: 84.03,
|
|
1494
|
-
linked: false
|
|
1495
|
-
}],
|
|
1506
|
+
price: p(100, 84.03),
|
|
1496
1507
|
quantityStart: 1,
|
|
1497
1508
|
quantityEnd: 10
|
|
1498
1509
|
}, {
|
|
1499
1510
|
ruleId,
|
|
1500
|
-
price:
|
|
1501
|
-
currencyId,
|
|
1502
|
-
gross: 90,
|
|
1503
|
-
net: 75.63,
|
|
1504
|
-
linked: false
|
|
1505
|
-
}],
|
|
1511
|
+
price: p(90, 75.63),
|
|
1506
1512
|
quantityStart: 11,
|
|
1507
1513
|
quantityEnd: 20
|
|
1508
1514
|
}, {
|
|
1509
1515
|
ruleId,
|
|
1510
|
-
price:
|
|
1511
|
-
currencyId,
|
|
1512
|
-
gross: 80,
|
|
1513
|
-
net: 67.23,
|
|
1514
|
-
linked: false
|
|
1515
|
-
}],
|
|
1516
|
+
price: p(80, 67.23),
|
|
1516
1517
|
quantityStart: 21,
|
|
1517
1518
|
quantityEnd: 50
|
|
1518
1519
|
}]
|
|
@@ -1841,23 +1842,22 @@ const test$6 = test$d.extend({
|
|
|
1841
1842
|
{ scope: "worker" }
|
|
1842
1843
|
],
|
|
1843
1844
|
SaaSInstanceSetup: [
|
|
1844
|
-
async ({ AdminApiContext }, use) => {
|
|
1845
|
-
const SetupInstance = async function SetupInstance2(
|
|
1846
|
-
await test$6.skip(!await isSaaSInstance(
|
|
1847
|
-
|
|
1845
|
+
async ({ AdminApiContext: context }, use) => {
|
|
1846
|
+
const SetupInstance = async function SetupInstance2() {
|
|
1847
|
+
await test$6.skip(!await isSaaSInstance(context), "Skipping SaaS setup, could not detect SaaS instance");
|
|
1848
|
+
expect(context.options.admin_username, "setup requires admin user credentials").toEqual(expect.any(String));
|
|
1849
|
+
expect(context.options.admin_password, "setup requires admin user credentials").toEqual(expect.any(String));
|
|
1850
|
+
const instanceStatusResponse = await context.get("./instance/status");
|
|
1848
1851
|
const instanceStatus = await instanceStatusResponse.json();
|
|
1849
1852
|
await expect(instanceStatus.tags, 'expect instance to have "ci" tag').toContain("ci");
|
|
1850
|
-
|
|
1851
|
-
await
|
|
1852
|
-
await
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
await
|
|
1857
|
-
await
|
|
1858
|
-
await page.getByRole("button", { name: "Log in" }).click();
|
|
1859
|
-
await page.getByRole("button", { name: "Launch your business" }).click();
|
|
1860
|
-
await expect(page.getByRole("button", { name: "Launch your business" })).toBeHidden();
|
|
1853
|
+
const currency = await getCurrency("USD", context);
|
|
1854
|
+
const language = await getLanguageData("en-US", context);
|
|
1855
|
+
await context.post(
|
|
1856
|
+
"./_actions/set-default-entities",
|
|
1857
|
+
{ data: { currencyId: currency.id, languageId: language.id } }
|
|
1858
|
+
);
|
|
1859
|
+
const token = await AdminApiContext.authenticateWithUserPassword(context.context, context.options);
|
|
1860
|
+
await context.post("./sbp/request-live-status", { headers: { Authorization: `Bearer ${token}` } });
|
|
1861
1861
|
};
|
|
1862
1862
|
await use(SetupInstance);
|
|
1863
1863
|
},
|
|
@@ -2743,6 +2743,20 @@ const ProductData = test$d.extend({
|
|
|
2743
2743
|
ProductData: async ({ IdProvider, SalesChannelBaseConfig, AdminApiContext, DefaultSalesChannel }, use) => {
|
|
2744
2744
|
const { id: productId, uuid: productUuid } = IdProvider.getIdPair();
|
|
2745
2745
|
const productName = `Product_test_${productId}`;
|
|
2746
|
+
const price = [
|
|
2747
|
+
{
|
|
2748
|
+
currencyId: DefaultSalesChannel.salesChannel.currencyId,
|
|
2749
|
+
gross: 10,
|
|
2750
|
+
linked: false,
|
|
2751
|
+
net: 8.4
|
|
2752
|
+
},
|
|
2753
|
+
{
|
|
2754
|
+
currencyId: SalesChannelBaseConfig.defaultCurrencyId,
|
|
2755
|
+
gross: 10,
|
|
2756
|
+
linked: false,
|
|
2757
|
+
net: 8.4
|
|
2758
|
+
}
|
|
2759
|
+
];
|
|
2746
2760
|
const productResponse = await AdminApiContext.post("./product?_response", {
|
|
2747
2761
|
data: {
|
|
2748
2762
|
active: true,
|
|
@@ -2751,34 +2765,8 @@ const ProductData = test$d.extend({
|
|
|
2751
2765
|
id: productUuid,
|
|
2752
2766
|
name: productName,
|
|
2753
2767
|
productNumber: "Product-" + productId,
|
|
2754
|
-
price
|
|
2755
|
-
|
|
2756
|
-
currencyId: SalesChannelBaseConfig.eurCurrencyId,
|
|
2757
|
-
gross: 10,
|
|
2758
|
-
linked: false,
|
|
2759
|
-
net: 8.4
|
|
2760
|
-
},
|
|
2761
|
-
{
|
|
2762
|
-
currencyId: SalesChannelBaseConfig.defaultCurrencyId,
|
|
2763
|
-
gross: 10,
|
|
2764
|
-
linked: false,
|
|
2765
|
-
net: 8.4
|
|
2766
|
-
}
|
|
2767
|
-
],
|
|
2768
|
-
purchasePrices: [
|
|
2769
|
-
{
|
|
2770
|
-
currencyId: SalesChannelBaseConfig.eurCurrencyId,
|
|
2771
|
-
gross: 8,
|
|
2772
|
-
linked: false,
|
|
2773
|
-
net: 6.7
|
|
2774
|
-
},
|
|
2775
|
-
{
|
|
2776
|
-
currencyId: SalesChannelBaseConfig.defaultCurrencyId,
|
|
2777
|
-
gross: 8,
|
|
2778
|
-
linked: false,
|
|
2779
|
-
net: 6.7
|
|
2780
|
-
}
|
|
2781
|
-
],
|
|
2768
|
+
price,
|
|
2769
|
+
purchasePrices: price,
|
|
2782
2770
|
visibilities: [
|
|
2783
2771
|
{
|
|
2784
2772
|
salesChannelId: DefaultSalesChannel.salesChannel.id,
|