@shopware-ag/acceptance-test-suite 11.1.5 → 11.1.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 CHANGED
@@ -4,6 +4,7 @@ import { APIRequestContext, APIResponse, Page, BrowserContext, Locator } from '@
4
4
  export * from '@playwright/test';
5
5
  import * as playwright_core from 'playwright-core';
6
6
  import { components } from '@shopware/api-client/admin-api-types';
7
+ import { HelperFixtureTypes as HelperFixtureTypes$1 } from 'src/fixtures/HelperFixtures';
7
8
  import { Image } from 'image-js';
8
9
 
9
10
  type Task = (...args: any[]) => () => Promise<void>;
@@ -1564,6 +1565,7 @@ declare class CustomerGroupListing implements PageObject {
1564
1565
 
1565
1566
  declare class CustomerGroupCreate implements PageObject {
1566
1567
  readonly page: Page;
1568
+ readonly instanceMeta: HelperFixtureTypes$1['InstanceMeta'];
1567
1569
  readonly headline: Locator;
1568
1570
  readonly saveButton: Locator;
1569
1571
  readonly cancelButton: Locator;
@@ -1578,17 +1580,18 @@ declare class CustomerGroupCreate implements PageObject {
1578
1580
  readonly signupFormCompanySignupToggle: Locator;
1579
1581
  readonly customerGroupSaleschannelSelection: Locator;
1580
1582
  readonly customerGroupSaleschannelResultList: Locator;
1581
- constructor(page: Page);
1583
+ constructor(page: Page, instanceMeta: HelperFixtureTypes$1['InstanceMeta']);
1582
1584
  url(): string;
1583
1585
  }
1584
1586
 
1585
1587
  declare class CustomerGroupDetail extends CustomerGroupCreate implements PageObject {
1586
1588
  readonly page: Page;
1589
+ readonly instanceMeta: HelperFixtureTypes$1['InstanceMeta'];
1587
1590
  readonly headline: Locator;
1588
1591
  readonly selectedSalesChannel: Locator;
1589
1592
  readonly technicalUrl: Locator;
1590
1593
  readonly saleschannelUrl: Locator;
1591
- constructor(page: Page);
1594
+ constructor(page: Page, instanceMeta: HelperFixtureTypes$1['InstanceMeta']);
1592
1595
  url(customerGroupId?: string): string;
1593
1596
  }
1594
1597
 
@@ -1921,6 +1924,7 @@ declare class RuleCreate implements PageObject {
1921
1924
 
1922
1925
  declare class RuleDetail extends RuleCreate implements PageObject {
1923
1926
  readonly page: Page;
1927
+ readonly instanceMeta: HelperFixtureTypes['InstanceMeta'];
1924
1928
  readonly shippingMethodAvailabilityRulesCard: Locator;
1925
1929
  readonly shippingMethodAvailabilityRulesCardLink: Locator;
1926
1930
  readonly shippingMethodAvailabilityRulesCardTable: Locator;
@@ -1937,7 +1941,9 @@ declare class RuleDetail extends RuleCreate implements PageObject {
1937
1941
  readonly promotionCustomerRulesCardEmptyState: Locator;
1938
1942
  readonly promotionCartRulesCard: Locator;
1939
1943
  readonly promotionCartRulesCardEmptyState: Locator;
1940
- constructor(page: Page);
1944
+ readonly assignmentModalAddButton: Locator;
1945
+ readonly assignmentModalSearchField: Locator;
1946
+ constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
1941
1947
  getEntityCard(cardLocator: Locator): Promise<Record<string, Locator>>;
1942
1948
  url(ruleId?: string, tabName?: string): string;
1943
1949
  }
@@ -1951,12 +1957,13 @@ declare class RuleListing implements PageObject {
1951
1957
 
1952
1958
  declare class ManufacturerCreate implements PageObject {
1953
1959
  readonly page: Page;
1960
+ readonly instanceMeta: HelperFixtureTypes$1['InstanceMeta'];
1954
1961
  readonly saveButton: Locator;
1955
1962
  readonly cancelButton: Locator;
1956
1963
  readonly nameInput: Locator;
1957
1964
  readonly websiteInput: Locator;
1958
1965
  readonly descriptionInput: Locator;
1959
- constructor(page: Page);
1966
+ constructor(page: Page, instanceMeta: HelperFixtureTypes$1['InstanceMeta']);
1960
1967
  url(): string;
1961
1968
  }
1962
1969
 
@@ -1971,10 +1978,11 @@ declare class ManufacturerListing implements PageObject {
1971
1978
 
1972
1979
  declare class ManufacturerDetail extends ManufacturerCreate {
1973
1980
  readonly page: Page;
1981
+ readonly instanceMeta: HelperFixtureTypes$1['InstanceMeta'];
1974
1982
  readonly customFieldCard: Locator;
1975
1983
  readonly customFieldSetTabs: Locator;
1976
1984
  readonly customFieldSetTabCustomContent: Locator;
1977
- constructor(page: Page);
1985
+ constructor(page: Page, instanceMeta: HelperFixtureTypes$1['InstanceMeta']);
1978
1986
  getCustomFieldSetCardContentByName(customFieldSetName: string): Promise<Record<string, Locator>>;
1979
1987
  url(manufacturerUuid?: string): string;
1980
1988
  }
package/dist/index.d.ts CHANGED
@@ -4,6 +4,7 @@ import { APIRequestContext, APIResponse, Page, BrowserContext, Locator } from '@
4
4
  export * from '@playwright/test';
5
5
  import * as playwright_core from 'playwright-core';
6
6
  import { components } from '@shopware/api-client/admin-api-types';
7
+ import { HelperFixtureTypes as HelperFixtureTypes$1 } from 'src/fixtures/HelperFixtures';
7
8
  import { Image } from 'image-js';
8
9
 
9
10
  type Task = (...args: any[]) => () => Promise<void>;
@@ -1564,6 +1565,7 @@ declare class CustomerGroupListing implements PageObject {
1564
1565
 
1565
1566
  declare class CustomerGroupCreate implements PageObject {
1566
1567
  readonly page: Page;
1568
+ readonly instanceMeta: HelperFixtureTypes$1['InstanceMeta'];
1567
1569
  readonly headline: Locator;
1568
1570
  readonly saveButton: Locator;
1569
1571
  readonly cancelButton: Locator;
@@ -1578,17 +1580,18 @@ declare class CustomerGroupCreate implements PageObject {
1578
1580
  readonly signupFormCompanySignupToggle: Locator;
1579
1581
  readonly customerGroupSaleschannelSelection: Locator;
1580
1582
  readonly customerGroupSaleschannelResultList: Locator;
1581
- constructor(page: Page);
1583
+ constructor(page: Page, instanceMeta: HelperFixtureTypes$1['InstanceMeta']);
1582
1584
  url(): string;
1583
1585
  }
1584
1586
 
1585
1587
  declare class CustomerGroupDetail extends CustomerGroupCreate implements PageObject {
1586
1588
  readonly page: Page;
1589
+ readonly instanceMeta: HelperFixtureTypes$1['InstanceMeta'];
1587
1590
  readonly headline: Locator;
1588
1591
  readonly selectedSalesChannel: Locator;
1589
1592
  readonly technicalUrl: Locator;
1590
1593
  readonly saleschannelUrl: Locator;
1591
- constructor(page: Page);
1594
+ constructor(page: Page, instanceMeta: HelperFixtureTypes$1['InstanceMeta']);
1592
1595
  url(customerGroupId?: string): string;
1593
1596
  }
1594
1597
 
@@ -1921,6 +1924,7 @@ declare class RuleCreate implements PageObject {
1921
1924
 
1922
1925
  declare class RuleDetail extends RuleCreate implements PageObject {
1923
1926
  readonly page: Page;
1927
+ readonly instanceMeta: HelperFixtureTypes['InstanceMeta'];
1924
1928
  readonly shippingMethodAvailabilityRulesCard: Locator;
1925
1929
  readonly shippingMethodAvailabilityRulesCardLink: Locator;
1926
1930
  readonly shippingMethodAvailabilityRulesCardTable: Locator;
@@ -1937,7 +1941,9 @@ declare class RuleDetail extends RuleCreate implements PageObject {
1937
1941
  readonly promotionCustomerRulesCardEmptyState: Locator;
1938
1942
  readonly promotionCartRulesCard: Locator;
1939
1943
  readonly promotionCartRulesCardEmptyState: Locator;
1940
- constructor(page: Page);
1944
+ readonly assignmentModalAddButton: Locator;
1945
+ readonly assignmentModalSearchField: Locator;
1946
+ constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
1941
1947
  getEntityCard(cardLocator: Locator): Promise<Record<string, Locator>>;
1942
1948
  url(ruleId?: string, tabName?: string): string;
1943
1949
  }
@@ -1951,12 +1957,13 @@ declare class RuleListing implements PageObject {
1951
1957
 
1952
1958
  declare class ManufacturerCreate implements PageObject {
1953
1959
  readonly page: Page;
1960
+ readonly instanceMeta: HelperFixtureTypes$1['InstanceMeta'];
1954
1961
  readonly saveButton: Locator;
1955
1962
  readonly cancelButton: Locator;
1956
1963
  readonly nameInput: Locator;
1957
1964
  readonly websiteInput: Locator;
1958
1965
  readonly descriptionInput: Locator;
1959
- constructor(page: Page);
1966
+ constructor(page: Page, instanceMeta: HelperFixtureTypes$1['InstanceMeta']);
1960
1967
  url(): string;
1961
1968
  }
1962
1969
 
@@ -1971,10 +1978,11 @@ declare class ManufacturerListing implements PageObject {
1971
1978
 
1972
1979
  declare class ManufacturerDetail extends ManufacturerCreate {
1973
1980
  readonly page: Page;
1981
+ readonly instanceMeta: HelperFixtureTypes$1['InstanceMeta'];
1974
1982
  readonly customFieldCard: Locator;
1975
1983
  readonly customFieldSetTabs: Locator;
1976
1984
  readonly customFieldSetTabCustomContent: Locator;
1977
- constructor(page: Page);
1985
+ constructor(page: Page, instanceMeta: HelperFixtureTypes$1['InstanceMeta']);
1978
1986
  getCustomFieldSetCardContentByName(customFieldSetName: string): Promise<Record<string, Locator>>;
1979
1987
  url(manufacturerUuid?: string): string;
1980
1988
  }
package/dist/index.mjs CHANGED
@@ -4186,8 +4186,9 @@ var __publicField$r = (obj, key, value) => {
4186
4186
  return value;
4187
4187
  };
4188
4188
  class CustomerGroupCreate {
4189
- constructor(page) {
4189
+ constructor(page, instanceMeta) {
4190
4190
  this.page = page;
4191
+ this.instanceMeta = instanceMeta;
4191
4192
  __publicField$r(this, "headline");
4192
4193
  __publicField$r(this, "saveButton");
4193
4194
  __publicField$r(this, "cancelButton");
@@ -4211,7 +4212,11 @@ class CustomerGroupCreate {
4211
4212
  this.customerGroupNetTaxDisplay = page.locator("#sw-field--castedValue-1");
4212
4213
  this.customSignupFormToggle = page.getByLabel("Custom signup form");
4213
4214
  this.signupFormTitle = page.locator("#sw-field--customerGroup-registrationTitle");
4214
- this.signupFormIntroduction = page.locator(".sw-text-editor__content-editor");
4215
+ if (satisfies(instanceMeta.version, "<6.7")) {
4216
+ this.signupFormIntroduction = page.locator(".sw-text-editor__content-editor");
4217
+ } else {
4218
+ this.signupFormIntroduction = page.locator(".mt-text-editor__content-editor");
4219
+ }
4215
4220
  this.signupFormSeoDescription = page.locator("#sw-field--customerGroup-registrationSeoMetaDescription");
4216
4221
  this.signupFormCompanySignupToggle = page.getByLabel("Company signup form");
4217
4222
  this.customerGroupSaleschannelSelection = page.locator("input[class=sw-select-selection-list__input]");
@@ -4229,9 +4234,10 @@ var __publicField$q = (obj, key, value) => {
4229
4234
  return value;
4230
4235
  };
4231
4236
  class CustomerGroupDetail extends CustomerGroupCreate {
4232
- constructor(page) {
4233
- super(page);
4237
+ constructor(page, instanceMeta) {
4238
+ super(page, instanceMeta);
4234
4239
  this.page = page;
4240
+ this.instanceMeta = instanceMeta;
4235
4241
  __publicField$q(this, "headline");
4236
4242
  __publicField$q(this, "selectedSalesChannel");
4237
4243
  __publicField$q(this, "technicalUrl");
@@ -5008,9 +5014,10 @@ var __publicField$8 = (obj, key, value) => {
5008
5014
  return value;
5009
5015
  };
5010
5016
  class RuleDetail extends RuleCreate {
5011
- constructor(page) {
5017
+ constructor(page, instanceMeta) {
5012
5018
  super(page);
5013
5019
  this.page = page;
5020
+ this.instanceMeta = instanceMeta;
5014
5021
  __publicField$8(this, "shippingMethodAvailabilityRulesCard");
5015
5022
  __publicField$8(this, "shippingMethodAvailabilityRulesCardLink");
5016
5023
  __publicField$8(this, "shippingMethodAvailabilityRulesCardTable");
@@ -5027,11 +5034,13 @@ class RuleDetail extends RuleCreate {
5027
5034
  __publicField$8(this, "promotionCustomerRulesCardEmptyState");
5028
5035
  __publicField$8(this, "promotionCartRulesCard");
5029
5036
  __publicField$8(this, "promotionCartRulesCardEmptyState");
5037
+ __publicField$8(this, "assignmentModalAddButton");
5038
+ __publicField$8(this, "assignmentModalSearchField");
5030
5039
  this.shippingMethodAvailabilityRulesCard = page.locator(".sw-settings-rule-detail-assignments__card-shipping_method_availability_rule");
5031
5040
  this.shippingMethodAvailabilityRulesCardLink = this.shippingMethodAvailabilityRulesCard.getByRole("link");
5032
5041
  this.shippingMethodAvailabilityRulesCardTable = page.locator(".sw-settings-rule-detail-assignments__entity-listing-shipping_method_availability_rule");
5033
5042
  this.shippingMethodAvailabilityRulesCardEmptyState = this.shippingMethodAvailabilityRulesCard.getByRole("alert");
5034
- this.shippingMethodAvailabilityRulesCardSearchField = this.shippingMethodAvailabilityRulesCard.getByPlaceholder("Search...");
5043
+ this.shippingMethodAvailabilityRulesCardSearchField = this.shippingMethodAvailabilityRulesCard.getByRole("textbox");
5035
5044
  this.taxProviderRulesCard = page.locator(".sw-settings-rule-detail-assignments__card-tax_provider");
5036
5045
  this.taxProviderRulesCardEmptyState = this.taxProviderRulesCard.getByRole("alert");
5037
5046
  this.paymentMethodsAvailabilityRulesCard = page.locator(".sw-settings-rule-detail-assignments__card-payment_method");
@@ -5043,6 +5052,12 @@ class RuleDetail extends RuleCreate {
5043
5052
  this.promotionCustomerRulesCardEmptyState = this.promotionCustomerRulesCard.getByRole("alert");
5044
5053
  this.promotionCartRulesCard = page.locator(".sw-settings-rule-detail-assignments__card-promotion_cart_rule");
5045
5054
  this.promotionCartRulesCardEmptyState = this.promotionCartRulesCard.getByRole("alert");
5055
+ this.assignmentModalSearchField = page.locator(".sw-settings-rule-add-assignment-modal").getByRole("textbox");
5056
+ if (satisfies(instanceMeta.version, "<6.7")) {
5057
+ this.assignmentModalAddButton = page.locator(".sw-button--primary").getByText("Add");
5058
+ } else {
5059
+ this.assignmentModalAddButton = page.locator(".mt-button--primary").getByText("Add");
5060
+ }
5046
5061
  }
5047
5062
  async getEntityCard(cardLocator) {
5048
5063
  return {
@@ -5078,8 +5093,9 @@ var __publicField$6 = (obj, key, value) => {
5078
5093
  return value;
5079
5094
  };
5080
5095
  class ManufacturerCreate {
5081
- constructor(page) {
5096
+ constructor(page, instanceMeta) {
5082
5097
  this.page = page;
5098
+ this.instanceMeta = instanceMeta;
5083
5099
  __publicField$6(this, "saveButton");
5084
5100
  __publicField$6(this, "cancelButton");
5085
5101
  __publicField$6(this, "nameInput");
@@ -5089,7 +5105,11 @@ class ManufacturerCreate {
5089
5105
  this.cancelButton = page.getByRole("button", { name: "Cancel" });
5090
5106
  this.nameInput = page.getByLabel("Name");
5091
5107
  this.websiteInput = page.getByLabel("Website");
5092
- this.descriptionInput = page.locator(".sw-text-editor__content-editor");
5108
+ if (satisfies(instanceMeta.version, "<6.7")) {
5109
+ this.descriptionInput = page.locator(".sw-text-editor__content-editor");
5110
+ } else {
5111
+ this.descriptionInput = page.locator(".mt-text-editor__content-editor");
5112
+ }
5093
5113
  }
5094
5114
  url() {
5095
5115
  return `#/sw/manufacturer/create`;
@@ -5145,9 +5165,10 @@ var __publicField$4 = (obj, key, value) => {
5145
5165
  return value;
5146
5166
  };
5147
5167
  class ManufacturerDetail extends ManufacturerCreate {
5148
- constructor(page) {
5149
- super(page);
5168
+ constructor(page, instanceMeta) {
5169
+ super(page, instanceMeta);
5150
5170
  this.page = page;
5171
+ this.instanceMeta = instanceMeta;
5151
5172
  __publicField$4(this, "customFieldCard");
5152
5173
  __publicField$4(this, "customFieldSetTabs");
5153
5174
  __publicField$4(this, "customFieldSetTabCustomContent");
@@ -5468,11 +5489,11 @@ const test$5 = test$e.extend({
5468
5489
  AdminCustomerGroupListing: async ({ AdminPage }, use) => {
5469
5490
  await use(new CustomerGroupListing(AdminPage));
5470
5491
  },
5471
- AdminCustomerGroupCreate: async ({ AdminPage }, use) => {
5472
- await use(new CustomerGroupCreate(AdminPage));
5492
+ AdminCustomerGroupCreate: async ({ AdminPage, InstanceMeta }, use) => {
5493
+ await use(new CustomerGroupCreate(AdminPage, InstanceMeta));
5473
5494
  },
5474
- AdminCustomerGroupDetail: async ({ AdminPage }, use) => {
5475
- await use(new CustomerGroupDetail(AdminPage));
5495
+ AdminCustomerGroupDetail: async ({ AdminPage, InstanceMeta }, use) => {
5496
+ await use(new CustomerGroupDetail(AdminPage, InstanceMeta));
5476
5497
  },
5477
5498
  AdminFirstRunWizard: async ({ AdminPage, InstanceMeta }, use) => {
5478
5499
  await use(new FirstRunWizard(AdminPage, InstanceMeta));
@@ -5525,8 +5546,8 @@ const test$5 = test$e.extend({
5525
5546
  AdminRuleCreate: async ({ AdminPage }, use) => {
5526
5547
  await use(new RuleCreate(AdminPage));
5527
5548
  },
5528
- AdminRuleDetail: async ({ AdminPage }, use) => {
5529
- await use(new RuleDetail(AdminPage));
5549
+ AdminRuleDetail: async ({ AdminPage, InstanceMeta }, use) => {
5550
+ await use(new RuleDetail(AdminPage, InstanceMeta));
5530
5551
  },
5531
5552
  AdminRuleListing: async ({ AdminPage }, use) => {
5532
5553
  await use(new RuleListing(AdminPage));
@@ -5534,11 +5555,11 @@ const test$5 = test$e.extend({
5534
5555
  AdminManufacturerListing: async ({ AdminPage }, use) => {
5535
5556
  await use(new ManufacturerListing(AdminPage));
5536
5557
  },
5537
- AdminManufacturerCreate: async ({ AdminPage }, use) => {
5538
- await use(new ManufacturerCreate(AdminPage));
5558
+ AdminManufacturerCreate: async ({ AdminPage, InstanceMeta }, use) => {
5559
+ await use(new ManufacturerCreate(AdminPage, InstanceMeta));
5539
5560
  },
5540
- AdminManufacturerDetail: async ({ AdminPage }, use) => {
5541
- await use(new ManufacturerDetail(AdminPage));
5561
+ AdminManufacturerDetail: async ({ AdminPage, InstanceMeta }, use) => {
5562
+ await use(new ManufacturerDetail(AdminPage, InstanceMeta));
5542
5563
  },
5543
5564
  AdminProductListing: async ({ AdminPage }, use) => {
5544
5565
  await use(new ProductListing(AdminPage));
@@ -6365,9 +6386,9 @@ const AssignEntitiesToRule = test$e.extend({
6365
6386
  async function entityAssignment(entityName, card) {
6366
6387
  const entityCard = await AdminRuleDetail.getEntityCard(card);
6367
6388
  await entityCard.addAssignmentButton.click();
6368
- await AdminRuleDetail.page.locator(".sw-settings-rule-add-assignment-modal").getByPlaceholder("Search...").fill(entityName);
6389
+ await AdminRuleDetail.assignmentModalSearchField.fill(entityName);
6369
6390
  await AdminRuleDetail.page.locator(".sw-data-grid__row").filter({ hasText: entityName }).getByRole("checkbox").click();
6370
- await AdminRuleDetail.page.locator(".sw-button--primary").getByText("Add").click();
6391
+ await AdminRuleDetail.assignmentModalAddButton.click();
6371
6392
  }
6372
6393
  for (const assignableEntity of assignableEntities) {
6373
6394
  switch (assignableEntity.ruleType) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopware-ag/acceptance-test-suite",
3
- "version": "11.1.5",
3
+ "version": "11.1.6",
4
4
  "description": "Shopware Acceptance Test Suite",
5
5
  "author": "shopware AG",
6
6
  "license": "MIT",