@shopware-ag/acceptance-test-suite 11.11.1 → 11.12.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
@@ -146,10 +146,11 @@ interface PageContextTypes {
146
146
  declare class Actor {
147
147
  page: Page;
148
148
  readonly name: string;
149
- constructor(name: string, page: Page);
149
+ baseURL: string | undefined;
150
+ constructor(name: string, page: Page, baseURL?: string);
150
151
  expects: _playwright_test.Expect<{}>;
151
152
  attemptsTo(task: () => Promise<void>): Promise<void>;
152
- goesTo(url: string): Promise<void>;
153
+ goesTo(url: string, forceReload?: boolean): Promise<void>;
153
154
  private camelCaseToLowerCase;
154
155
  }
155
156
 
@@ -1919,6 +1920,7 @@ declare class FlowBuilderCreate implements PageObject {
1919
1920
  readonly page: Page;
1920
1921
  readonly saveButton: Locator;
1921
1922
  readonly header: Locator;
1923
+ readonly newFlowHeader: Locator;
1922
1924
  constructor(page: Page);
1923
1925
  url(): string;
1924
1926
  }
@@ -2071,6 +2073,7 @@ declare class LandingPageDetail implements PageObject {
2071
2073
 
2072
2074
  declare class Categories implements PageObject {
2073
2075
  readonly page: Page;
2076
+ readonly instanceMeta: HelperFixtureTypes['InstanceMeta'];
2074
2077
  /**
2075
2078
  * Landing pages
2076
2079
  */
@@ -2108,7 +2111,9 @@ declare class Categories implements PageObject {
2108
2111
  readonly filterResultPopoverTreeCheckboxItemList: Locator;
2109
2112
  readonly openInNewTabCheckbox: Locator;
2110
2113
  readonly popoverCategoryTree: Locator;
2111
- constructor(page: Page);
2114
+ readonly categorySelectionListWrapper: Locator;
2115
+ readonly productSelectionInput: Locator;
2116
+ constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
2112
2117
  getLandingPageByName(landingPageName: string): Promise<Locator>;
2113
2118
  getPopOverCategoryByName(categoryName: string): Promise<Locator>;
2114
2119
  getTreeItemContextButton(name: string): Locator;
package/dist/index.d.ts CHANGED
@@ -146,10 +146,11 @@ interface PageContextTypes {
146
146
  declare class Actor {
147
147
  page: Page;
148
148
  readonly name: string;
149
- constructor(name: string, page: Page);
149
+ baseURL: string | undefined;
150
+ constructor(name: string, page: Page, baseURL?: string);
150
151
  expects: _playwright_test.Expect<{}>;
151
152
  attemptsTo(task: () => Promise<void>): Promise<void>;
152
- goesTo(url: string): Promise<void>;
153
+ goesTo(url: string, forceReload?: boolean): Promise<void>;
153
154
  private camelCaseToLowerCase;
154
155
  }
155
156
 
@@ -1919,6 +1920,7 @@ declare class FlowBuilderCreate implements PageObject {
1919
1920
  readonly page: Page;
1920
1921
  readonly saveButton: Locator;
1921
1922
  readonly header: Locator;
1923
+ readonly newFlowHeader: Locator;
1922
1924
  constructor(page: Page);
1923
1925
  url(): string;
1924
1926
  }
@@ -2071,6 +2073,7 @@ declare class LandingPageDetail implements PageObject {
2071
2073
 
2072
2074
  declare class Categories implements PageObject {
2073
2075
  readonly page: Page;
2076
+ readonly instanceMeta: HelperFixtureTypes['InstanceMeta'];
2074
2077
  /**
2075
2078
  * Landing pages
2076
2079
  */
@@ -2108,7 +2111,9 @@ declare class Categories implements PageObject {
2108
2111
  readonly filterResultPopoverTreeCheckboxItemList: Locator;
2109
2112
  readonly openInNewTabCheckbox: Locator;
2110
2113
  readonly popoverCategoryTree: Locator;
2111
- constructor(page: Page);
2114
+ readonly categorySelectionListWrapper: Locator;
2115
+ readonly productSelectionInput: Locator;
2116
+ constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
2112
2117
  getLandingPageByName(landingPageName: string): Promise<Locator>;
2113
2118
  getPopOverCategoryByName(categoryName: string): Promise<Locator>;
2114
2119
  getTreeItemContextButton(name: string): Locator;
package/dist/index.mjs CHANGED
@@ -633,6 +633,11 @@ const test$b = test$f.extend({
633
633
  return res;
634
634
  };
635
635
  await clearDelayedCache(AdminApiContext);
636
+ await expect(page.locator(".sw-skeleton")).toHaveCount(0);
637
+ await page.waitForURL((url) => {
638
+ return url.hash !== "#login";
639
+ });
640
+ await expect(page.getByText("Administration").first()).toBeVisible();
636
641
  await use(page);
637
642
  await page.close();
638
643
  await context.close();
@@ -689,31 +694,41 @@ var __publicField$V = (obj, key, value) => {
689
694
  return value;
690
695
  };
691
696
  class Actor {
692
- constructor(name, page) {
697
+ constructor(name, page, baseURL) {
693
698
  __publicField$V(this, "page");
694
699
  __publicField$V(this, "name");
700
+ __publicField$V(this, "baseURL");
695
701
  __publicField$V(this, "expects", expect);
696
702
  this.name = name;
697
703
  this.page = page;
704
+ this.baseURL = baseURL;
698
705
  }
699
706
  async attemptsTo(task) {
700
707
  const stepTitle = `${this.name} attempts to ${this.camelCaseToLowerCase(task.name)}`;
701
708
  await test$f.step(stepTitle, async () => await task());
702
709
  }
703
- async goesTo(url) {
710
+ async goesTo(url, forceReload = false) {
704
711
  const stepTitle = `${this.name} navigates to "${url}"`;
705
712
  await test$f.step(stepTitle, async () => {
706
- await this.page.goto(url);
707
- await this.page.addStyleTag({
708
- content: `
709
- .sf-toolbar {
710
- width: 0 !important;
711
- height: 0 !important;
712
- display: none !important;
713
- pointer-events: none !important;
714
- }
715
- `.trim()
716
- });
713
+ if (this.baseURL && !forceReload && url.startsWith("#")) {
714
+ const baseURLWithoutSlash = this.baseURL.charAt(this.baseURL.length - 1) == "/" ? this.baseURL.substr(0, this.baseURL.length - 1) : this.baseURL;
715
+ const fullURL = new URL(url, baseURLWithoutSlash);
716
+ await this.page.evaluate(`document.location = "${url}";`);
717
+ await this.page.waitForURL(`${fullURL.toString()}**`, { timeout: 15e3 });
718
+ await expect(this.page.locator(".sw-skeleton")).toHaveCount(0);
719
+ } else {
720
+ await this.page.goto(url);
721
+ await this.page.addStyleTag({
722
+ content: `
723
+ .sf-toolbar {
724
+ width: 0 !important;
725
+ height: 0 !important;
726
+ display: none !important;
727
+ pointer-events: none !important;
728
+ }
729
+ `.trim()
730
+ });
731
+ }
717
732
  });
718
733
  }
719
734
  camelCaseToLowerCase(str) {
@@ -726,8 +741,8 @@ const test$a = test$f.extend({
726
741
  const shopCustomer = new Actor("Shop customer", StorefrontPage);
727
742
  await use(shopCustomer);
728
743
  },
729
- ShopAdmin: async ({ AdminPage }, use) => {
730
- const shopAdmin = new Actor("Shop administrator", AdminPage);
744
+ ShopAdmin: async ({ AdminPage, SalesChannelBaseConfig }, use) => {
745
+ const shopAdmin = new Actor("Shop administrator", AdminPage, SalesChannelBaseConfig.adminUrl);
731
746
  await use(shopAdmin);
732
747
  }
733
748
  });
@@ -3052,7 +3067,7 @@ class TestDataService {
3052
3067
  return Object.assign({}, basicSalesChannelAnalyticsStruct, overrides);
3053
3068
  }
3054
3069
  async clearCaches() {
3055
- await this.AdminApiClient.delete("_action/cache");
3070
+ await clearDelayedCache(this.AdminApiClient);
3056
3071
  }
3057
3072
  getBasicCustomFieldSetStruct(overrides = {}) {
3058
3073
  const customFieldSetUuid = this.IdProvider.getIdPair().uuid;
@@ -5053,8 +5068,10 @@ class FlowBuilderCreate {
5053
5068
  this.page = page;
5054
5069
  __publicField$o(this, "saveButton");
5055
5070
  __publicField$o(this, "header");
5071
+ __publicField$o(this, "newFlowHeader");
5056
5072
  this.saveButton = page.locator(".sw-flow-detail__save");
5057
5073
  this.header = page.locator("h2");
5074
+ this.newFlowHeader = page.getByRole("heading", { name: "New flow" });
5058
5075
  }
5059
5076
  url() {
5060
5077
  return "#/sw/flow/create/general";
@@ -5404,8 +5421,9 @@ var __publicField$e = (obj, key, value) => {
5404
5421
  return value;
5405
5422
  };
5406
5423
  class Categories {
5407
- constructor(page) {
5424
+ constructor(page, instanceMeta) {
5408
5425
  this.page = page;
5426
+ this.instanceMeta = instanceMeta;
5409
5427
  /**
5410
5428
  * Landing pages
5411
5429
  */
@@ -5443,6 +5461,8 @@ class Categories {
5443
5461
  __publicField$e(this, "filterResultPopoverTreeCheckboxItemList");
5444
5462
  __publicField$e(this, "openInNewTabCheckbox");
5445
5463
  __publicField$e(this, "popoverCategoryTree");
5464
+ __publicField$e(this, "categorySelectionListWrapper");
5465
+ __publicField$e(this, "productSelectionInput");
5446
5466
  this.landingPageArea = page.locator(".sw-category-detail__landing-page-collapse");
5447
5467
  this.landingPageHeadline = this.landingPageArea.getByRole("heading", { name: "Landing pages" });
5448
5468
  this.addLandingPageButton = this.landingPageArea.getByText("Add landing page");
@@ -5459,14 +5479,21 @@ class Categories {
5459
5479
  this.categoryTypeSelectionList = page.locator(".sw-select").filter({ hasText: "Category type" }).locator(".sw-select__selection");
5460
5480
  this.linkTypeSelectionList = page.locator(".sw-select").filter({ hasText: "Link type" }).locator(".sw-select__selection");
5461
5481
  this.entitySelectionList = page.locator(".sw-select").filter({ hasText: "Entity" }).locator(".sw-select__selection");
5462
- this.categorySelectionList = page.locator(".sw-category-link-settings__selection-category");
5482
+ if (satisfies(instanceMeta.version, "<6.7")) {
5483
+ this.categorySelectionList = page.locator(".sw-category-link-settings__selection-category");
5484
+ } else {
5485
+ this.categorySelectionList = page.locator(".sw-category-tree__input-field");
5486
+ }
5487
+ this.categorySelectionListWrapper = page.locator(".sw-category-tree-field__main-wrapper");
5463
5488
  this.productSelectionList = page.locator(".sw-category-link-settings__selection-product");
5489
+ this.productSelectionInput = this.productSelectionList.locator(".sw-entity-single-select__selection-input");
5464
5490
  this.landingPageSelectionList = page.locator(".sw-category-link-settings__selection-landing-page");
5465
5491
  this.filtersResultPopoverItemList = page.locator(".sw-select-result-list__content").getByRole("listitem");
5466
5492
  this.popoverCategoryTree = page.locator(".sw-category-tree-field__results_popover");
5467
5493
  this.filterResultPopoverTreeCheckboxItemList = this.popoverCategoryTree.locator(".sw-tree__content").locator(".sw-tree-item");
5468
5494
  this.openInNewTabCheckbox = page.getByRole("checkbox", { name: "Open in new tab" });
5469
5495
  this.loadingSpinner = page.locator(".sw-loader");
5496
+ this.loadingSpinner = page.locator(".mt-loader");
5470
5497
  this.fadingBar = page.locator(".fade-leave-active");
5471
5498
  }
5472
5499
  async getLandingPageByName(landingPageName) {
@@ -6248,8 +6275,8 @@ const test$6 = test$f.extend({
6248
6275
  AdminPaymentDetail: async ({ AdminPage }, use) => {
6249
6276
  await use(new PaymentDetail(AdminPage));
6250
6277
  },
6251
- AdminCategories: async ({ AdminPage }, use) => {
6252
- await use(new Categories(AdminPage));
6278
+ AdminCategories: async ({ AdminPage, InstanceMeta }, use) => {
6279
+ await use(new Categories(AdminPage, InstanceMeta));
6253
6280
  },
6254
6281
  AdminCategoryDetail: async ({ AdminPage, InstanceMeta }, use) => {
6255
6282
  await use(new CategoryDetail(AdminPage, InstanceMeta));
@@ -6906,6 +6933,9 @@ const CreateLinkTypeCategory = test$f.extend({
6906
6933
  break;
6907
6934
  case "Product":
6908
6935
  await AdminCategories.productSelectionList.click();
6936
+ if (categoryCustomizableLinkData.product != null) {
6937
+ await AdminCategories.productSelectionInput.fill(categoryCustomizableLinkData.product);
6938
+ }
6909
6939
  await AdminCategories.filtersResultPopoverItemList.filter({ hasText: categoryCustomizableLinkData.product }).click();
6910
6940
  break;
6911
6941
  case "Landing page":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopware-ag/acceptance-test-suite",
3
- "version": "11.11.1",
3
+ "version": "11.12.1",
4
4
  "description": "Shopware Acceptance Test Suite",
5
5
  "author": "shopware AG",
6
6
  "license": "MIT",