@shopware-ag/acceptance-test-suite 12.8.4 → 12.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +11 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.mjs +37 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -497,6 +497,7 @@ declare const isSaaSInstance: (adminApiContext: AdminApiContext) => Promise<bool
|
|
|
497
497
|
declare const isThemeCompiled: (context: StoreApiContext, storefrontUrl: string) => Promise<boolean>;
|
|
498
498
|
|
|
499
499
|
declare function createRandomImage(width?: number, height?: number): Image;
|
|
500
|
+
declare function createSolidColorImage(width?: number, height?: number, color?: [number, number, number]): Image;
|
|
500
501
|
declare function encodeImage(image: Image): Buffer<ArrayBuffer>;
|
|
501
502
|
|
|
502
503
|
interface IdPair {
|
|
@@ -668,6 +669,15 @@ declare class TestDataService {
|
|
|
668
669
|
* @param height - The height of the image in pixel. Default is 600.
|
|
669
670
|
*/
|
|
670
671
|
createMediaPNG(width?: number, height?: number): Promise<Media$1>;
|
|
672
|
+
/**
|
|
673
|
+
* Creates a new media resource containing a solid color PNG image.
|
|
674
|
+
* Unlike `createMediaPNG`, the result is deterministic and suitable for visual regression tests.
|
|
675
|
+
*
|
|
676
|
+
* @param width - The width of the image in pixel. Default is 800.
|
|
677
|
+
* @param height - The height of the image in pixel. Default is 600.
|
|
678
|
+
* @param color - RGB color as `[r, g, b]` with values 0..255. Default is red `[255, 0, 0]`.
|
|
679
|
+
*/
|
|
680
|
+
createMediaPNGSolid(width?: number, height?: number, color?: [number, number, number]): Promise<Media$1>;
|
|
671
681
|
/**
|
|
672
682
|
* Creates a new media resource containing a text file.
|
|
673
683
|
*
|
|
@@ -6448,5 +6458,5 @@ declare const test: playwright_test.TestType<playwright_test.PlaywrightTestArgs
|
|
|
6448
6458
|
CheckVisibilityInHome: Task;
|
|
6449
6459
|
}, playwright_test.PlaywrightWorkerArgs & playwright_test.PlaywrightWorkerOptions & FixtureTypes>;
|
|
6450
6460
|
|
|
6451
|
-
export { Actor, AdminPageObjects, BUNDLED_RESOURCES, COUNTRY_ADDRESS_DATA, FeatureService, IdProvider, LanguageHelper, RuleType, StorefrontPageObjects, TestDataService, assertScreenshot, baseNamespaces, clearDelayedCache, compareFlowTemplateWithFlow, createNewAdminPageContext, createRandomImage, encodeImage, extractIdFromUrl, formatPrice, 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, loginToAdministration, mockApiCalls, replaceElements, replaceElementsIndividually, setCurrentContext, setOrderStatus, setViewport, test, translate, updateAdminUser };
|
|
6461
|
+
export { Actor, AdminPageObjects, BUNDLED_RESOURCES, COUNTRY_ADDRESS_DATA, FeatureService, IdProvider, LanguageHelper, RuleType, StorefrontPageObjects, TestDataService, assertScreenshot, baseNamespaces, clearDelayedCache, compareFlowTemplateWithFlow, createNewAdminPageContext, createRandomImage, createSolidColorImage, encodeImage, extractIdFromUrl, formatPrice, 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, loginToAdministration, mockApiCalls, replaceElements, replaceElementsIndividually, setCurrentContext, setOrderStatus, setViewport, test, translate, updateAdminUser };
|
|
6452
6462
|
export type { AccountData, AclRole, Address, CalculatedTaxes, Category$1 as Category, CategoryCustomizableLinkData, CategoryData, CmsPage, Country$1 as Country, CreatedRecord, Currency$2 as Currency, CustomField, CustomFieldData, CustomFieldSet, Customer, CustomerAddress, CustomerGroup, DataServiceOptions, DeliveryTime, FixtureTypes, Flow, FlowConfig, FlowTemplate, Language$2 as Language, Manufacturer, Media$1 as Media, Options, Order, OrderDelivery, OrderLineItem, OrderStatus, PageObject, PaymentMethod$1 as PaymentMethod, Price, Product, ProductCrossSelling, ProductPrice, ProductReview, Promotion, PromotionDiscount, PropertyGroup, PropertyGroupOption, RegistrationData, ReplaceTarget, Rule, RuleAssignmentEntity, SalesChannel, SalesChannelAnalytics, SalesChannelDomain, SalesChannelRecord, Salutation, ShippingMethod$1 as ShippingMethod, SimpleLineItem, StateMachine, StateMachineState, SyncApiOperation, SystemConfig, Tag, TagData, Task, Tax$1 as Tax, TaxRules, TranslateFn, TranslationKey, User, VariantListingConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -497,6 +497,7 @@ declare const isSaaSInstance: (adminApiContext: AdminApiContext) => Promise<bool
|
|
|
497
497
|
declare const isThemeCompiled: (context: StoreApiContext, storefrontUrl: string) => Promise<boolean>;
|
|
498
498
|
|
|
499
499
|
declare function createRandomImage(width?: number, height?: number): Image;
|
|
500
|
+
declare function createSolidColorImage(width?: number, height?: number, color?: [number, number, number]): Image;
|
|
500
501
|
declare function encodeImage(image: Image): Buffer<ArrayBuffer>;
|
|
501
502
|
|
|
502
503
|
interface IdPair {
|
|
@@ -668,6 +669,15 @@ declare class TestDataService {
|
|
|
668
669
|
* @param height - The height of the image in pixel. Default is 600.
|
|
669
670
|
*/
|
|
670
671
|
createMediaPNG(width?: number, height?: number): Promise<Media$1>;
|
|
672
|
+
/**
|
|
673
|
+
* Creates a new media resource containing a solid color PNG image.
|
|
674
|
+
* Unlike `createMediaPNG`, the result is deterministic and suitable for visual regression tests.
|
|
675
|
+
*
|
|
676
|
+
* @param width - The width of the image in pixel. Default is 800.
|
|
677
|
+
* @param height - The height of the image in pixel. Default is 600.
|
|
678
|
+
* @param color - RGB color as `[r, g, b]` with values 0..255. Default is red `[255, 0, 0]`.
|
|
679
|
+
*/
|
|
680
|
+
createMediaPNGSolid(width?: number, height?: number, color?: [number, number, number]): Promise<Media$1>;
|
|
671
681
|
/**
|
|
672
682
|
* Creates a new media resource containing a text file.
|
|
673
683
|
*
|
|
@@ -6448,5 +6458,5 @@ declare const test: playwright_test.TestType<playwright_test.PlaywrightTestArgs
|
|
|
6448
6458
|
CheckVisibilityInHome: Task;
|
|
6449
6459
|
}, playwright_test.PlaywrightWorkerArgs & playwright_test.PlaywrightWorkerOptions & FixtureTypes>;
|
|
6450
6460
|
|
|
6451
|
-
export { Actor, AdminPageObjects, BUNDLED_RESOURCES, COUNTRY_ADDRESS_DATA, FeatureService, IdProvider, LanguageHelper, RuleType, StorefrontPageObjects, TestDataService, assertScreenshot, baseNamespaces, clearDelayedCache, compareFlowTemplateWithFlow, createNewAdminPageContext, createRandomImage, encodeImage, extractIdFromUrl, formatPrice, 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, loginToAdministration, mockApiCalls, replaceElements, replaceElementsIndividually, setCurrentContext, setOrderStatus, setViewport, test, translate, updateAdminUser };
|
|
6461
|
+
export { Actor, AdminPageObjects, BUNDLED_RESOURCES, COUNTRY_ADDRESS_DATA, FeatureService, IdProvider, LanguageHelper, RuleType, StorefrontPageObjects, TestDataService, assertScreenshot, baseNamespaces, clearDelayedCache, compareFlowTemplateWithFlow, createNewAdminPageContext, createRandomImage, createSolidColorImage, encodeImage, extractIdFromUrl, formatPrice, 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, loginToAdministration, mockApiCalls, replaceElements, replaceElementsIndividually, setCurrentContext, setOrderStatus, setViewport, test, translate, updateAdminUser };
|
|
6452
6462
|
export type { AccountData, AclRole, Address, CalculatedTaxes, Category$1 as Category, CategoryCustomizableLinkData, CategoryData, CmsPage, Country$1 as Country, CreatedRecord, Currency$2 as Currency, CustomField, CustomFieldData, CustomFieldSet, Customer, CustomerAddress, CustomerGroup, DataServiceOptions, DeliveryTime, FixtureTypes, Flow, FlowConfig, FlowTemplate, Language$2 as Language, Manufacturer, Media$1 as Media, Options, Order, OrderDelivery, OrderLineItem, OrderStatus, PageObject, PaymentMethod$1 as PaymentMethod, Price, Product, ProductCrossSelling, ProductPrice, ProductReview, Promotion, PromotionDiscount, PropertyGroup, PropertyGroupOption, RegistrationData, ReplaceTarget, Rule, RuleAssignmentEntity, SalesChannel, SalesChannelAnalytics, SalesChannelDomain, SalesChannelRecord, Salutation, ShippingMethod$1 as ShippingMethod, SimpleLineItem, StateMachine, StateMachineState, SyncApiOperation, SystemConfig, Tag, TagData, Task, Tax$1 as Tax, TaxRules, TranslateFn, TranslationKey, User, VariantListingConfig };
|
package/dist/index.mjs
CHANGED
|
@@ -3970,6 +3970,21 @@ function createRandomImage(width = 800, height = 600) {
|
|
|
3970
3970
|
data
|
|
3971
3971
|
});
|
|
3972
3972
|
}
|
|
3973
|
+
function createSolidColorImage(width = 800, height = 600, color = [255, 0, 0]) {
|
|
3974
|
+
const channels = 3;
|
|
3975
|
+
const data = new Uint8Array(width * height * channels);
|
|
3976
|
+
const [r, g, b] = color;
|
|
3977
|
+
for (let i = 0; i < data.length; i += channels) {
|
|
3978
|
+
data[i] = r;
|
|
3979
|
+
data[i + 1] = g;
|
|
3980
|
+
data[i + 2] = b;
|
|
3981
|
+
}
|
|
3982
|
+
return new Image(width, height, {
|
|
3983
|
+
colorModel: "RGB",
|
|
3984
|
+
bitDepth: 8,
|
|
3985
|
+
data
|
|
3986
|
+
});
|
|
3987
|
+
}
|
|
3973
3988
|
function encodeImage(image) {
|
|
3974
3989
|
return Buffer.from(encode(image));
|
|
3975
3990
|
}
|
|
@@ -4254,6 +4269,26 @@ class TestDataService {
|
|
|
4254
4269
|
this.addCreatedRecord("media", media.id);
|
|
4255
4270
|
return media;
|
|
4256
4271
|
}
|
|
4272
|
+
/**
|
|
4273
|
+
* Creates a new media resource containing a solid color PNG image.
|
|
4274
|
+
* Unlike `createMediaPNG`, the result is deterministic and suitable for visual regression tests.
|
|
4275
|
+
*
|
|
4276
|
+
* @param width - The width of the image in pixel. Default is 800.
|
|
4277
|
+
* @param height - The height of the image in pixel. Default is 600.
|
|
4278
|
+
* @param color - RGB color as `[r, g, b]` with values 0..255. Default is red `[255, 0, 0]`.
|
|
4279
|
+
*/
|
|
4280
|
+
async createMediaPNGSolid(width = 800, height = 600, color = [255, 0, 0]) {
|
|
4281
|
+
const image = createSolidColorImage(width, height, color);
|
|
4282
|
+
const media = await this.createMediaResource();
|
|
4283
|
+
const filename = `${this.namePrefix}Media-${media.id}${this.nameSuffix}`;
|
|
4284
|
+
const response = await this.AdminApiClient.post(`_action/media/${media.id}/upload?extension=png&fileName=${filename}`, {
|
|
4285
|
+
data: encodeImage(image),
|
|
4286
|
+
headers: { "content-type": "image/png" }
|
|
4287
|
+
});
|
|
4288
|
+
expect(response.ok()).toBeTruthy();
|
|
4289
|
+
this.addCreatedRecord("media", media.id);
|
|
4290
|
+
return media;
|
|
4291
|
+
}
|
|
4257
4292
|
/**
|
|
4258
4293
|
* Creates a new media resource containing a text file.
|
|
4259
4294
|
*
|
|
@@ -7267,7 +7302,7 @@ class AccountLogin {
|
|
|
7267
7302
|
this.shippingAddressCountryInput = this.registerShippingAddressFormArea.getByLabel(translate("storefront:login:register.country"));
|
|
7268
7303
|
this.shippingAddressPostalCodeInput = this.registerShippingAddressFormArea.getByLabel(translate("storefront:login:register.postalCode"));
|
|
7269
7304
|
this.shippingAddressStateInput = this.registerShippingAddressFormArea.getByLabel(translate("storefront:login:register.state"));
|
|
7270
|
-
this.registerButton = page.
|
|
7305
|
+
this.registerButton = page.locator('form.register-form button[type="submit"]');
|
|
7271
7306
|
this.logoutLink = page.getByRole("link", { name: translate("storefront:login:logout") });
|
|
7272
7307
|
this.successAlert = page.getByText(translate("storefront:login:successfulLogout"));
|
|
7273
7308
|
this.passwordUpdatedAlert = page.getByText(translate("storefront:login:passwordUpdated"));
|
|
@@ -12721,4 +12756,4 @@ const test = mergeTests(
|
|
|
12721
12756
|
test$3
|
|
12722
12757
|
);
|
|
12723
12758
|
|
|
12724
|
-
export { Actor, AdminPageObjects, BUNDLED_RESOURCES, COUNTRY_ADDRESS_DATA, FeatureService, IdProvider, LanguageHelper, RuleType, StorefrontPageObjects, TestDataService, assertScreenshot, baseNamespaces, clearDelayedCache, compareFlowTemplateWithFlow, createNewAdminPageContext, createRandomImage, encodeImage, extractIdFromUrl, formatPrice, 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, loginToAdministration, mockApiCalls, replaceElements, replaceElementsIndividually, setCurrentContext, setOrderStatus, setViewport, test, translate, updateAdminUser };
|
|
12759
|
+
export { Actor, AdminPageObjects, BUNDLED_RESOURCES, COUNTRY_ADDRESS_DATA, FeatureService, IdProvider, LanguageHelper, RuleType, StorefrontPageObjects, TestDataService, assertScreenshot, baseNamespaces, clearDelayedCache, compareFlowTemplateWithFlow, createNewAdminPageContext, createRandomImage, createSolidColorImage, encodeImage, extractIdFromUrl, formatPrice, 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, loginToAdministration, mockApiCalls, replaceElements, replaceElementsIndividually, setCurrentContext, setOrderStatus, setViewport, test, translate, updateAdminUser };
|