@bigbinary/neeto-playwright-commons 1.26.31 → 1.26.33

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
@@ -21,6 +21,7 @@ var require$$0$9 = require('assert');
21
21
  var require$$0$a = require('tty');
22
22
  var stealth$1 = require('puppeteer-extra-plugin-stealth');
23
23
  var require$$1$4 = require('events');
24
+ var customParseFormat = require('dayjs/plugin/customParseFormat');
24
25
  var timezone = require('dayjs/plugin/timezone');
25
26
  var utc = require('dayjs/plugin/utc');
26
27
  var https = require('https');
@@ -454,6 +455,16 @@ const EXPORT_FILE_TYPES = {
454
455
  excel: "excel",
455
456
  csv: "csv",
456
457
  };
458
+ const CALENDAR_LABELS = {
459
+ month: "month panel",
460
+ year: "year panel",
461
+ };
462
+ const DATE_FORMATS = {
463
+ month: "MMM",
464
+ year: "YYYY",
465
+ date: "DD/MM/YYYY",
466
+ calendarDate: "YYYY-MM-DD",
467
+ };
457
468
 
458
469
  const THANK_YOU_URL = "/neeto_thank_you/thank_you_configurations";
459
470
  class ThankYouApi {
@@ -5746,6 +5757,7 @@ const DATE_PICKER_SELECTORS = {
5746
5757
  timePicker: "time-picker",
5747
5758
  nextYearButton: "next-year-button",
5748
5759
  prevYearButton: "prev-year-button",
5760
+ selectedDateInCalendarClass: "ant-picker-cell-selected",
5749
5761
  };
5750
5762
 
5751
5763
  const ONBOARDING_SELECTORS = {
@@ -118848,13 +118860,18 @@ class TeamMembers {
118848
118860
  const fillCredentialsAndSubmit = async ({ page, loginPath, email = CREDENTIALS.email, }) => {
118849
118861
  loginPath && (await page.goto(loginPath, { timeout: 30000 }));
118850
118862
  await page.waitForLoadState("load", { timeout: 35000 });
118851
- await page.getByTestId(LOGIN_SELECTORS.emailTextField).fill(email);
118863
+ await test.expect(page.getByTestId(COMMON_SELECTORS.pageLoader)).toBeHidden({
118864
+ timeout: 30000,
118865
+ });
118866
+ const emailInput = page.getByTestId(LOGIN_SELECTORS.emailTextField);
118867
+ await emailInput.waitFor({ state: "visible", timeout: 30000 });
118868
+ await emailInput.fill(email);
118852
118869
  await page
118853
118870
  .getByTestId(LOGIN_SELECTORS.passwordTextField)
118854
118871
  .fill(CREDENTIALS.password);
118855
118872
  const submitButton = page.getByTestId(LOGIN_SELECTORS.submitButton);
118856
118873
  await submitButton.click();
118857
- await test.expect(submitButton).toBeHidden({ timeout: 15000 });
118874
+ await test.expect(submitButton).toBeHidden({ timeout: 20000 });
118858
118875
  await test.expect(page.getByTestId(COMMON_SELECTORS.floatingActionMenuButton)).toBeVisible({ timeout: 60000 });
118859
118876
  };
118860
118877
  const loginWithoutSSO = async ({ page, loginPath = "/", email = CREDENTIALS.email, }) => {
@@ -119192,6 +119209,14 @@ class ApiKeysPage {
119192
119209
  await expiryDateInput.click();
119193
119210
  await test.expect(this.page.getByLabel(DATE_TEXTS.nextYear, { exact: true })).toBeVisible();
119194
119211
  await expiryDateInput.pressSequentially(expiryDate, { delay: 250 });
119212
+ dayjs.extend(customParseFormat);
119213
+ const parsedExpiryDate = dayjs(expiryDate, DATE_FORMATS.date);
119214
+ await Promise.all([
119215
+ test.expect(expiryDateInput).toHaveValue(expiryDate),
119216
+ test.expect(this.page.getByRole("button", { name: CALENDAR_LABELS.month })).toHaveText(parsedExpiryDate.format(DATE_FORMATS.month)),
119217
+ test.expect(this.page.getByRole("button", { name: CALENDAR_LABELS.year })).toHaveText(parsedExpiryDate.format(DATE_FORMATS.year)),
119218
+ test.expect(this.page.getByTitle(parsedExpiryDate.format(DATE_FORMATS.calendarDate))).toHaveClass(RegExp(DATE_PICKER_SELECTORS.selectedDateInCalendarClass)),
119219
+ ]);
119195
119220
  await this.page.keyboard.press("Enter");
119196
119221
  await test.expect(this.page.getByLabel(DATE_TEXTS.nextYear, { exact: true })).toBeHidden();
119197
119222
  }
@@ -125233,6 +125258,7 @@ exports.ApiKeysApi = ApiKeysApi;
125233
125258
  exports.ApiKeysPage = ApiKeysPage;
125234
125259
  exports.AuditLogsPage = AuditLogsPage;
125235
125260
  exports.BASE_URL = BASE_URL;
125261
+ exports.CALENDAR_LABELS = CALENDAR_LABELS;
125236
125262
  exports.CERTIFICATE_LIMIT_EXCEEDED_MESSAGE = CERTIFICATE_LIMIT_EXCEEDED_MESSAGE;
125237
125263
  exports.CERTIFICATE_LIMIT_EXCEEDED_REGEXP = CERTIFICATE_LIMIT_EXCEEDED_REGEXP;
125238
125264
  exports.CHANGELOG_WIDGET_SELECTORS = CHANGELOG_WIDGET_SELECTORS;
@@ -125249,6 +125275,7 @@ exports.CUSTOM_DOMAIN_SUFFIX = CUSTOM_DOMAIN_SUFFIX;
125249
125275
  exports.CustomCommands = CustomCommands;
125250
125276
  exports.CustomDomainApi = CustomDomainApi;
125251
125277
  exports.CustomDomainPage = CustomDomainPage;
125278
+ exports.DATE_FORMATS = DATE_FORMATS;
125252
125279
  exports.DATE_PICKER_SELECTORS = DATE_PICKER_SELECTORS;
125253
125280
  exports.DATE_RANGES = DATE_RANGES;
125254
125281
  exports.DATE_TEXTS = DATE_TEXTS;