@bigbinary/neeto-playwright-commons 1.14.0 → 1.14.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/index.cjs.js CHANGED
@@ -472,6 +472,7 @@ const NEETO_FILTERS_SELECTORS = {
472
472
  paneModalCrossIcon: "neeto-filters-close-button",
473
473
  searchTermBlock: "neeto-filters-search-term-block",
474
474
  neetoFiltersFilter: (filterName) => `neeto-filters-${hyphenize(filterName)}-filter`,
475
+ filtersTermBlock: (filterType = "search-term") => `neeto-filters-${hyphenize(filterType)}-block`,
475
476
  };
476
477
 
477
478
  const HELP_CENTER_SELECTORS = {
@@ -4043,6 +4044,21 @@ class CustomCommands {
4043
4044
  await customPageContext.mouse.move(0, 0);
4044
4045
  await test$1.expect(tooltipBox).toBeHidden();
4045
4046
  };
4047
+ this.verifySearchTermBlock = async (searchTerm) => {
4048
+ const filtersSearchTermBlock = this.page.getByTestId(NEETO_FILTERS_SELECTORS.filtersTermBlock());
4049
+ if (searchTerm) {
4050
+ const textContent = await (filtersSearchTermBlock === null || filtersSearchTermBlock === void 0 ? void 0 : filtersSearchTermBlock.textContent());
4051
+ (textContent === null || textContent === void 0 ? void 0 : textContent.includes(".."))
4052
+ ? await this.verifyTooltip({
4053
+ triggerElement: filtersSearchTermBlock,
4054
+ content: searchTerm,
4055
+ })
4056
+ : await test$1.expect(filtersSearchTermBlock).toContainText(searchTerm);
4057
+ }
4058
+ else {
4059
+ await test$1.expect(filtersSearchTermBlock).toBeHidden();
4060
+ }
4061
+ };
4046
4062
  this.page = page;
4047
4063
  this.responses = [];
4048
4064
  this.request = request;