@bigbinary/neeto-playwright-commons 1.26.32 → 1.26.34

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
@@ -496,6 +496,30 @@ class ThankYouApi {
496
496
  }
497
497
  }
498
498
 
499
+ const NEETO_TOWER_BASE_URL = "https://ops.neetotower.com/";
500
+ const DNS_RECORDS_BASE_URL = `${NEETO_TOWER_BASE_URL}api/v1/public/automation_tests/dns_records`;
501
+ class NeetoTowerApi {
502
+ constructor(neetoPlaywrightUtilities) {
503
+ this.neetoPlaywrightUtilities = neetoPlaywrightUtilities;
504
+ this.apiRequest = ({ method, dnsDomainId = "", body, }) => this.neetoPlaywrightUtilities.apiRequest({
505
+ url: `${DNS_RECORDS_BASE_URL}${dnsDomainId ? `/${dnsDomainId}` : ""}`,
506
+ headers: { "X-API-KEY": this.apiKey },
507
+ method,
508
+ body,
509
+ });
510
+ this.createRecord = ({ hostname, value }) => this.apiRequest({
511
+ method: "post",
512
+ body: { name: hostname, type: "TXT", content: value },
513
+ });
514
+ this.getRecords = () => this.apiRequest({ method: "get" });
515
+ this.deleteRecord = (dnsDomainId) => this.apiRequest({ method: "delete", dnsDomainId });
516
+ if (!process.env.NEETO_TOWER_API_KEY) {
517
+ throw new Error("NEETO_TOWER_API_KEY is not set");
518
+ }
519
+ this.apiKey = process.env.NEETO_TOWER_API_KEY;
520
+ }
521
+ }
522
+
499
523
  class SlackApi {
500
524
  constructor(neetoPlaywrightUtilities) {
501
525
  this.neetoPlaywrightUtilities = neetoPlaywrightUtilities;
@@ -118860,13 +118884,18 @@ class TeamMembers {
118860
118884
  const fillCredentialsAndSubmit = async ({ page, loginPath, email = CREDENTIALS.email, }) => {
118861
118885
  loginPath && (await page.goto(loginPath, { timeout: 30000 }));
118862
118886
  await page.waitForLoadState("load", { timeout: 35000 });
118863
- await page.getByTestId(LOGIN_SELECTORS.emailTextField).fill(email);
118887
+ await test.expect(page.getByTestId(COMMON_SELECTORS.pageLoader)).toBeHidden({
118888
+ timeout: 30000,
118889
+ });
118890
+ const emailInput = page.getByTestId(LOGIN_SELECTORS.emailTextField);
118891
+ await emailInput.waitFor({ state: "visible", timeout: 30000 });
118892
+ await emailInput.fill(email);
118864
118893
  await page
118865
118894
  .getByTestId(LOGIN_SELECTORS.passwordTextField)
118866
118895
  .fill(CREDENTIALS.password);
118867
118896
  const submitButton = page.getByTestId(LOGIN_SELECTORS.submitButton);
118868
118897
  await submitButton.click();
118869
- await test.expect(submitButton).toBeHidden({ timeout: 15000 });
118898
+ await test.expect(submitButton).toBeHidden({ timeout: 20000 });
118870
118899
  await test.expect(page.getByTestId(COMMON_SELECTORS.floatingActionMenuButton)).toBeVisible({ timeout: 60000 });
118871
118900
  };
118872
118901
  const loginWithoutSSO = async ({ page, loginPath = "/", email = CREDENTIALS.email, }) => {
@@ -125327,6 +125356,7 @@ exports.NEETO_IMAGE_UPLOADER_SELECTORS = NEETO_IMAGE_UPLOADER_SELECTORS;
125327
125356
  exports.NEETO_ROUTES = NEETO_ROUTES;
125328
125357
  exports.NEETO_SEO_SELECTORS = NEETO_SEO_SELECTORS;
125329
125358
  exports.NEETO_TEXT_MODIFIER_SELECTORS = NEETO_TEXT_MODIFIER_SELECTORS;
125359
+ exports.NeetoTowerApi = NeetoTowerApi;
125330
125360
  exports.ONBOARDING_SELECTORS = ONBOARDING_SELECTORS;
125331
125361
  exports.ORGANIZATION_TEXTS = ORGANIZATION_TEXTS;
125332
125362
  exports.OTP_EMAIL_PATTERN = OTP_EMAIL_PATTERN;