@shopware-ag/acceptance-test-suite 11.0.0 → 11.1.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
@@ -1044,12 +1044,14 @@ interface TestDataFixtureTypes {
1044
1044
  TestDataService: TestDataService;
1045
1045
  }
1046
1046
 
1047
+ type FeaturesType = Record<string, boolean>;
1047
1048
  interface HelperFixtureTypes {
1048
1049
  IdProvider: IdProvider;
1049
1050
  SaaSInstanceSetup: () => Promise<void>;
1050
1051
  InstanceMeta: {
1051
1052
  version: string;
1052
1053
  isSaaS: boolean;
1054
+ features: FeaturesType;
1053
1055
  };
1054
1056
  }
1055
1057
 
@@ -1223,6 +1225,7 @@ declare class CheckoutRegister implements PageObject {
1223
1225
 
1224
1226
  declare class Account implements PageObject {
1225
1227
  readonly page: Page;
1228
+ readonly instanceMeta: HelperFixtureTypes['InstanceMeta'];
1226
1229
  readonly headline: Locator;
1227
1230
  readonly personalDataCardTitle: Locator;
1228
1231
  readonly paymentMethodCardTitle: Locator;
@@ -1231,7 +1234,7 @@ declare class Account implements PageObject {
1231
1234
  readonly newsletterCheckbox: Locator;
1232
1235
  readonly newsletterRegistrationSuccessMessage: Locator;
1233
1236
  readonly customerGroupRequestMessage: Locator;
1234
- constructor(page: Page);
1237
+ constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
1235
1238
  getCustomerGroupAlert(customerGroup: string): Promise<Locator>;
1236
1239
  url(): string;
1237
1240
  }
@@ -1529,6 +1532,7 @@ declare class CustomerListing implements PageObject {
1529
1532
 
1530
1533
  declare class CustomerDetail implements PageObject {
1531
1534
  readonly page: Page;
1535
+ readonly instanceMeta: HelperFixtureTypes['InstanceMeta'];
1532
1536
  readonly editButton: Locator;
1533
1537
  readonly generalTab: Locator;
1534
1538
  readonly accountCard: Locator;
@@ -1540,7 +1544,7 @@ declare class CustomerDetail implements PageObject {
1540
1544
  readonly customerGroupDeclineButton: Locator;
1541
1545
  readonly tagList: Locator;
1542
1546
  readonly tagItems: Locator;
1543
- constructor(page: Page);
1547
+ constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
1544
1548
  getCustomFieldSetCardContentByName(customFieldSetName: string): Promise<Record<string, Locator>>;
1545
1549
  getCustomerGroupAlert(customerGroup: string): Promise<Locator>;
1546
1550
  getCustomerGroup(): Promise<Locator>;
@@ -1590,6 +1594,7 @@ declare class CustomerGroupDetail extends CustomerGroupCreate implements PageObj
1590
1594
 
1591
1595
  declare class FirstRunWizard implements PageObject {
1592
1596
  readonly page: Page;
1597
+ readonly instanceMeta: HelperFixtureTypes['InstanceMeta'];
1593
1598
  readonly nextButton: Locator;
1594
1599
  readonly configureLaterButton: Locator;
1595
1600
  readonly skipButton: Locator;
@@ -1628,7 +1633,7 @@ declare class FirstRunWizard implements PageObject {
1628
1633
  readonly toolsSelector: Locator;
1629
1634
  readonly recommendationHeader: Locator;
1630
1635
  readonly toolsRecommendedPlugin: Locator;
1631
- constructor(page: Page);
1636
+ constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
1632
1637
  url(): string;
1633
1638
  }
1634
1639
 
package/dist/index.d.ts CHANGED
@@ -1044,12 +1044,14 @@ interface TestDataFixtureTypes {
1044
1044
  TestDataService: TestDataService;
1045
1045
  }
1046
1046
 
1047
+ type FeaturesType = Record<string, boolean>;
1047
1048
  interface HelperFixtureTypes {
1048
1049
  IdProvider: IdProvider;
1049
1050
  SaaSInstanceSetup: () => Promise<void>;
1050
1051
  InstanceMeta: {
1051
1052
  version: string;
1052
1053
  isSaaS: boolean;
1054
+ features: FeaturesType;
1053
1055
  };
1054
1056
  }
1055
1057
 
@@ -1223,6 +1225,7 @@ declare class CheckoutRegister implements PageObject {
1223
1225
 
1224
1226
  declare class Account implements PageObject {
1225
1227
  readonly page: Page;
1228
+ readonly instanceMeta: HelperFixtureTypes['InstanceMeta'];
1226
1229
  readonly headline: Locator;
1227
1230
  readonly personalDataCardTitle: Locator;
1228
1231
  readonly paymentMethodCardTitle: Locator;
@@ -1231,7 +1234,7 @@ declare class Account implements PageObject {
1231
1234
  readonly newsletterCheckbox: Locator;
1232
1235
  readonly newsletterRegistrationSuccessMessage: Locator;
1233
1236
  readonly customerGroupRequestMessage: Locator;
1234
- constructor(page: Page);
1237
+ constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
1235
1238
  getCustomerGroupAlert(customerGroup: string): Promise<Locator>;
1236
1239
  url(): string;
1237
1240
  }
@@ -1529,6 +1532,7 @@ declare class CustomerListing implements PageObject {
1529
1532
 
1530
1533
  declare class CustomerDetail implements PageObject {
1531
1534
  readonly page: Page;
1535
+ readonly instanceMeta: HelperFixtureTypes['InstanceMeta'];
1532
1536
  readonly editButton: Locator;
1533
1537
  readonly generalTab: Locator;
1534
1538
  readonly accountCard: Locator;
@@ -1540,7 +1544,7 @@ declare class CustomerDetail implements PageObject {
1540
1544
  readonly customerGroupDeclineButton: Locator;
1541
1545
  readonly tagList: Locator;
1542
1546
  readonly tagItems: Locator;
1543
- constructor(page: Page);
1547
+ constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
1544
1548
  getCustomFieldSetCardContentByName(customFieldSetName: string): Promise<Record<string, Locator>>;
1545
1549
  getCustomerGroupAlert(customerGroup: string): Promise<Locator>;
1546
1550
  getCustomerGroup(): Promise<Locator>;
@@ -1590,6 +1594,7 @@ declare class CustomerGroupDetail extends CustomerGroupCreate implements PageObj
1590
1594
 
1591
1595
  declare class FirstRunWizard implements PageObject {
1592
1596
  readonly page: Page;
1597
+ readonly instanceMeta: HelperFixtureTypes['InstanceMeta'];
1593
1598
  readonly nextButton: Locator;
1594
1599
  readonly configureLaterButton: Locator;
1595
1600
  readonly skipButton: Locator;
@@ -1628,7 +1633,7 @@ declare class FirstRunWizard implements PageObject {
1628
1633
  readonly toolsSelector: Locator;
1629
1634
  readonly recommendationHeader: Locator;
1630
1635
  readonly toolsRecommendedPlugin: Locator;
1631
- constructor(page: Page);
1636
+ constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
1632
1637
  url(): string;
1633
1638
  }
1634
1639
 
package/dist/index.mjs CHANGED
@@ -3,6 +3,7 @@ export * from '@playwright/test';
3
3
  import { Image } from 'image-js';
4
4
  import crypto from 'crypto';
5
5
  import { stringify } from 'uuid';
6
+ import { satisfies } from 'compare-versions';
6
7
  import fs from 'fs';
7
8
  import { AxeBuilder } from '@axe-core/playwright';
8
9
  import { createHtmlReport } from 'axe-html-reporter';
@@ -2997,9 +2998,19 @@ const test$7 = test$e.extend({
2997
2998
  const response = await context.get("./_info/config");
2998
2999
  expect(response.ok(), "/_info/config request failed").toBeTruthy();
2999
3000
  const config = await response.json();
3001
+ const features = {};
3002
+ if (satisfies(config.version, ">=6.6.0.0")) {
3003
+ const featuresResponse = await context.get("./_action/feature-flag");
3004
+ expect(featuresResponse.ok(), "/_action/feature-flag request failed").toBeTruthy();
3005
+ const data = await featuresResponse.json();
3006
+ for (const k in data) {
3007
+ features[k] = data[k].active;
3008
+ }
3009
+ }
3000
3010
  use({
3001
3011
  version: config.version,
3002
- isSaaS: await isSaaSInstance(context)
3012
+ isSaaS: await isSaaSInstance(context),
3013
+ features
3003
3014
  });
3004
3015
  },
3005
3016
  { scope: "worker" }
@@ -3377,8 +3388,9 @@ var __publicField$G = (obj, key, value) => {
3377
3388
  return value;
3378
3389
  };
3379
3390
  class Account {
3380
- constructor(page) {
3391
+ constructor(page, instanceMeta) {
3381
3392
  this.page = page;
3393
+ this.instanceMeta = instanceMeta;
3382
3394
  __publicField$G(this, "headline");
3383
3395
  __publicField$G(this, "personalDataCardTitle");
3384
3396
  __publicField$G(this, "paymentMethodCardTitle");
@@ -3394,7 +3406,11 @@ class Account {
3394
3406
  this.shippingAddressCardTitle = page.getByRole("heading", { name: "Default shipping address" });
3395
3407
  this.newsletterCheckbox = page.getByLabel("Yes, I would like to");
3396
3408
  this.newsletterRegistrationSuccessMessage = page.getByText("You have successfully subscribed to the newsletter.");
3397
- this.customerGroupRequestMessage = page.locator(".alert-content");
3409
+ if (satisfies(instanceMeta.version, "<6.7")) {
3410
+ this.customerGroupRequestMessage = page.locator(".alert-content");
3411
+ } else {
3412
+ this.customerGroupRequestMessage = page.locator(".alert-content-container");
3413
+ }
3398
3414
  }
3399
3415
  async getCustomerGroupAlert(customerGroup) {
3400
3416
  return this.customerGroupRequestMessage.getByText(`Access to customer group "${customerGroup}" requested.`);
@@ -3806,8 +3822,8 @@ const test$6 = test$e.extend({
3806
3822
  StorefrontCheckoutRegister: async ({ StorefrontPage }, use) => {
3807
3823
  await use(new CheckoutRegister(StorefrontPage));
3808
3824
  },
3809
- StorefrontAccount: async ({ StorefrontPage }, use) => {
3810
- await use(new Account(StorefrontPage));
3825
+ StorefrontAccount: async ({ StorefrontPage, InstanceMeta }, use) => {
3826
+ await use(new Account(StorefrontPage, InstanceMeta));
3811
3827
  },
3812
3828
  StorefrontAccountLogin: async ({ StorefrontPage }, use) => {
3813
3829
  await use(new AccountLogin(StorefrontPage));
@@ -3924,7 +3940,7 @@ class ProductDetail {
3924
3940
  this.activeForAllSalesChannelsToggle = page.locator(".sw-field--product-active").getByRole("checkbox");
3925
3941
  this.tagsInput = page.locator(".sw-product-category-form__tag-field");
3926
3942
  this.saleChannelsInput = page.locator(".sw-product-detail__select-visibility");
3927
- this.releaseDateInput = page.locator(".sw-block-field", { hasText: "Release Date" }).getByPlaceholder("Enter release date...").last();
3943
+ this.releaseDateInput = page.locator(".sw-product-detail-base__labelling-card").locator(".form-control");
3928
3944
  this.uploadMediaButton = page.getByRole("button", { name: "Upload file" });
3929
3945
  this.coverImage = page.locator(".sw-product-media-form__cover-image");
3930
3946
  this.productImage = page.locator(".sw-media-preview-v2__item");
@@ -4066,8 +4082,9 @@ var __publicField$t = (obj, key, value) => {
4066
4082
  return value;
4067
4083
  };
4068
4084
  class CustomerDetail {
4069
- constructor(page) {
4085
+ constructor(page, instanceMeta) {
4070
4086
  this.page = page;
4087
+ this.instanceMeta = instanceMeta;
4071
4088
  __publicField$t(this, "editButton");
4072
4089
  __publicField$t(this, "generalTab");
4073
4090
  __publicField$t(this, "accountCard");
@@ -4085,7 +4102,11 @@ class CustomerDetail {
4085
4102
  this.customFieldCard = page.locator(".sw-card").getByText("Custom fields");
4086
4103
  this.customFieldSetTabs = this.customFieldCard.locator(".sw-tabs-item");
4087
4104
  this.customFieldSetTabCustomContent = this.customFieldCard.locator(".sw-tabs__custom-content");
4088
- this.customerGroupRequestMessage = page.locator(".sw-alert__message");
4105
+ if (satisfies(instanceMeta.version, "<6.7")) {
4106
+ this.customerGroupRequestMessage = page.locator(".sw-alert__message");
4107
+ } else {
4108
+ this.customerGroupRequestMessage = page.locator(".mt-banner__message");
4109
+ }
4089
4110
  this.customerGroupAcceptButton = page.getByRole("button", { name: "Accept" });
4090
4111
  this.customerGroupDeclineButton = page.getByRole("button", { name: "Decline" });
4091
4112
  this.tagList = page.locator(".sw-customer-card__tag-select").locator(".sw-select-selection-list");
@@ -4232,8 +4253,9 @@ var __publicField$p = (obj, key, value) => {
4232
4253
  return value;
4233
4254
  };
4234
4255
  class FirstRunWizard {
4235
- constructor(page) {
4256
+ constructor(page, instanceMeta) {
4236
4257
  this.page = page;
4258
+ this.instanceMeta = instanceMeta;
4237
4259
  __publicField$p(this, "nextButton");
4238
4260
  __publicField$p(this, "configureLaterButton");
4239
4261
  __publicField$p(this, "skipButton");
@@ -4286,7 +4308,11 @@ class FirstRunWizard {
4286
4308
  this.dataImportCard = page.locator(".sw-first-run-wizard-data-import__card");
4287
4309
  this.defaultValuesHeader = page.locator(".sw-modal__title", { hasText: "Setup default values" });
4288
4310
  this.salesChannelSelectionMultiSelect = page.getByPlaceholder("Select Sales Channels...");
4289
- this.salesChannelSelectionList = page.locator(".sw-popover__wrapper").getByRole("listitem");
4311
+ if (satisfies(instanceMeta.version, "<6.7")) {
4312
+ this.salesChannelSelectionList = page.locator(".sw-popover__wrapper").getByRole("listitem");
4313
+ } else {
4314
+ this.salesChannelSelectionList = page.locator(".sw-select-result-list-popover").getByRole("listitem");
4315
+ }
4290
4316
  this.mailerConfigurationHeader = page.locator(".sw-modal__title", { hasText: "Mailer configuration" });
4291
4317
  this.smtpServerButton = page.getByText("Configure own SMTP server", { exact: true });
4292
4318
  this.smtpServerTitle = page.getByText("SMTP server", { exact: true });
@@ -5244,14 +5270,14 @@ class ProductBulkEdit {
5244
5270
  this.changeManufacturerRow = page.locator(".sw-bulk-edit-change-field-manufacturerId");
5245
5271
  this.changeManufacturerCheckbox = this.changeManufacturerRow.getByRole("checkbox");
5246
5272
  this.manufacturerDropdown = this.changeManufacturerRow.locator(".sw-select__selection");
5247
- this.manufacturerDropdownInput = this.changeManufacturerRow.getByPlaceholder("Select manufacturer...");
5273
+ this.manufacturerDropdownInput = this.changeManufacturerRow.locator(".sw-entity-single-select__selection-input");
5248
5274
  this.manufacturerListResult = this.changeManufacturerRow.getByRole("list");
5249
5275
  this.changeActiveRow = page.locator(".sw-bulk-edit-change-field-active");
5250
5276
  this.changeActiveCheckbox = this.changeActiveRow.getByRole("checkbox").first();
5251
5277
  this.activeToggle = this.changeActiveRow.getByRole("checkbox").last();
5252
5278
  this.changePriceRow = page.locator(".sw-bulk-edit-change-field-price");
5253
5279
  this.changePriceCheckbox = this.changePriceRow.getByRole("checkbox");
5254
- this.grossPriceInput = this.changePriceRow.getByPlaceholder("Enter gross price...");
5280
+ this.grossPriceInput = this.changePriceRow.locator("#price-gross");
5255
5281
  this.changeReleaseDateRow = page.locator(".sw-bulk-edit-change-field-releaseDate");
5256
5282
  this.changeReleaseDateCheckbox = this.changeReleaseDateRow.getByRole("checkbox");
5257
5283
  this.releaseDateInput = this.changeReleaseDateRow.getByRole("textbox").last();
@@ -5259,17 +5285,17 @@ class ProductBulkEdit {
5259
5285
  this.changeStockCheckbox = this.changeStockRow.getByRole("checkbox");
5260
5286
  this.stockChangeMethodDropdown = this.changeStockRow.locator(".sw-single-select__selection-text");
5261
5287
  this.stockChangeMethodInput = this.changeStockRow.locator(".sw-single-select__selection-input");
5262
- this.stockInput = this.changeStockRow.getByPlaceholder("Enter quantity in stock...");
5288
+ this.stockInput = this.changeStockRow.locator("#stock");
5263
5289
  this.changeRestockTimeRow = page.locator(".sw-bulk-edit-change-field-restockTime");
5264
5290
  this.changeRestockTimeCheckbox = this.changeRestockTimeRow.getByRole("checkbox");
5265
5291
  this.restockTimeChangeMethodDropdown = this.changeRestockTimeRow.locator(".sw-single-select__selection-text");
5266
5292
  this.restockTimeChangeMethodInput = this.changeRestockTimeRow.locator(".sw-single-select__selection-input");
5267
- this.restockTimeInput = this.changeRestockTimeRow.getByPlaceholder("Enter restock time in days...");
5293
+ this.restockTimeInput = this.changeRestockTimeRow.locator("#restock-time");
5268
5294
  this.changeTagsRow = page.locator(".sw-bulk-edit-change-field-tags");
5269
5295
  this.changeTagsCheckbox = this.changeTagsRow.getByRole("checkbox");
5270
5296
  this.tagsChangeMethodDropdown = this.changeTagsRow.locator(".sw-single-select__selection-text");
5271
5297
  this.tagsChangeMethodInput = this.changeTagsRow.locator(".sw-single-select__selection-input");
5272
- this.tagsInput = this.changeTagsRow.getByPlaceholder("Enter tags...");
5298
+ this.tagsInput = this.changeTagsRow.locator(".sw-select-selection-list__input");
5273
5299
  this.changeSalesChannelRow = page.locator(".sw-bulk-edit-change-field-visibilities");
5274
5300
  this.changeSalesChannelCheckbox = this.changeSalesChannelRow.getByRole("checkbox");
5275
5301
  this.salesChannelChangeMethodDropdown = this.changeSalesChannelRow.locator(".sw-single-select__selection-text");
@@ -5411,8 +5437,8 @@ const test$5 = test$e.extend({
5411
5437
  AdminCustomerListing: async ({ AdminPage }, use) => {
5412
5438
  await use(new CustomerListing(AdminPage));
5413
5439
  },
5414
- AdminCustomerDetail: async ({ AdminPage }, use) => {
5415
- await use(new CustomerDetail(AdminPage));
5440
+ AdminCustomerDetail: async ({ AdminPage, InstanceMeta }, use) => {
5441
+ await use(new CustomerDetail(AdminPage, InstanceMeta));
5416
5442
  },
5417
5443
  AdminCustomerGroupListing: async ({ AdminPage }, use) => {
5418
5444
  await use(new CustomerGroupListing(AdminPage));
@@ -5423,8 +5449,8 @@ const test$5 = test$e.extend({
5423
5449
  AdminCustomerGroupDetail: async ({ AdminPage }, use) => {
5424
5450
  await use(new CustomerGroupDetail(AdminPage));
5425
5451
  },
5426
- AdminFirstRunWizard: async ({ AdminPage }, use) => {
5427
- await use(new FirstRunWizard(AdminPage));
5452
+ AdminFirstRunWizard: async ({ AdminPage, InstanceMeta }, use) => {
5453
+ await use(new FirstRunWizard(AdminPage, InstanceMeta));
5428
5454
  },
5429
5455
  AdminFlowBuilderCreate: async ({ AdminPage }, use) => {
5430
5456
  await use(new FlowBuilderCreate(AdminPage));
@@ -6166,6 +6192,7 @@ const BulkEditProducts = test$e.extend({
6166
6192
  if (changes["releaseDate"] != null) {
6167
6193
  await AdminProductBulkEdit.changeReleaseDateCheckbox.click();
6168
6194
  await AdminProductBulkEdit.releaseDateInput.fill(changes["releaseDate"].value);
6195
+ await AdminProductBulkEdit.releaseDateInput.press("Enter");
6169
6196
  }
6170
6197
  if (changes["stock"] != null) {
6171
6198
  await AdminProductBulkEdit.changeStockCheckbox.click();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopware-ag/acceptance-test-suite",
3
- "version": "11.0.0",
3
+ "version": "11.1.1",
4
4
  "description": "Shopware Acceptance Test Suite",
5
5
  "author": "shopware AG",
6
6
  "license": "MIT",
@@ -40,6 +40,7 @@
40
40
  "@playwright/test": "^1.49.1",
41
41
  "@shopware/api-client": "0.5.0",
42
42
  "axe-html-reporter": "2.2.3",
43
+ "compare-versions": "^6.1.1",
43
44
  "image-js": "0.35.5",
44
45
  "uuid": "9.0.1"
45
46
  },