@shopware-ag/acceptance-test-suite 11.32.0 → 11.33.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 CHANGED
@@ -151,7 +151,7 @@ type PropertyGroup = components['schemas']['PropertyGroup'] & {
151
151
  type Category$1 = components['schemas']['Category'] & {
152
152
  id: string;
153
153
  };
154
- type Media = components['schemas']['Media'] & {
154
+ type Media$1 = components['schemas']['Media'] & {
155
155
  id: string;
156
156
  };
157
157
  type Tag = components['schemas']['Tag'] & {
@@ -583,18 +583,18 @@ declare class TestDataService {
583
583
  * @param width - The width of the image in pixel. Default is 800.
584
584
  * @param height - The height of the image in pixel. Default is 600.
585
585
  */
586
- createMediaPNG(width?: number, height?: number): Promise<Media>;
586
+ createMediaPNG(width?: number, height?: number): Promise<Media$1>;
587
587
  /**
588
588
  * Creates a new media resource containing a text file.
589
589
  *
590
590
  * @param content - The content of the text file.
591
591
  */
592
- createMediaTXT(content?: string): Promise<Media>;
592
+ createMediaTXT(content?: string): Promise<Media$1>;
593
593
  /**
594
594
  * Creates a new empty media resource.
595
595
  * This method is mostly used to combine it with a certain file upload.
596
596
  */
597
- createMediaResource(): Promise<Media>;
597
+ createMediaResource(): Promise<Media$1>;
598
598
  /**
599
599
  * Creates a new property group with color type options.
600
600
  *
@@ -4935,6 +4935,44 @@ declare class PromotionDetail extends PromotionCreate {
4935
4935
  url(promotionId?: string, tab?: 'general' | 'conditions' | 'discounts'): string;
4936
4936
  }
4937
4937
 
4938
+ declare class Media implements PageObject {
4939
+ readonly page: Page;
4940
+ readonly uploadFileButton: Locator;
4941
+ readonly addNewFolderButton: Locator;
4942
+ readonly mediaGridItems: Locator;
4943
+ readonly mediaItemCheckbox: Locator;
4944
+ readonly mediaItemPreview: Locator;
4945
+ readonly mediaItemName: Locator;
4946
+ readonly mediaItemContextMenu: Locator;
4947
+ readonly searchInput: Locator;
4948
+ constructor(page: Page);
4949
+ url(): string;
4950
+ /**
4951
+ * Gets the title/name of a media item by its image alt text
4952
+ * @param alt The alt text of the image
4953
+ * @returns Promise that resolves to the title text
4954
+ */
4955
+ getMediaNameByAlt(alt: string): Promise<string>;
4956
+ /**
4957
+ * Gets a specific media item container by its name/title
4958
+ * @param mediaName The name/title of the media item
4959
+ * @returns Locator for the specific media item container
4960
+ */
4961
+ getMediaItemByName(mediaName: string): Locator;
4962
+ /**
4963
+ * Gets the context menu button for a specific media item by media name
4964
+ * @param mediaName The name/title of the media item
4965
+ * @returns Locator for the context menu button
4966
+ */
4967
+ getContextMenuButtonByName(mediaName: string): Locator;
4968
+ /**
4969
+ * Gets a specific context menu item by its text
4970
+ * @param itemText The text of the context menu item (e.g., 'Rename', 'Delete', etc.)
4971
+ * @returns Locator for the specific context menu item
4972
+ */
4973
+ getContextMenuItem(itemText: string): Locator;
4974
+ }
4975
+
4938
4976
  declare class YourProfile implements PageObject {
4939
4977
  readonly contentView: Locator;
4940
4978
  readonly page: Page;
@@ -5064,6 +5102,7 @@ interface AdministrationPageTypes {
5064
5102
  AdminPromotionCreate: PromotionCreate;
5065
5103
  AdminPromotionDetail: PromotionDetail;
5066
5104
  AdminShopwareServices: ShopwareServices;
5105
+ AdminMedia: Media;
5067
5106
  AdminYourProfile: YourProfile;
5068
5107
  AdminThemesListing: ThemesListing;
5069
5108
  AdminThemesDetail: ThemesDetail;
@@ -5113,6 +5152,7 @@ declare const AdminPageObjects: {
5113
5152
  PromotionsListing: typeof PromotionsListing;
5114
5153
  PromotionCreate: typeof PromotionCreate;
5115
5154
  PromotionDetail: typeof PromotionDetail;
5155
+ Media: typeof Media;
5116
5156
  YourProfile: typeof YourProfile;
5117
5157
  ThemesListing: typeof ThemesListing;
5118
5158
  ThemesDetail: typeof ThemesDetail;
@@ -5828,4 +5868,4 @@ declare const test: playwright_test.TestType<playwright_test.PlaywrightTestArgs
5828
5868
  }, playwright_test.PlaywrightWorkerArgs & playwright_test.PlaywrightWorkerOptions & FixtureTypes>;
5829
5869
 
5830
5870
  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 };
5831
- 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, 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 };
5871
+ 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
@@ -151,7 +151,7 @@ type PropertyGroup = components['schemas']['PropertyGroup'] & {
151
151
  type Category$1 = components['schemas']['Category'] & {
152
152
  id: string;
153
153
  };
154
- type Media = components['schemas']['Media'] & {
154
+ type Media$1 = components['schemas']['Media'] & {
155
155
  id: string;
156
156
  };
157
157
  type Tag = components['schemas']['Tag'] & {
@@ -583,18 +583,18 @@ declare class TestDataService {
583
583
  * @param width - The width of the image in pixel. Default is 800.
584
584
  * @param height - The height of the image in pixel. Default is 600.
585
585
  */
586
- createMediaPNG(width?: number, height?: number): Promise<Media>;
586
+ createMediaPNG(width?: number, height?: number): Promise<Media$1>;
587
587
  /**
588
588
  * Creates a new media resource containing a text file.
589
589
  *
590
590
  * @param content - The content of the text file.
591
591
  */
592
- createMediaTXT(content?: string): Promise<Media>;
592
+ createMediaTXT(content?: string): Promise<Media$1>;
593
593
  /**
594
594
  * Creates a new empty media resource.
595
595
  * This method is mostly used to combine it with a certain file upload.
596
596
  */
597
- createMediaResource(): Promise<Media>;
597
+ createMediaResource(): Promise<Media$1>;
598
598
  /**
599
599
  * Creates a new property group with color type options.
600
600
  *
@@ -4935,6 +4935,44 @@ declare class PromotionDetail extends PromotionCreate {
4935
4935
  url(promotionId?: string, tab?: 'general' | 'conditions' | 'discounts'): string;
4936
4936
  }
4937
4937
 
4938
+ declare class Media implements PageObject {
4939
+ readonly page: Page;
4940
+ readonly uploadFileButton: Locator;
4941
+ readonly addNewFolderButton: Locator;
4942
+ readonly mediaGridItems: Locator;
4943
+ readonly mediaItemCheckbox: Locator;
4944
+ readonly mediaItemPreview: Locator;
4945
+ readonly mediaItemName: Locator;
4946
+ readonly mediaItemContextMenu: Locator;
4947
+ readonly searchInput: Locator;
4948
+ constructor(page: Page);
4949
+ url(): string;
4950
+ /**
4951
+ * Gets the title/name of a media item by its image alt text
4952
+ * @param alt The alt text of the image
4953
+ * @returns Promise that resolves to the title text
4954
+ */
4955
+ getMediaNameByAlt(alt: string): Promise<string>;
4956
+ /**
4957
+ * Gets a specific media item container by its name/title
4958
+ * @param mediaName The name/title of the media item
4959
+ * @returns Locator for the specific media item container
4960
+ */
4961
+ getMediaItemByName(mediaName: string): Locator;
4962
+ /**
4963
+ * Gets the context menu button for a specific media item by media name
4964
+ * @param mediaName The name/title of the media item
4965
+ * @returns Locator for the context menu button
4966
+ */
4967
+ getContextMenuButtonByName(mediaName: string): Locator;
4968
+ /**
4969
+ * Gets a specific context menu item by its text
4970
+ * @param itemText The text of the context menu item (e.g., 'Rename', 'Delete', etc.)
4971
+ * @returns Locator for the specific context menu item
4972
+ */
4973
+ getContextMenuItem(itemText: string): Locator;
4974
+ }
4975
+
4938
4976
  declare class YourProfile implements PageObject {
4939
4977
  readonly contentView: Locator;
4940
4978
  readonly page: Page;
@@ -5064,6 +5102,7 @@ interface AdministrationPageTypes {
5064
5102
  AdminPromotionCreate: PromotionCreate;
5065
5103
  AdminPromotionDetail: PromotionDetail;
5066
5104
  AdminShopwareServices: ShopwareServices;
5105
+ AdminMedia: Media;
5067
5106
  AdminYourProfile: YourProfile;
5068
5107
  AdminThemesListing: ThemesListing;
5069
5108
  AdminThemesDetail: ThemesDetail;
@@ -5113,6 +5152,7 @@ declare const AdminPageObjects: {
5113
5152
  PromotionsListing: typeof PromotionsListing;
5114
5153
  PromotionCreate: typeof PromotionCreate;
5115
5154
  PromotionDetail: typeof PromotionDetail;
5155
+ Media: typeof Media;
5116
5156
  YourProfile: typeof YourProfile;
5117
5157
  ThemesListing: typeof ThemesListing;
5118
5158
  ThemesDetail: typeof ThemesDetail;
@@ -5828,4 +5868,4 @@ declare const test: playwright_test.TestType<playwright_test.PlaywrightTestArgs
5828
5868
  }, playwright_test.PlaywrightWorkerArgs & playwright_test.PlaywrightWorkerOptions & FixtureTypes>;
5829
5869
 
5830
5870
  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 };
5831
- 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, 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 };
5871
+ 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
@@ -9376,6 +9376,68 @@ class PromotionDetail extends PromotionCreate {
9376
9376
  }
9377
9377
  }
9378
9378
 
9379
+ class Media {
9380
+ page;
9381
+ uploadFileButton;
9382
+ addNewFolderButton;
9383
+ mediaGridItems;
9384
+ mediaItemCheckbox;
9385
+ mediaItemPreview;
9386
+ mediaItemName;
9387
+ mediaItemContextMenu;
9388
+ searchInput;
9389
+ constructor(page) {
9390
+ this.page = page;
9391
+ this.uploadFileButton = page.getByRole("button", { name: "Upload file" });
9392
+ this.addNewFolderButton = page.getByRole("button", { name: "Add new folder" });
9393
+ this.searchInput = page.getByPlaceholder("Search current folder...");
9394
+ this.mediaGridItems = page.locator(".sw-media-media-item");
9395
+ this.mediaItemCheckbox = page.locator('.sw-media-base-item__selected-indicator input[type="checkbox"]');
9396
+ this.mediaItemPreview = page.locator(".sw-media-preview-v2__item");
9397
+ this.mediaItemName = page.locator(".sw-media-base-item__name");
9398
+ this.mediaItemContextMenu = page.locator(".sw-context-button");
9399
+ }
9400
+ url() {
9401
+ return `#/sw/media/index`;
9402
+ }
9403
+ /**
9404
+ * Gets the title/name of a media item by its image alt text
9405
+ * @param alt The alt text of the image
9406
+ * @returns Promise that resolves to the title text
9407
+ */
9408
+ async getMediaNameByAlt(alt) {
9409
+ const mediaItem = this.mediaGridItems.filter({ has: this.page.locator(`img[alt="${alt}"]`) });
9410
+ const titleElement = mediaItem.locator(".sw-media-base-item__name");
9411
+ return await titleElement.textContent() || "";
9412
+ }
9413
+ /**
9414
+ * Gets a specific media item container by its name/title
9415
+ * @param mediaName The name/title of the media item
9416
+ * @returns Locator for the specific media item container
9417
+ */
9418
+ getMediaItemByName(mediaName) {
9419
+ return this.mediaGridItems.filter({ hasText: mediaName });
9420
+ }
9421
+ /**
9422
+ * Gets the context menu button for a specific media item by media name
9423
+ * @param mediaName The name/title of the media item
9424
+ * @returns Locator for the context menu button
9425
+ */
9426
+ getContextMenuButtonByName(mediaName) {
9427
+ return this.getMediaItemByName(mediaName).locator(".sw-context-button");
9428
+ }
9429
+ /**
9430
+ * Gets a specific context menu item by its text
9431
+ * @param itemText The text of the context menu item (e.g., 'Rename', 'Delete', etc.)
9432
+ * @returns Locator for the specific context menu item
9433
+ */
9434
+ getContextMenuItem(itemText) {
9435
+ return this.page.locator(".sw-context-menu-item", {
9436
+ hasText: itemText
9437
+ });
9438
+ }
9439
+ }
9440
+
9379
9441
  class YourProfile {
9380
9442
  contentView;
9381
9443
  page;
@@ -9585,6 +9647,7 @@ const AdminPageObjects = {
9585
9647
  PromotionsListing,
9586
9648
  PromotionCreate,
9587
9649
  PromotionDetail,
9650
+ Media,
9588
9651
  YourProfile,
9589
9652
  ThemesListing,
9590
9653
  ThemesDetail,
@@ -9711,6 +9774,9 @@ const test$6 = test$e.extend({
9711
9774
  AdminPromotionDetail: async ({ AdminPage, InstanceMeta }, use) => {
9712
9775
  await use(new PromotionDetail(AdminPage, InstanceMeta));
9713
9776
  },
9777
+ AdminMedia: async ({ AdminPage }, use) => {
9778
+ await use(new Media(AdminPage));
9779
+ },
9714
9780
  AdminShopwareServices: async ({ AdminPage }, use) => {
9715
9781
  await use(new ShopwareServices(AdminPage));
9716
9782
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopware-ag/acceptance-test-suite",
3
- "version": "11.32.0",
3
+ "version": "11.33.0",
4
4
  "description": "Shopware Acceptance Test Suite",
5
5
  "author": "shopware AG",
6
6
  "license": "MIT",