@shopware-ag/acceptance-test-suite 12.4.3 → 12.6.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.mjs CHANGED
@@ -203,7 +203,7 @@ class AdminApiContext {
203
203
  }
204
204
  static async createApiRequestContext(options) {
205
205
  const extraHTTPHeaders = {
206
- "Accept": "application/json",
206
+ Accept: "application/json",
207
207
  "Content-Type": "application/json"
208
208
  };
209
209
  if (options.access_token && options.access_token.length) {
@@ -318,7 +318,7 @@ class AdminApiContext {
318
318
  ...options,
319
319
  data: options?.data ?? void 0,
320
320
  headers: {
321
- ...options?.headers || {},
321
+ ...options?.headers,
322
322
  Authorization: `Bearer ${this.options.access_token}`
323
323
  }
324
324
  };
@@ -329,7 +329,7 @@ class AdminApiContext {
329
329
  ...options,
330
330
  data: options?.data ?? void 0,
331
331
  headers: {
332
- ...options?.headers || {},
332
+ ...options?.headers,
333
333
  Authorization: `Bearer ${this.options["access_token"]}`
334
334
  }
335
335
  };
@@ -356,7 +356,7 @@ class StoreApiContext {
356
356
  }
357
357
  static async createContext(options) {
358
358
  const extraHTTPHeaders = {
359
- "Accept": "application/json",
359
+ Accept: "application/json",
360
360
  "Content-Type": "application/json"
361
361
  };
362
362
  if (options["sw-access-key"]) {
@@ -502,7 +502,7 @@ class MailpitApiContext {
502
502
  */
503
503
  static async create(baseURL) {
504
504
  const extraHTTPHeaders = {
505
- "Accept": "application/json",
505
+ Accept: "application/json",
506
506
  "Content-Type": "application/json"
507
507
  };
508
508
  const context = await request.newContext({
@@ -516,7 +516,6 @@ class MailpitApiContext {
516
516
 
517
517
  const test$c = test$e.extend({
518
518
  AdminApiContext: [
519
- // eslint-disable-next-line no-empty-pattern
520
519
  async ({}, use) => {
521
520
  const adminApiContext = await AdminApiContext.create();
522
521
  await use(adminApiContext);
@@ -536,7 +535,6 @@ const test$c = test$e.extend({
536
535
  { scope: "worker" }
537
536
  ],
538
537
  MailpitApiContext: [
539
- // eslint-disable-next-line no-empty-pattern
540
538
  async ({}, use) => {
541
539
  const mailpitApiContext = await MailpitApiContext.create(process.env["MAILPIT_BASE_URL"]);
542
540
  await use(mailpitApiContext);
@@ -562,45 +560,66 @@ const isThemeCompiled = async (context, storefrontUrl) => {
562
560
  };
563
561
 
564
562
  const clearDelayedCache = async (adminApiContext) => {
565
- await adminApiContext.delete("./_action/cache-delayed");
563
+ await adminApiContext.delete("./_action/cache-delayed?refreshOpenSearch=true");
566
564
  };
567
565
 
568
566
  async function mockApiCalls(page) {
569
- await page.route("**/api/notification/message*", (route) => route.fulfill({
570
- status: 200,
571
- contentType: "application/json",
572
- body: JSON.stringify({ notifications: [], timestamp: "2024-06-19 06:23:25.040" })
573
- }));
574
- await page.route("**/api/_action/store/plugin/search*", (route) => route.fulfill({
575
- status: 200,
576
- contentType: "application/json",
577
- body: JSON.stringify({ items: [], total: 0 })
578
- }));
579
- await page.route("**/api/_action/store/updates*", (route) => route.fulfill({
580
- status: 200,
581
- contentType: "application/json",
582
- body: JSON.stringify({ items: [], total: 0 })
583
- }));
584
- await page.route("**/api/sbp/shop-info*", (route) => route.fulfill({
585
- status: 200,
586
- contentType: "application/json",
587
- body: JSON.stringify({ items: [], total: 0 })
588
- }));
589
- await page.route("**/api/sbp/shop-info*", (route) => route.fulfill({
590
- status: 200,
591
- contentType: "application/json",
592
- body: process.env.SBP_SHOP_INFO_JSON ?? "{}"
593
- }));
594
- await page.route("**/api/sbp/bookableplans*", (route) => route.fulfill({
595
- status: 200,
596
- contentType: "application/json",
597
- body: process.env.SBP_BOOKABLE_PLANS_JSON ?? "{}"
598
- }));
599
- await page.route("**/api/sbp/nps/active-trigger", (route) => route.fulfill({
600
- status: 200,
601
- contentType: "application/json",
602
- body: '{"prompt":false,"trigger":["gone-live"]}'
603
- }));
567
+ await page.route(
568
+ "**/api/notification/message*",
569
+ (route) => route.fulfill({
570
+ status: 200,
571
+ contentType: "application/json",
572
+ body: JSON.stringify({ notifications: [], timestamp: "2024-06-19 06:23:25.040" })
573
+ })
574
+ );
575
+ await page.route(
576
+ "**/api/_action/store/plugin/search*",
577
+ (route) => route.fulfill({
578
+ status: 200,
579
+ contentType: "application/json",
580
+ body: JSON.stringify({ items: [], total: 0 })
581
+ })
582
+ );
583
+ await page.route(
584
+ "**/api/_action/store/updates*",
585
+ (route) => route.fulfill({
586
+ status: 200,
587
+ contentType: "application/json",
588
+ body: JSON.stringify({ items: [], total: 0 })
589
+ })
590
+ );
591
+ await page.route(
592
+ "**/api/sbp/shop-info*",
593
+ (route) => route.fulfill({
594
+ status: 200,
595
+ contentType: "application/json",
596
+ body: JSON.stringify({ items: [], total: 0 })
597
+ })
598
+ );
599
+ await page.route(
600
+ "**/api/sbp/shop-info*",
601
+ (route) => route.fulfill({
602
+ status: 200,
603
+ contentType: "application/json",
604
+ body: process.env.SBP_SHOP_INFO_JSON ?? "{}"
605
+ })
606
+ );
607
+ await page.route(
608
+ "**/api/sbp/bookableplans*",
609
+ (route) => route.fulfill({
610
+ status: 200,
611
+ contentType: "application/json",
612
+ body: process.env.SBP_BOOKABLE_PLANS_JSON ?? "{}"
613
+ })
614
+ );
615
+ await page.route(
616
+ "**/api/sbp/nps/active-trigger",
617
+ (route) => route.fulfill({
618
+ status: 200,
619
+ contentType: "application/json",
620
+ body: '{"prompt":false,"trigger":["gone-live"]}'
621
+ })
622
+ );
604
623
  }
605
624
 
606
625
  const general$a = {
@@ -766,6 +785,7 @@ const types$1 = {
766
785
  };
767
786
  const detail$m = {
768
787
  displayDocumentInMyAccount: "Display document in \"My account\"",
788
+ displayDocumentInMyAccountSwitch: "Document in \"My account\"",
769
789
  save: "Save"
770
790
  };
771
791
  const administrationDocument = {
@@ -1949,6 +1969,7 @@ const types = {
1949
1969
  };
1950
1970
  const detail$a = {
1951
1971
  displayDocumentInMyAccount: "Dokument in \"Mein Konto\" Bereich anzeigen",
1972
+ displayDocumentInMyAccountSwitch: "Dokument in \"Mein Konto\" Bereich",
1952
1973
  save: "Speichern"
1953
1974
  };
1954
1975
  const deAdministrationDocument = {
@@ -3673,7 +3694,7 @@ const LanguageHelper$1 = {
3673
3694
  translate: translate
3674
3695
  };
3675
3696
 
3676
- async function createNewAdminPageContext(merchant, browser, SalesChannelBaseConfig, AdminApiContext) {
3697
+ async function createNewAdminPageContext(browser, SalesChannelBaseConfig) {
3677
3698
  const context = await browser.newContext({
3678
3699
  baseURL: SalesChannelBaseConfig.adminUrl,
3679
3700
  serviceWorkers: "block"
@@ -3681,25 +3702,28 @@ async function createNewAdminPageContext(merchant, browser, SalesChannelBaseConf
3681
3702
  const adminPage = await context.newPage();
3682
3703
  await adminPage.goto("#/login");
3683
3704
  await mockApiCalls(adminPage);
3705
+ return adminPage;
3706
+ }
3707
+ async function loginToAdministration(adminLoginPage, merchant, AdminApiContext) {
3684
3708
  const usernamePattern = new RegExp(`${translate("administration:login:username")}|${translate("administration:login:emailAddress")}`);
3685
3709
  const passwordLabel = translate("administration:login:password");
3686
- await adminPage.getByLabel(usernamePattern).fill(merchant.username);
3687
- await adminPage.getByLabel(passwordLabel, { exact: true }).fill(merchant.password);
3710
+ await adminLoginPage.getByLabel(usernamePattern).fill(merchant.username);
3711
+ await adminLoginPage.getByLabel(passwordLabel, { exact: true }).fill(merchant.password);
3688
3712
  const config = await (await AdminApiContext.get("./_info/config")).json();
3689
3713
  const jsLoadingPromises = [];
3690
3714
  for (const i in config.bundles) {
3691
3715
  if (config.bundles[i]?.js && config.bundles[i]?.js?.length) {
3692
3716
  const js = config?.bundles[i]?.js ?? [];
3693
- jsLoadingPromises.push(...js.map((url) => adminPage.waitForResponse(url)));
3717
+ jsLoadingPromises.push(...js.map((url) => adminLoginPage.waitForResponse(url)));
3694
3718
  }
3695
3719
  }
3696
3720
  const loginButtonLabel = translate("administration:login:loginButton");
3697
- await adminPage.getByRole("button", { name: loginButtonLabel, exact: true }).click();
3721
+ await adminLoginPage.getByRole("button", { name: loginButtonLabel, exact: true }).click();
3698
3722
  await Promise.all(jsLoadingPromises);
3699
- const originalReload = adminPage.reload.bind(adminPage);
3700
- adminPage.reload = async () => {
3723
+ const originalReload = adminLoginPage.reload.bind(adminLoginPage);
3724
+ adminLoginPage.reload = async () => {
3701
3725
  const res = await originalReload();
3702
- await adminPage.addStyleTag({
3726
+ await adminLoginPage.addStyleTag({
3703
3727
  content: `
3704
3728
  .sf-toolbar {
3705
3729
  width: 0 !important;
@@ -3712,12 +3736,12 @@ async function createNewAdminPageContext(merchant, browser, SalesChannelBaseConf
3712
3736
  return res;
3713
3737
  };
3714
3738
  await clearDelayedCache(AdminApiContext);
3715
- await expect(adminPage.locator(".sw-skeleton")).toHaveCount(0);
3716
- await adminPage.waitForURL((url) => {
3739
+ await expect(adminLoginPage.locator(".sw-skeleton")).toHaveCount(0);
3740
+ await adminLoginPage.waitForURL((url) => {
3717
3741
  return url.hash !== "#login";
3718
3742
  });
3719
- await expect(adminPage.getByText(merchant.firstName + " " + merchant.lastName).first()).toBeVisible({ timeout: 6e4 });
3720
- return adminPage;
3743
+ await expect(adminLoginPage.getByText(merchant.firstName + " " + merchant.lastName).first()).toBeVisible({ timeout: 6e4 });
3744
+ return adminLoginPage;
3721
3745
  }
3722
3746
 
3723
3747
  const test$b = test$e.extend({
@@ -3740,7 +3764,11 @@ const test$b = test$e.extend({
3740
3764
  data: adminUser
3741
3765
  });
3742
3766
  expect(response.ok()).toBeTruthy();
3743
- const page = await createNewAdminPageContext(adminUser, browser, SalesChannelBaseConfig, AdminApiContext);
3767
+ const page = await loginToAdministration(
3768
+ await createNewAdminPageContext(browser, SalesChannelBaseConfig),
3769
+ adminUser,
3770
+ AdminApiContext
3771
+ );
3744
3772
  LanguageHelper.setForContext(page.context(), languageHelper);
3745
3773
  setCurrentContext(page.context());
3746
3774
  await use(page);
@@ -3816,6 +3844,7 @@ class Actor {
3816
3844
  expects = expect;
3817
3845
  async a11y_checks(locator) {
3818
3846
  await locator.scrollIntoViewIfNeeded();
3847
+ await expect(locator).toBeEnabled();
3819
3848
  await locator.focus();
3820
3849
  await expect(locator).toBeFocused();
3821
3850
  await expect(locator).toHaveVisibleFocus();
@@ -6383,7 +6412,6 @@ class IdProvider {
6383
6412
 
6384
6413
  const test$8 = test$e.extend({
6385
6414
  IdProvider: [
6386
- // eslint-disable-next-line no-empty-pattern
6387
6415
  async ({}, use, workerInfo) => {
6388
6416
  const seed = process.env.SHOPWARE_ACCESS_KEY_ID || process.env.SHOPWARE_ADMIN_PASSWORD || "test-suite";
6389
6417
  const idProvider = new IdProvider(workerInfo.parallelIndex, seed);
@@ -6433,7 +6461,6 @@ const test$8 = test$e.extend({
6433
6461
  { scope: "worker" }
6434
6462
  ],
6435
6463
  CustomTranslationResources: [
6436
- // eslint-disable-next-line no-empty-pattern
6437
6464
  async ({}, use) => {
6438
6465
  await use(void 0);
6439
6466
  },
@@ -9816,13 +9843,16 @@ class DocumentListing {
9816
9843
  }
9817
9844
 
9818
9845
  class DocumentDetail {
9846
+ /** @deprecated - Use 'displayDocumentInMyAccountSwitch' instead. */
9819
9847
  showInAccountSwitch;
9848
+ displayDocumentInMyAccountSwitch;
9820
9849
  saveButton;
9821
9850
  documentTypeSelect;
9822
9851
  page;
9823
9852
  constructor(page) {
9824
9853
  this.page = page;
9825
9854
  this.showInAccountSwitch = page.getByRole("checkbox", { name: translate("administration:document:detail.displayDocumentInMyAccount") });
9855
+ this.displayDocumentInMyAccountSwitch = page.getByRole("checkbox", { name: translate("administration:document:detail.displayDocumentInMyAccountSwitch") });
9826
9856
  this.saveButton = page.getByRole("button", { name: translate("administration:document:detail.save") });
9827
9857
  this.documentTypeSelect = page.locator(".sw-settings-document-detail__select-type");
9828
9858
  }
@@ -10606,9 +10636,11 @@ const CategoryData = test$e.extend({
10606
10636
  productAssignmentType: "product",
10607
10637
  visible: true,
10608
10638
  active: true,
10609
- products: [{
10610
- id: ProductData.id
10611
- }]
10639
+ products: [
10640
+ {
10641
+ id: ProductData.id
10642
+ }
10643
+ ]
10612
10644
  }
10613
10645
  });
10614
10646
  expect(categoryResponse.ok()).toBeTruthy();
@@ -10654,11 +10686,13 @@ const DigitalProductData = test$e.extend({
10654
10686
  const orderSearchResponse = await AdminApiContext.post("./search/order", {
10655
10687
  data: {
10656
10688
  limit: 10,
10657
- filter: [{
10658
- type: "equals",
10659
- field: "lineItems.productId",
10660
- value: ProductData.id
10661
- }]
10689
+ filter: [
10690
+ {
10691
+ type: "equals",
10692
+ field: "lineItems.productId",
10693
+ value: ProductData.id
10694
+ }
10695
+ ]
10662
10696
  }
10663
10697
  });
10664
10698
  expect(orderSearchResponse.ok()).toBeTruthy();
@@ -10682,16 +10716,20 @@ const PropertiesData = test$e.extend({
10682
10716
  description: "Color",
10683
10717
  displayType: "color",
10684
10718
  sortingType: "name",
10685
- options: [{
10686
- name: "Blue",
10687
- colorHexCode: "#2148d6"
10688
- }, {
10689
- name: "Red",
10690
- colorHexCode: "#bf0f2a"
10691
- }, {
10692
- name: "Green",
10693
- colorHexCode: "#12bf0f"
10694
- }]
10719
+ options: [
10720
+ {
10721
+ name: "Blue",
10722
+ colorHexCode: "#2148d6"
10723
+ },
10724
+ {
10725
+ name: "Red",
10726
+ colorHexCode: "#bf0f2a"
10727
+ },
10728
+ {
10729
+ name: "Green",
10730
+ colorHexCode: "#12bf0f"
10731
+ }
10732
+ ]
10695
10733
  }
10696
10734
  });
10697
10735
  const propertyGroupSizeResponse = await AdminApiContext.post("property-group?_response=1", {
@@ -10700,13 +10738,17 @@ const PropertiesData = test$e.extend({
10700
10738
  description: "Size",
10701
10739
  displayType: "text",
10702
10740
  sortingType: "name",
10703
- options: [{
10704
- name: "Small"
10705
- }, {
10706
- name: "Medium"
10707
- }, {
10708
- name: "Large"
10709
- }]
10741
+ options: [
10742
+ {
10743
+ name: "Small"
10744
+ },
10745
+ {
10746
+ name: "Medium"
10747
+ },
10748
+ {
10749
+ name: "Large"
10750
+ }
10751
+ ]
10710
10752
  }
10711
10753
  });
10712
10754
  expect(propertyGroupColorResponse.ok()).toBeTruthy();
@@ -11076,17 +11118,7 @@ const TagData = test$e.extend({
11076
11118
  }
11077
11119
  });
11078
11120
 
11079
- const test$5 = mergeTests(
11080
- ProductData,
11081
- CategoryData,
11082
- DigitalProductData,
11083
- CartWithProductData,
11084
- PromotionWithCodeData,
11085
- PropertiesData,
11086
- MediaData,
11087
- OrderData,
11088
- TagData
11089
- );
11121
+ const test$5 = mergeTests(ProductData, CategoryData, DigitalProductData, CartWithProductData, PromotionWithCodeData, PropertiesData, MediaData, OrderData, TagData);
11090
11122
 
11091
11123
  const SaveProduct = test$e.extend({
11092
11124
  SaveProduct: async ({ ShopAdmin, AdminProductDetail }, use) => {
@@ -11501,9 +11533,13 @@ const CheckVisibilityOfServicesBanner = test$e.extend({
11501
11533
  const task = (customUser) => {
11502
11534
  return async function CheckVisibilityOfServicesBanner2() {
11503
11535
  const user = customUser ? customUser : await TestDataService.createUser();
11504
- const adminPage = await createNewAdminPageContext(user, browser, SalesChannelBaseConfig, TestDataService.AdminApiClient);
11536
+ const adminPage = await loginToAdministration(
11537
+ await createNewAdminPageContext(browser, SalesChannelBaseConfig),
11538
+ user,
11539
+ TestDataService.AdminApiClient
11540
+ );
11505
11541
  const shopwareServicesAdvertisementBanner = adminPage.locator(".sw-settings-services-dashboard-banner__content").first();
11506
- await expect(shopwareServicesAdvertisementBanner).toBeVisible();
11542
+ await expect(shopwareServicesAdvertisementBanner).toBeVisible({ timeout: 1e4 });
11507
11543
  };
11508
11544
  };
11509
11545
  await use(task);
@@ -11521,7 +11557,11 @@ const CheckAccessToShopwareServices = test$e.extend({
11521
11557
  user = await TestDataService.getUserById(customUser.id);
11522
11558
  user.password = customUser.password;
11523
11559
  }
11524
- const adminPage = await createNewAdminPageContext(user, browser, SalesChannelBaseConfig, TestDataService.AdminApiClient);
11560
+ const adminPage = await loginToAdministration(
11561
+ await createNewAdminPageContext(browser, SalesChannelBaseConfig),
11562
+ user,
11563
+ TestDataService.AdminApiClient
11564
+ );
11525
11565
  const shopwareServicesAdvertisementBanner = adminPage.locator(".sw-settings-services-dashboard-banner__content").first();
11526
11566
  const shopwareServicesExploreNowButton = shopwareServicesAdvertisementBanner.getByRole("button", {
11527
11567
  name: translate("administration:shopwareServices:buttons.exploreNow")
@@ -11670,11 +11710,13 @@ const RegisterGuest = test$e.extend({
11670
11710
  const customerResponse = await AdminApiContext.post("search/customer", {
11671
11711
  data: {
11672
11712
  limit: 1,
11673
- filter: [{
11674
- type: "equals",
11675
- field: "email",
11676
- value: registrationData.email
11677
- }]
11713
+ filter: [
11714
+ {
11715
+ type: "equals",
11716
+ field: "email",
11717
+ value: registrationData.email
11718
+ }
11719
+ ]
11678
11720
  }
11679
11721
  });
11680
11722
  expect(customerResponse.ok()).toBeTruthy();
@@ -11750,10 +11792,7 @@ const ProceedFromProductToCheckout = test$e.extend({
11750
11792
  });
11751
11793
 
11752
11794
  const CloseTheOffCanvasCart = test$e.extend({
11753
- CloseTheOffCanvasCart: async ({
11754
- ShopCustomer,
11755
- StorefrontOffCanvasCart
11756
- }, use) => {
11795
+ CloseTheOffCanvasCart: async ({ ShopCustomer, StorefrontOffCanvasCart }, use) => {
11757
11796
  const task = () => {
11758
11797
  return async function CloseTheOffCanvasCart2() {
11759
11798
  await ShopCustomer.presses(StorefrontOffCanvasCart.continueShoppingButton);
@@ -11765,11 +11804,7 @@ const CloseTheOffCanvasCart = test$e.extend({
11765
11804
  });
11766
11805
 
11767
11806
  const ProceedFromCartToCheckout = test$e.extend({
11768
- ProceedFromCartToCheckout: async ({
11769
- ShopCustomer,
11770
- StorefrontCheckoutCart,
11771
- StorefrontCheckoutConfirm
11772
- }, use) => {
11807
+ ProceedFromCartToCheckout: async ({ ShopCustomer, StorefrontCheckoutCart, StorefrontCheckoutConfirm }, use) => {
11773
11808
  const task = () => {
11774
11809
  return async function ProceedFromCartToCheckout2() {
11775
11810
  await ShopCustomer.presses(StorefrontCheckoutCart.goToCheckoutButton);
@@ -11782,10 +11817,7 @@ const ProceedFromCartToCheckout = test$e.extend({
11782
11817
  });
11783
11818
 
11784
11819
  const ChangeProductQuantity = test$e.extend({
11785
- ChangeProductQuantity: async ({
11786
- ShopCustomer,
11787
- StorefrontCheckoutCart
11788
- }, use) => {
11820
+ ChangeProductQuantity: async ({ ShopCustomer, StorefrontCheckoutCart }, use) => {
11789
11821
  const task = (quantity) => {
11790
11822
  return async function ChangeProductQuantityOnCart() {
11791
11823
  await StorefrontCheckoutCart.cartQuantityNumber.clear();
@@ -12340,35 +12372,38 @@ async function replaceElements(page, selectors, replaceWith = "***") {
12340
12372
  selectors,
12341
12373
  // String handler → replace text/value via querySelectorAll
12342
12374
  async (page2, selectors2) => {
12343
- await page2.evaluate(({ selectors: selectors3, replaceWith: replaceWith2 }) => {
12344
- const maskInputLike = (el) => {
12345
- el.value = replaceWith2;
12346
- el.defaultValue = replaceWith2;
12347
- el.setAttribute("value", replaceWith2);
12348
- if ("placeholder" in el) {
12349
- el.setAttribute("placeholder", replaceWith2);
12350
- }
12351
- el.dispatchEvent(new Event("input", { bubbles: true }));
12352
- el.dispatchEvent(new Event("change", { bubbles: true }));
12353
- };
12354
- const maskGeneric = (el) => {
12355
- el.textContent = replaceWith2;
12356
- if (el.isContentEditable) {
12375
+ await page2.evaluate(
12376
+ ({ selectors: selectors3, replaceWith: replaceWith2 }) => {
12377
+ const maskInputLike = (el) => {
12378
+ el.value = replaceWith2;
12379
+ el.defaultValue = replaceWith2;
12380
+ el.setAttribute("value", replaceWith2);
12381
+ if ("placeholder" in el) {
12382
+ el.setAttribute("placeholder", replaceWith2);
12383
+ }
12357
12384
  el.dispatchEvent(new Event("input", { bubbles: true }));
12358
12385
  el.dispatchEvent(new Event("change", { bubbles: true }));
12359
- }
12360
- };
12361
- selectors3.forEach((sel) => {
12362
- const elements = document.querySelectorAll(sel);
12363
- elements.forEach((el) => {
12364
- if (el instanceof HTMLInputElement || el instanceof HTMLTextAreaElement) {
12365
- maskInputLike(el);
12366
- } else {
12367
- maskGeneric(el);
12386
+ };
12387
+ const maskGeneric = (el) => {
12388
+ el.textContent = replaceWith2;
12389
+ if (el.isContentEditable) {
12390
+ el.dispatchEvent(new Event("input", { bubbles: true }));
12391
+ el.dispatchEvent(new Event("change", { bubbles: true }));
12368
12392
  }
12393
+ };
12394
+ selectors3.forEach((sel) => {
12395
+ const elements = document.querySelectorAll(sel);
12396
+ elements.forEach((el) => {
12397
+ if (el instanceof HTMLInputElement || el instanceof HTMLTextAreaElement) {
12398
+ maskInputLike(el);
12399
+ } else {
12400
+ maskGeneric(el);
12401
+ }
12402
+ });
12369
12403
  });
12370
- });
12371
- }, { selectors: selectors2, replaceWith });
12404
+ },
12405
+ { selectors: selectors2, replaceWith }
12406
+ );
12372
12407
  },
12373
12408
  // Locator handler → replace text/value directly
12374
12409
  async (el) => {
@@ -12472,10 +12507,7 @@ async function setViewport(page, options = {}) {
12472
12507
  const headerHandle = await header.elementHandle();
12473
12508
  const scrollableHandle = await scrollableElementVertical.elementHandle();
12474
12509
  if (headerHandle && scrollableHandle) {
12475
- const isInside = await page.evaluate(
12476
- ([headerEl, containerEl]) => containerEl.contains(headerEl),
12477
- [headerHandle, scrollableHandle]
12478
- );
12510
+ const isInside = await page.evaluate(([headerEl, containerEl]) => containerEl.contains(headerEl), [headerHandle, scrollableHandle]);
12479
12511
  if (!isInside) {
12480
12512
  headerHeight = await header.evaluate((el) => el.offsetHeight);
12481
12513
  }
@@ -12528,4 +12560,4 @@ const test = mergeTests(
12528
12560
  test$3
12529
12561
  );
12530
12562
 
12531
- export { AdminPageObjects, BUNDLED_RESOURCES, COUNTRY_ADDRESS_DATA, IdProvider, LanguageHelper, RuleType, StorefrontPageObjects, TestDataService, assertScreenshot, baseNamespaces, compareFlowTemplateWithFlow, createRandomImage, encodeImage, 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, isSaaSInstance, isThemeCompiled, replaceElements, replaceElementsIndividually, setCurrentContext, setOrderStatus, setViewport, test, translate, updateAdminUser };
12563
+ export { Actor, AdminPageObjects, BUNDLED_RESOURCES, COUNTRY_ADDRESS_DATA, FeatureService, IdProvider, LanguageHelper, RuleType, StorefrontPageObjects, TestDataService, assertScreenshot, baseNamespaces, clearDelayedCache, compareFlowTemplateWithFlow, createNewAdminPageContext, createRandomImage, encodeImage, 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, isSaaSInstance, isThemeCompiled, loginToAdministration, mockApiCalls, replaceElements, replaceElementsIndividually, setCurrentContext, setOrderStatus, setViewport, test, translate, updateAdminUser };