@bigbinary/neeto-playwright-commons 1.19.4 → 1.19.6

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
@@ -153,6 +153,9 @@ const clearCredentials = () => {
153
153
  return;
154
154
  removeCredentialFile();
155
155
  };
156
+ /**
157
+ * @deprecated Use hyphenate from neeto-cist instead.
158
+ */
156
159
  const hyphenize = input => {
157
160
  const fallbackString = "";
158
161
  if (typeof input === "number")
@@ -205,6 +208,8 @@ const getListCount = async ({ page, countSelector, }) => {
205
208
  const countText = await page.getByTestId(countSelector).textContent();
206
209
  return Number(countText === null || countText === void 0 ? void 0 : countText.trim().split(" ")[0]);
207
210
  };
211
+ const getGlobalUserProps = async (page) => (await page.evaluate(() => window.globalProps.user));
212
+ const getClipboardContent = (page) => page.evaluate(() => navigator.clipboard.readText());
208
213
 
209
214
  const COMMON_SELECTORS = {
210
215
  emailInputError: "email-input-error",
@@ -191536,6 +191541,20 @@ class ZapierPage extends IntegrationBase {
191536
191541
  });
191537
191542
  await this.verifyIntegrationStatus("disconnected");
191538
191543
  };
191544
+ this.generateAPIKey = async (apiKeyLabel) => {
191545
+ await this.page.getByTestId(API_KEYS_SELECTORS.addApiKeyButton).click();
191546
+ await this.page
191547
+ .getByTestId(COMMON_SELECTORS.paneBody)
191548
+ .getByTestId(COMMON_SELECTORS.customInputField("label"))
191549
+ .fill(apiKeyLabel);
191550
+ await this.page.getByTestId(COMMON_SELECTORS.radioInput("zapier")).check();
191551
+ await this.neetoPlaywrightUtilities.saveChanges({ isPane: true });
191552
+ await this.page
191553
+ .getByRole("row", { name: apiKeyLabel })
191554
+ .getByTestId(COMMON_SELECTORS.copyToClipboardButton)
191555
+ .click();
191556
+ return getClipboardContent(this.page);
191557
+ };
191539
191558
  if (ramda.isNil(process.env.ZAPIER_LOGIN_PASSWORD) ||
191540
191559
  ramda.isNil(process.env.ZAPIER_LOGIN_EMAIL) ||
191541
191560
  ramda.isNil(process.env.ZAP_ID)) {
@@ -192495,7 +192514,7 @@ class OrganizationPage {
192495
192514
  await this.page.getByTestId(COMMON_SELECTORS.checkbox).click();
192496
192515
  const profileSubmitButton = this.page.getByTestId(SIGNUP_SELECTORS.profileSubmitButton);
192497
192516
  await profileSubmitButton.click();
192498
- await test$1.expect(profileSubmitButton).toBeHidden({ timeout: 60000 });
192517
+ await test$1.expect(profileSubmitButton).toBeHidden({ timeout: 5 * 60000 });
192499
192518
  await this.neetoPlaywrightUtilities.waitForPageLoad();
192500
192519
  };
192501
192520
  this.loginAndOnboard = async ({ email, firstName, lastName, country, handleOnboarding, baseURL = process.env.BASE_URL, fetchOtpFromEmail, }) => {
@@ -194991,6 +195010,8 @@ exports.generateRandomBypassEmail = generateRandomBypassEmail;
194991
195010
  exports.generateRandomFile = generateRandomFile;
194992
195011
  exports.generateStagingData = generateStagingData;
194993
195012
  exports.getByDataQA = getByDataQA;
195013
+ exports.getClipboardContent = getClipboardContent;
195014
+ exports.getGlobalUserProps = getGlobalUserProps;
194994
195015
  exports.getGlobalUserState = getGlobalUserState;
194995
195016
  exports.getImagePathAndName = getImagePathAndName;
194996
195017
  exports.getListCount = getListCount;