@shopware-ag/acceptance-test-suite 12.20.0 → 12.20.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 CHANGED
@@ -6,7 +6,6 @@ import * as axe_core from 'axe-core';
6
6
  import * as playwright_test from '@playwright/test';
7
7
  import { Page as Page$1, Locator as Locator$1, Browser } from '@playwright/test';
8
8
  export { expect, mergeTests } from '@playwright/test';
9
- import { Image } from 'image-js';
10
9
 
11
10
  interface RequestOptions$1<PAYLOAD> {
12
11
  [key: string]: unknown;
@@ -5437,6 +5436,7 @@ declare class FlowBuilderCreate implements PageObject {
5437
5436
  readonly saveButton: Locator;
5438
5437
  readonly header: Locator;
5439
5438
  readonly smartBarHeader: Locator;
5439
+ readonly skeletonLoader: Locator;
5440
5440
  readonly generalTab: Locator;
5441
5441
  readonly flowTab: Locator;
5442
5442
  readonly nameField: Locator;
@@ -6637,6 +6637,13 @@ declare const isSaaSInstance: (adminApiContext: AdminApiContext) => Promise<bool
6637
6637
  declare const isPaaSInstance: () => boolean;
6638
6638
  declare const isThemeCompiled: (context: StoreApiContext, storefrontUrl: string) => Promise<boolean>;
6639
6639
 
6640
+ interface Image {
6641
+ width: number;
6642
+ height: number;
6643
+ data: Uint8Array;
6644
+ channels: 3;
6645
+ depth: 8;
6646
+ }
6640
6647
  declare function createRandomImage(width?: number, height?: number): Image;
6641
6648
  declare function createSolidColorImage(width?: number, height?: number, color?: [number, number, number]): Image;
6642
6649
  declare function encodeImage(image: Image): Buffer<ArrayBuffer>;
@@ -6813,6 +6820,8 @@ declare const test: playwright_test.TestType<playwright_test.PlaywrightTestArgs
6813
6820
  CheckVisibilityOfServicesBanner: Task;
6814
6821
  } & {
6815
6822
  DeactivateShopwareServices: Task;
6823
+ } & {
6824
+ SelectExtensionCategory: Task;
6816
6825
  } & {
6817
6826
  Login: Task;
6818
6827
  } & {
@@ -6882,4 +6891,4 @@ declare const test: playwright_test.TestType<playwright_test.PlaywrightTestArgs
6882
6891
  }>;
6883
6892
 
6884
6893
  export { Actor, AdminPageObjects, BUNDLED_RESOURCES, COUNTRY_ADDRESS_DATA, FeatureService, IdProvider, LanguageHelper, RuleType, StorefrontPageObjects, TestDataService, assertScreenshot, baseNamespaces, clearDelayedCache, compareFlowTemplateWithFlow, createNewAdminPageContext, createRandomImage, createSolidColorImage, encodeImage, expandAdminMenu, 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, hideSymfonyToolbarOnReload, isPaaSInstance, isSaaSInstance, isThemeCompiled, loginToAdministration, mockApiCalls, replaceElements, replaceElementsIndividually, setCurrentContext, setOrderStatus, setViewport, test, translate, updateAdminUser, uploadRandomPngMedia };
6885
- 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, UploadMediaTarget, User, VariantListingConfig };
6894
+ 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, Image, 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, UploadMediaTarget, User, VariantListingConfig };
package/dist/index.d.ts CHANGED
@@ -6,7 +6,6 @@ import * as axe_core from 'axe-core';
6
6
  import * as playwright_test from '@playwright/test';
7
7
  import { Page as Page$1, Locator as Locator$1, Browser } from '@playwright/test';
8
8
  export { expect, mergeTests } from '@playwright/test';
9
- import { Image } from 'image-js';
10
9
 
11
10
  interface RequestOptions$1<PAYLOAD> {
12
11
  [key: string]: unknown;
@@ -5437,6 +5436,7 @@ declare class FlowBuilderCreate implements PageObject {
5437
5436
  readonly saveButton: Locator;
5438
5437
  readonly header: Locator;
5439
5438
  readonly smartBarHeader: Locator;
5439
+ readonly skeletonLoader: Locator;
5440
5440
  readonly generalTab: Locator;
5441
5441
  readonly flowTab: Locator;
5442
5442
  readonly nameField: Locator;
@@ -6637,6 +6637,13 @@ declare const isSaaSInstance: (adminApiContext: AdminApiContext) => Promise<bool
6637
6637
  declare const isPaaSInstance: () => boolean;
6638
6638
  declare const isThemeCompiled: (context: StoreApiContext, storefrontUrl: string) => Promise<boolean>;
6639
6639
 
6640
+ interface Image {
6641
+ width: number;
6642
+ height: number;
6643
+ data: Uint8Array;
6644
+ channels: 3;
6645
+ depth: 8;
6646
+ }
6640
6647
  declare function createRandomImage(width?: number, height?: number): Image;
6641
6648
  declare function createSolidColorImage(width?: number, height?: number, color?: [number, number, number]): Image;
6642
6649
  declare function encodeImage(image: Image): Buffer<ArrayBuffer>;
@@ -6813,6 +6820,8 @@ declare const test: playwright_test.TestType<playwright_test.PlaywrightTestArgs
6813
6820
  CheckVisibilityOfServicesBanner: Task;
6814
6821
  } & {
6815
6822
  DeactivateShopwareServices: Task;
6823
+ } & {
6824
+ SelectExtensionCategory: Task;
6816
6825
  } & {
6817
6826
  Login: Task;
6818
6827
  } & {
@@ -6882,4 +6891,4 @@ declare const test: playwright_test.TestType<playwright_test.PlaywrightTestArgs
6882
6891
  }>;
6883
6892
 
6884
6893
  export { Actor, AdminPageObjects, BUNDLED_RESOURCES, COUNTRY_ADDRESS_DATA, FeatureService, IdProvider, LanguageHelper, RuleType, StorefrontPageObjects, TestDataService, assertScreenshot, baseNamespaces, clearDelayedCache, compareFlowTemplateWithFlow, createNewAdminPageContext, createRandomImage, createSolidColorImage, encodeImage, expandAdminMenu, 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, hideSymfonyToolbarOnReload, isPaaSInstance, isSaaSInstance, isThemeCompiled, loginToAdministration, mockApiCalls, replaceElements, replaceElementsIndividually, setCurrentContext, setOrderStatus, setViewport, test, translate, updateAdminUser, uploadRandomPngMedia };
6885
- 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, UploadMediaTarget, User, VariantListingConfig };
6894
+ 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, Image, 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, UploadMediaTarget, User, VariantListingConfig };
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@ import { test as test$e, expect, request, mergeTests } from '@playwright/test';
2
2
  export { expect, mergeTests } from '@playwright/test';
3
3
  import { AsyncLocalStorage } from 'async_hooks';
4
4
  import { createInstance } from 'i18next';
5
- import { Image, encode } from 'image-js';
5
+ import { encode } from 'fast-png';
6
6
  import crypto from 'crypto';
7
7
  import { stringify } from 'uuid';
8
8
  import { satisfies } from 'compare-versions';
@@ -4165,11 +4165,13 @@ function createRandomImage(width = 800, height = 600) {
4165
4165
  for (let i = 0; i < data.length; i++) {
4166
4166
  data[i] = Math.random() * 256 | 0;
4167
4167
  }
4168
- return new Image(width, height, {
4169
- colorModel: "RGB",
4170
- bitDepth: 8,
4171
- data
4172
- });
4168
+ return {
4169
+ width,
4170
+ height,
4171
+ data,
4172
+ channels: 3,
4173
+ depth: 8
4174
+ };
4173
4175
  }
4174
4176
  function createSolidColorImage(width = 800, height = 600, color = [255, 0, 0]) {
4175
4177
  const channels = 3;
@@ -4180,14 +4182,24 @@ function createSolidColorImage(width = 800, height = 600, color = [255, 0, 0]) {
4180
4182
  data[i + 1] = g;
4181
4183
  data[i + 2] = b;
4182
4184
  }
4183
- return new Image(width, height, {
4184
- colorModel: "RGB",
4185
- bitDepth: 8,
4186
- data
4187
- });
4185
+ return {
4186
+ width,
4187
+ height,
4188
+ data,
4189
+ channels: 3,
4190
+ depth: 8
4191
+ };
4188
4192
  }
4189
4193
  function encodeImage(image) {
4190
- return Buffer.from(encode(image));
4194
+ return Buffer.from(
4195
+ encode({
4196
+ width: image.width,
4197
+ height: image.height,
4198
+ data: image.data,
4199
+ channels: image.channels,
4200
+ depth: image.depth
4201
+ })
4202
+ );
4191
4203
  }
4192
4204
 
4193
4205
  class TestDataService {
@@ -8996,7 +9008,7 @@ class FirstRunWizard {
8996
9008
  this.dataImportCard = page.locator(".sw-first-run-wizard-data-import__card");
8997
9009
  this.defaultValuesHeader = page.locator(".sw-modal__title", { hasText: translate("administration:firstRunWizard:headers.defaultValues") });
8998
9010
  this.salesChannelSelectionMultiSelect = page.getByPlaceholder(translate("administration:firstRunWizard:placeholders.selectSalesChannels"));
8999
- this.salesChannelSelectionList = page.locator(".sw-popover__wrapper").getByRole("listitem");
9011
+ this.salesChannelSelectionList = page.locator(".sw-popover__wrapper, .sw-select-result-list-popover-wrapper").getByRole("listitem");
9000
9012
  this.mailerConfigurationHeader = page.locator(".sw-modal__title", { hasText: translate("administration:firstRunWizard:headers.mailerConfiguration") });
9001
9013
  this.smtpServerButton = page.getByText(translate("administration:firstRunWizard:buttons.configureOwnSmtpServer"), { exact: true });
9002
9014
  this.smtpServerTitle = page.getByText(translate("administration:firstRunWizard:text.smtpServer"), { exact: true });
@@ -9056,6 +9068,7 @@ class FlowBuilderCreate {
9056
9068
  saveButton;
9057
9069
  header;
9058
9070
  smartBarHeader;
9071
+ skeletonLoader;
9059
9072
  //tabs
9060
9073
  generalTab;
9061
9074
  flowTab;
@@ -9102,6 +9115,7 @@ class FlowBuilderCreate {
9102
9115
  this.saveButton = page.locator(".sw-flow-detail__save");
9103
9116
  this.header = page.locator("h2");
9104
9117
  this.smartBarHeader = page.locator(".smart-bar__header");
9118
+ this.skeletonLoader = page.locator(".sw-skeleton");
9105
9119
  this.triggerSelectField = page.locator(".sw-flow-detail-flow__trigger-card").getByRole("textbox");
9106
9120
  if (instanceMeta.features["V6_8_0_0"]) {
9107
9121
  this.generalTab = page.locator('.mt-tabs__item[data-item-name="sw.flow.create.general"]');
@@ -11625,7 +11639,7 @@ const MediaData = test$e.extend({
11625
11639
  console.error(err);
11626
11640
  }
11627
11641
  }
11628
- fs.writeFileSync(imageFilePath, encode(image));
11642
+ fs.writeFileSync(imageFilePath, encodeImage(image));
11629
11643
  const mediaResponse = await AdminApiContext.post("media?_response", {
11630
11644
  data: {
11631
11645
  private: false
@@ -12225,8 +12239,12 @@ const CreateFlow = test$e.extend({
12225
12239
  CreateFlow: async ({ AdminFlowBuilderCreate, AdminFlowBuilderDetail, AdminFlowBuilderListing, ShopAdmin, TestDataService }, use) => {
12226
12240
  const task = (flowConfig) => {
12227
12241
  return async function createFlow() {
12242
+ await ShopAdmin.expects(AdminFlowBuilderListing.createFlowButton).toBeEnabled();
12228
12243
  const flowActionsLoaded = AdminFlowBuilderCreate.page.waitForResponse((response) => response.url().includes("/_info/flow-actions.json") && response.ok());
12244
+ const navigatedToCreate = AdminFlowBuilderCreate.page.waitForURL((url) => url.hash.includes("/sw/flow/create/"));
12229
12245
  await AdminFlowBuilderListing.createFlowButton.click();
12246
+ await navigatedToCreate;
12247
+ await ShopAdmin.expects(AdminFlowBuilderCreate.skeletonLoader).toHaveCount(0);
12230
12248
  await ShopAdmin.expects(AdminFlowBuilderCreate.smartBarHeader).toHaveText(translate("administration:flowBuilder:create.newFlow"));
12231
12249
  await AdminFlowBuilderCreate.nameField.fill(`${flowConfig.name}`);
12232
12250
  await AdminFlowBuilderCreate.descriptionField.fill(`${flowConfig.description}`);
@@ -12364,6 +12382,19 @@ const CheckAccessToShopwareServices = test$e.extend({
12364
12382
  }
12365
12383
  });
12366
12384
 
12385
+ const SelectExtensionCategory = test$e.extend({
12386
+ SelectExtensionCategory: async ({ AdminFirstRunWizard }, use) => {
12387
+ const task = (category) => {
12388
+ return async function SelectExtensionCategory2() {
12389
+ const recommendationsLoaded = AdminFirstRunWizard.page.waitForResponse((response) => response.url().includes("/_action/store/recommendations") && response.ok());
12390
+ await category.click();
12391
+ await recommendationsLoaded;
12392
+ };
12393
+ };
12394
+ await use(task);
12395
+ }
12396
+ });
12397
+
12367
12398
  const test$4 = mergeTests(
12368
12399
  SaveProduct,
12369
12400
  ExpectNotification,
@@ -12375,7 +12406,8 @@ const test$4 = mergeTests(
12375
12406
  LoginViaReviewsTab,
12376
12407
  CheckAccessToShopwareServices,
12377
12408
  CheckVisibilityOfServicesBanner,
12378
- DeactivateShopwareServices
12409
+ DeactivateShopwareServices,
12410
+ SelectExtensionCategory
12379
12411
  );
12380
12412
 
12381
12413
  const Login = test$e.extend({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopware-ag/acceptance-test-suite",
3
- "version": "12.20.0",
3
+ "version": "12.20.1",
4
4
  "description": "Shopware Acceptance Test Suite",
5
5
  "keywords": [
6
6
  "fixtures",
@@ -43,8 +43,8 @@
43
43
  "@shopware/api-client": "1.5.1",
44
44
  "axe-html-reporter": "2.2.11",
45
45
  "compare-versions": "6.1.1",
46
+ "fast-png": "8.0.0",
46
47
  "i18next": "26.3.1",
47
- "image-js": "1.3.0",
48
48
  "uuid": "14.0.0"
49
49
  },
50
50
  "devDependencies": {