@shopware-ag/acceptance-test-suite 9.0.0 → 10.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +13 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.mjs +39 -4
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -171,6 +171,9 @@ declare class IdProvider {
|
|
|
171
171
|
type SalesChannel = components['schemas']['SalesChannel'] & {
|
|
172
172
|
id: string;
|
|
173
173
|
};
|
|
174
|
+
type SalesChannelDomain = components['schemas']['SalesChannelDomain'] & {
|
|
175
|
+
id: string;
|
|
176
|
+
};
|
|
174
177
|
type Customer = Omit<components['schemas']['Customer'], 'defaultShippingAddress' | 'defaultBillingAddress'> & {
|
|
175
178
|
id: string;
|
|
176
179
|
password: string;
|
|
@@ -638,6 +641,12 @@ declare class TestDataService {
|
|
|
638
641
|
* @param overrides - Specific data overrides that will be applied to the custom field set data struct.
|
|
639
642
|
*/
|
|
640
643
|
createCustomFieldSet(overrides?: Partial<CustomFieldSet>): Promise<CustomFieldSet>;
|
|
644
|
+
/**
|
|
645
|
+
* Creates a new domain for a sales channel.
|
|
646
|
+
*
|
|
647
|
+
* @param overrides - Specific data overrides that will be applied to the sales channel domain data struct.
|
|
648
|
+
*/
|
|
649
|
+
createSalesChannelDomain(overrides?: Partial<SalesChannelDomain>): Promise<SalesChannelDomain>;
|
|
641
650
|
/**
|
|
642
651
|
* Assigns a media resource as the download of a digital product.
|
|
643
652
|
*
|
|
@@ -987,6 +996,7 @@ declare class TestDataService {
|
|
|
987
996
|
clearCaches(): Promise<void>;
|
|
988
997
|
getBasicCustomFieldSetStruct(overrides?: Partial<CustomFieldSet>): Partial<CustomFieldSet>;
|
|
989
998
|
getBasicCustomFieldStruct(overrides?: Partial<CustomField>): Partial<CustomField>;
|
|
999
|
+
getSalesChannelDomainStruct(salesChannelId: string, currencyId: string, languageId: string, snippetSetId: string, overrides?: Partial<SalesChannelDomain>): Partial<SalesChannelDomain>;
|
|
990
1000
|
}
|
|
991
1001
|
|
|
992
1002
|
interface TestDataFixtureTypes {
|
|
@@ -1042,7 +1052,9 @@ declare class Home implements PageObject {
|
|
|
1042
1052
|
readonly productImages: Locator;
|
|
1043
1053
|
readonly productListItems: Locator;
|
|
1044
1054
|
readonly languagesDropdown: Locator;
|
|
1055
|
+
readonly languagesMenuOptions: Locator;
|
|
1045
1056
|
readonly currenciesDropdown: Locator;
|
|
1057
|
+
readonly currenciesMenuOptions: Locator;
|
|
1046
1058
|
readonly consentOnlyTechnicallyRequiredButton: Locator;
|
|
1047
1059
|
readonly consentConfigureButton: Locator;
|
|
1048
1060
|
readonly consentAcceptAllCookiesButton: Locator;
|
|
@@ -2149,4 +2161,4 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
|
|
|
2149
2161
|
ValidateAccessibility: (pageName: string, assertViolations?: number | boolean | undefined, createReport?: boolean | undefined, ruleTags?: string[] | undefined, outputDir?: string | undefined) => () => Promise<axe_core.Result[]>;
|
|
2150
2162
|
}, _playwright_test.PlaywrightWorkerArgs & _playwright_test.PlaywrightWorkerOptions & FixtureTypes>;
|
|
2151
2163
|
|
|
2152
|
-
export { AdminPageObjects, type CalculatedTaxes, type Category$1 as Category, type CmsPage, type Country, type CreatedRecord, type Currency$1 as Currency, type CustomField, type CustomFieldSet, type Customer, type CustomerAddress, type CustomerGroup, type DataServiceOptions, type DeliveryTime, type FixtureTypes, type Language$1 as Language, type Manufacturer, type Media, type Order, type OrderDelivery, type OrderLineItem, type OrderStatus, type PageObject, type PaymentMethod, type Price, type Product, type ProductPrice, type Promotion, type PromotionDiscount, type PropertyGroup, type PropertyGroupOption, type RegistrationData, type Rule, type SalesChannel, type SalesChannelAnalytics, type SalesChannelRecord, type Salutation, type ShippingMethod, type SimpleLineItem, type StateMachine, type StateMachineState, StorefrontPageObjects, type SyncApiOperation, type SystemConfig, type Tag, type Task, type TaxRules, TestDataService, createRandomImage, extractIdFromUrl, getCountryId, getCurrency, getDefaultShippingMethodId, getFlowId, getLanguageData, getMediaId, getOrderTransactionId, getPaymentMethodId, getPromotionWithDiscount, getSalutationId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, isSaaSInstance, isThemeCompiled, setOrderStatus, test };
|
|
2164
|
+
export { AdminPageObjects, type CalculatedTaxes, type Category$1 as Category, type CmsPage, type Country, type CreatedRecord, type Currency$1 as Currency, type CustomField, type CustomFieldSet, type Customer, type CustomerAddress, type CustomerGroup, type DataServiceOptions, type DeliveryTime, type FixtureTypes, type Language$1 as Language, type Manufacturer, type Media, type Order, type OrderDelivery, type OrderLineItem, type OrderStatus, type PageObject, type PaymentMethod, type Price, type Product, type ProductPrice, type Promotion, type PromotionDiscount, type PropertyGroup, type PropertyGroupOption, type RegistrationData, type Rule, type SalesChannel, type SalesChannelAnalytics, type SalesChannelDomain, type SalesChannelRecord, type Salutation, type ShippingMethod, type SimpleLineItem, type StateMachine, type StateMachineState, StorefrontPageObjects, type SyncApiOperation, type SystemConfig, type Tag, type Task, type TaxRules, TestDataService, createRandomImage, extractIdFromUrl, getCountryId, getCurrency, getDefaultShippingMethodId, getFlowId, getLanguageData, getMediaId, getOrderTransactionId, getPaymentMethodId, getPromotionWithDiscount, getSalutationId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, isSaaSInstance, isThemeCompiled, setOrderStatus, test };
|
package/dist/index.d.ts
CHANGED
|
@@ -171,6 +171,9 @@ declare class IdProvider {
|
|
|
171
171
|
type SalesChannel = components['schemas']['SalesChannel'] & {
|
|
172
172
|
id: string;
|
|
173
173
|
};
|
|
174
|
+
type SalesChannelDomain = components['schemas']['SalesChannelDomain'] & {
|
|
175
|
+
id: string;
|
|
176
|
+
};
|
|
174
177
|
type Customer = Omit<components['schemas']['Customer'], 'defaultShippingAddress' | 'defaultBillingAddress'> & {
|
|
175
178
|
id: string;
|
|
176
179
|
password: string;
|
|
@@ -638,6 +641,12 @@ declare class TestDataService {
|
|
|
638
641
|
* @param overrides - Specific data overrides that will be applied to the custom field set data struct.
|
|
639
642
|
*/
|
|
640
643
|
createCustomFieldSet(overrides?: Partial<CustomFieldSet>): Promise<CustomFieldSet>;
|
|
644
|
+
/**
|
|
645
|
+
* Creates a new domain for a sales channel.
|
|
646
|
+
*
|
|
647
|
+
* @param overrides - Specific data overrides that will be applied to the sales channel domain data struct.
|
|
648
|
+
*/
|
|
649
|
+
createSalesChannelDomain(overrides?: Partial<SalesChannelDomain>): Promise<SalesChannelDomain>;
|
|
641
650
|
/**
|
|
642
651
|
* Assigns a media resource as the download of a digital product.
|
|
643
652
|
*
|
|
@@ -987,6 +996,7 @@ declare class TestDataService {
|
|
|
987
996
|
clearCaches(): Promise<void>;
|
|
988
997
|
getBasicCustomFieldSetStruct(overrides?: Partial<CustomFieldSet>): Partial<CustomFieldSet>;
|
|
989
998
|
getBasicCustomFieldStruct(overrides?: Partial<CustomField>): Partial<CustomField>;
|
|
999
|
+
getSalesChannelDomainStruct(salesChannelId: string, currencyId: string, languageId: string, snippetSetId: string, overrides?: Partial<SalesChannelDomain>): Partial<SalesChannelDomain>;
|
|
990
1000
|
}
|
|
991
1001
|
|
|
992
1002
|
interface TestDataFixtureTypes {
|
|
@@ -1042,7 +1052,9 @@ declare class Home implements PageObject {
|
|
|
1042
1052
|
readonly productImages: Locator;
|
|
1043
1053
|
readonly productListItems: Locator;
|
|
1044
1054
|
readonly languagesDropdown: Locator;
|
|
1055
|
+
readonly languagesMenuOptions: Locator;
|
|
1045
1056
|
readonly currenciesDropdown: Locator;
|
|
1057
|
+
readonly currenciesMenuOptions: Locator;
|
|
1046
1058
|
readonly consentOnlyTechnicallyRequiredButton: Locator;
|
|
1047
1059
|
readonly consentConfigureButton: Locator;
|
|
1048
1060
|
readonly consentAcceptAllCookiesButton: Locator;
|
|
@@ -2149,4 +2161,4 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
|
|
|
2149
2161
|
ValidateAccessibility: (pageName: string, assertViolations?: number | boolean | undefined, createReport?: boolean | undefined, ruleTags?: string[] | undefined, outputDir?: string | undefined) => () => Promise<axe_core.Result[]>;
|
|
2150
2162
|
}, _playwright_test.PlaywrightWorkerArgs & _playwright_test.PlaywrightWorkerOptions & FixtureTypes>;
|
|
2151
2163
|
|
|
2152
|
-
export { AdminPageObjects, type CalculatedTaxes, type Category$1 as Category, type CmsPage, type Country, type CreatedRecord, type Currency$1 as Currency, type CustomField, type CustomFieldSet, type Customer, type CustomerAddress, type CustomerGroup, type DataServiceOptions, type DeliveryTime, type FixtureTypes, type Language$1 as Language, type Manufacturer, type Media, type Order, type OrderDelivery, type OrderLineItem, type OrderStatus, type PageObject, type PaymentMethod, type Price, type Product, type ProductPrice, type Promotion, type PromotionDiscount, type PropertyGroup, type PropertyGroupOption, type RegistrationData, type Rule, type SalesChannel, type SalesChannelAnalytics, type SalesChannelRecord, type Salutation, type ShippingMethod, type SimpleLineItem, type StateMachine, type StateMachineState, StorefrontPageObjects, type SyncApiOperation, type SystemConfig, type Tag, type Task, type TaxRules, TestDataService, createRandomImage, extractIdFromUrl, getCountryId, getCurrency, getDefaultShippingMethodId, getFlowId, getLanguageData, getMediaId, getOrderTransactionId, getPaymentMethodId, getPromotionWithDiscount, getSalutationId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, isSaaSInstance, isThemeCompiled, setOrderStatus, test };
|
|
2164
|
+
export { AdminPageObjects, type CalculatedTaxes, type Category$1 as Category, type CmsPage, type Country, type CreatedRecord, type Currency$1 as Currency, type CustomField, type CustomFieldSet, type Customer, type CustomerAddress, type CustomerGroup, type DataServiceOptions, type DeliveryTime, type FixtureTypes, type Language$1 as Language, type Manufacturer, type Media, type Order, type OrderDelivery, type OrderLineItem, type OrderStatus, type PageObject, type PaymentMethod, type Price, type Product, type ProductPrice, type Promotion, type PromotionDiscount, type PropertyGroup, type PropertyGroupOption, type RegistrationData, type Rule, type SalesChannel, type SalesChannelAnalytics, type SalesChannelDomain, type SalesChannelRecord, type Salutation, type ShippingMethod, type SimpleLineItem, type StateMachine, type StateMachineState, StorefrontPageObjects, type SyncApiOperation, type SystemConfig, type Tag, type Task, type TaxRules, TestDataService, createRandomImage, extractIdFromUrl, getCountryId, getCurrency, getDefaultShippingMethodId, getFlowId, getLanguageData, getMediaId, getOrderTransactionId, getPaymentMethodId, getPromotionWithDiscount, getSalutationId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, isSaaSInstance, isThemeCompiled, setOrderStatus, test };
|
package/dist/index.mjs
CHANGED
|
@@ -966,7 +966,7 @@ class TestDataService {
|
|
|
966
966
|
*
|
|
967
967
|
* @private
|
|
968
968
|
*/
|
|
969
|
-
__publicField$M(this, "highPriorityEntities", ["order", "product", "landing_page", "sales_channel_currency", "sales_channel_country", "customer"]);
|
|
969
|
+
__publicField$M(this, "highPriorityEntities", ["order", "product", "landing_page", "sales_channel_domain", "sales_channel_currency", "sales_channel_country", "customer"]);
|
|
970
970
|
/**
|
|
971
971
|
* A registry of all created records.
|
|
972
972
|
*
|
|
@@ -1594,6 +1594,25 @@ class TestDataService {
|
|
|
1594
1594
|
this.addCreatedRecord("custom_field_set", customFieldSet.id);
|
|
1595
1595
|
return customFieldSet;
|
|
1596
1596
|
}
|
|
1597
|
+
/**
|
|
1598
|
+
* Creates a new domain for a sales channel.
|
|
1599
|
+
*
|
|
1600
|
+
* @param overrides - Specific data overrides that will be applied to the sales channel domain data struct.
|
|
1601
|
+
*/
|
|
1602
|
+
async createSalesChannelDomain(overrides = {}) {
|
|
1603
|
+
const salesChannelId = this.defaultSalesChannel.id;
|
|
1604
|
+
const currencyId = this.defaultCurrencyId;
|
|
1605
|
+
const languageId = this.defaultLanguageId;
|
|
1606
|
+
const snippetSetId = await getSnippetSetId("en-GB", this.AdminApiClient);
|
|
1607
|
+
const salesChannelDomainStruct = this.getSalesChannelDomainStruct(salesChannelId, currencyId, languageId, snippetSetId, overrides);
|
|
1608
|
+
const response = await this.AdminApiClient.post(`sales-channel-domain?_response=detail`, {
|
|
1609
|
+
data: salesChannelDomainStruct
|
|
1610
|
+
});
|
|
1611
|
+
expect(response.ok()).toBeTruthy();
|
|
1612
|
+
const { data: salesChannelDomain } = await response.json();
|
|
1613
|
+
this.addCreatedRecord("sales_channel_domain", salesChannelDomain.id);
|
|
1614
|
+
return salesChannelDomain;
|
|
1615
|
+
}
|
|
1597
1616
|
/**
|
|
1598
1617
|
* Assigns a media resource as the download of a digital product.
|
|
1599
1618
|
*
|
|
@@ -2877,6 +2896,18 @@ class TestDataService {
|
|
|
2877
2896
|
};
|
|
2878
2897
|
return Object.assign({}, basicCustomField, overrides);
|
|
2879
2898
|
}
|
|
2899
|
+
getSalesChannelDomainStruct(salesChannelId, currencyId, languageId, snippetSetId, overrides = {}) {
|
|
2900
|
+
const appUrl = process.env["APP_URL"];
|
|
2901
|
+
const baseUrl = `${appUrl}test-${this.IdProvider.getIdPair().uuid}/`;
|
|
2902
|
+
const basicSalesChannelDomain = {
|
|
2903
|
+
url: baseUrl,
|
|
2904
|
+
salesChannelId,
|
|
2905
|
+
currencyId,
|
|
2906
|
+
languageId,
|
|
2907
|
+
snippetSetId
|
|
2908
|
+
};
|
|
2909
|
+
return Object.assign({}, basicSalesChannelDomain, overrides);
|
|
2910
|
+
}
|
|
2880
2911
|
}
|
|
2881
2912
|
|
|
2882
2913
|
const test$8 = test$e.extend({
|
|
@@ -2990,7 +3021,9 @@ class Home {
|
|
|
2990
3021
|
__publicField$K(this, "productImages");
|
|
2991
3022
|
__publicField$K(this, "productListItems");
|
|
2992
3023
|
__publicField$K(this, "languagesDropdown");
|
|
3024
|
+
__publicField$K(this, "languagesMenuOptions");
|
|
2993
3025
|
__publicField$K(this, "currenciesDropdown");
|
|
3026
|
+
__publicField$K(this, "currenciesMenuOptions");
|
|
2994
3027
|
__publicField$K(this, "consentOnlyTechnicallyRequiredButton");
|
|
2995
3028
|
__publicField$K(this, "consentConfigureButton");
|
|
2996
3029
|
__publicField$K(this, "consentAcceptAllCookiesButton");
|
|
@@ -3006,8 +3039,10 @@ class Home {
|
|
|
3006
3039
|
__publicField$K(this, "offcanvasBackdrop");
|
|
3007
3040
|
this.productImages = page.locator(".product-image-link");
|
|
3008
3041
|
this.productListItems = page.getByRole("listitem");
|
|
3009
|
-
this.languagesDropdown = page.
|
|
3010
|
-
this.
|
|
3042
|
+
this.languagesDropdown = page.locator(".top-bar-language").filter({ has: page.getByRole("button") });
|
|
3043
|
+
this.languagesMenuOptions = page.locator(".top-bar-language").filter({ has: page.getByRole("list") });
|
|
3044
|
+
this.currenciesDropdown = page.locator(".top-bar-currency").filter({ has: page.getByRole("button") });
|
|
3045
|
+
this.currenciesMenuOptions = page.locator(".top-bar-currency").filter({ has: page.getByRole("list") });
|
|
3011
3046
|
this.consentCookieBannerContainer = page.locator(".cookie-permission-container");
|
|
3012
3047
|
this.consentOnlyTechnicallyRequiredButton = page.getByRole("button", { name: "Only technically required" });
|
|
3013
3048
|
this.consentConfigureButton = page.getByRole("button", { name: "Configure" });
|
|
@@ -3410,7 +3445,7 @@ class AccountLogin {
|
|
|
3410
3445
|
this.personalFormArea = page.locator(".register-personal");
|
|
3411
3446
|
this.billingAddressFormArea = page.locator(".register-billing");
|
|
3412
3447
|
this.accountTypeSelect = this.personalFormArea.locator(".contact-select");
|
|
3413
|
-
this.salutationSelect = this.personalFormArea.locator("
|
|
3448
|
+
this.salutationSelect = this.personalFormArea.locator(".form-group").filter({ has: page.getByLabel("Salutation") }).locator(".form-select");
|
|
3414
3449
|
this.firstNameInput = this.personalFormArea.getByLabel("First name*");
|
|
3415
3450
|
this.lastNameInput = this.personalFormArea.getByLabel("Last name*");
|
|
3416
3451
|
this.companyInput = this.personalFormArea.getByPlaceholder("Enter company...");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopware-ag/acceptance-test-suite",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.1",
|
|
4
4
|
"description": "Shopware Acceptance Test Suite",
|
|
5
5
|
"author": "shopware AG",
|
|
6
6
|
"license": "MIT",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@axe-core/playwright": "4.9.1",
|
|
40
|
-
"@playwright/test": "^1.
|
|
40
|
+
"@playwright/test": "^1.49.1",
|
|
41
41
|
"@shopware/api-client": "0.5.0",
|
|
42
42
|
"axe-html-reporter": "2.2.3",
|
|
43
43
|
"image-js": "0.35.5",
|