@bigbinary/neeto-playwright-commons 1.17.6 → 1.17.8

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
@@ -798,7 +798,8 @@ const TABLE_SELECTORS = {
798
798
 
799
799
  const THEMES_SELECTORS = {
800
800
  colorPickerDropdownContainer: (colorHex) => `${colorHex}-dropdown-container`,
801
- themeStyle: (styleType) => `theme-style-${neetoCist.hyphenate(styleType)}`,
801
+ baseThemeStyle: (styleType) => `theme-style-${neetoCist.hyphenate(styleType)}`,
802
+ introPageThemeStyle: (styleType) => `intro-page-theme-style-${neetoCist.hyphenate(styleType)}`,
802
803
  };
803
804
 
804
805
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
@@ -3904,6 +3905,9 @@ class CustomCommands {
3904
3905
  .getAttribute("content");
3905
3906
  return this.csrfToken;
3906
3907
  };
3908
+ /**
3909
+ * @deprecated Use UI assertions instead.
3910
+ */
3907
3911
  this.interceptMultipleResponses = ({ responseUrl = "", responseStatus = 200, times = 1, baseUrl, customPageContext, timeout = 35000, } = {}) => {
3908
3912
  const pageContext = customPageContext !== null && customPageContext !== void 0 ? customPageContext : this.page;
3909
3913
  return Promise.all([...new Array(times)].map(() => pageContext.waitForResponse((response) => {
@@ -12281,19 +12285,19 @@ const hexToRGBA = (hex) => {
12281
12285
  class ColorPickerUtils {
12282
12286
  constructor(page) {
12283
12287
  this.page = page;
12284
- this.pickColor = async (styleType, color) => {
12288
+ this.pickColor = async (themeLocator, color) => {
12285
12289
  const colorPickerInput = this.page
12286
12290
  .getByTestId(EMBED_SELECTORS.colorpickerEditableInput)
12287
12291
  .getByTestId(EMBED_SELECTORS.colorpickerEditableInputTextbox);
12288
- await this.page
12289
- .getByTestId(THEMES_SELECTORS.themeStyle(styleType))
12290
- .getByTestId(EMBED_SELECTORS.colorPickerTarget)
12291
- .click();
12292
- await test$1.expect(colorPickerInput).toBeVisible();
12293
- await colorPickerInput.fill(color.replace("#", ""));
12294
- await test$1.expect(this.page.getByTestId(THEMES_SELECTORS.colorPickerDropdownContainer(color))).toBeVisible();
12295
- await colorPickerInput.press("Escape");
12296
- await test$1.expect(colorPickerInput).toBeHidden();
12292
+ const colorPickerButton = themeLocator.getByTestId(EMBED_SELECTORS.colorPickerTarget);
12293
+ await test$1.expect(async () => {
12294
+ await colorPickerButton.click();
12295
+ await test$1.expect(colorPickerInput).toBeVisible();
12296
+ await colorPickerInput.fill(color.replace("#", ""));
12297
+ await test$1.expect(this.page.getByTestId(THEMES_SELECTORS.colorPickerDropdownContainer(color))).toBeVisible();
12298
+ await colorPickerInput.press("Escape");
12299
+ await test$1.expect(colorPickerInput).toBeHidden();
12300
+ }).toPass({ timeout: 40000 });
12297
12301
  };
12298
12302
  this.hexToRGBA = (hex) => {
12299
12303
  let r = 0, g = 0, b = 0, a = 1;