@bigbinary/neeto-playwright-commons 1.26.31 → 1.26.32
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 +22 -0
- package/index.cjs.js.map +1 -1
- package/index.d.ts +12 -1
- package/index.js +21 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
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 = {
|
|
@@ -119192,6 +119204,14 @@ class ApiKeysPage {
|
|
|
119192
119204
|
await expiryDateInput.click();
|
|
119193
119205
|
await test.expect(this.page.getByLabel(DATE_TEXTS.nextYear, { exact: true })).toBeVisible();
|
|
119194
119206
|
await expiryDateInput.pressSequentially(expiryDate, { delay: 250 });
|
|
119207
|
+
dayjs.extend(customParseFormat);
|
|
119208
|
+
const parsedExpiryDate = dayjs(expiryDate, DATE_FORMATS.date);
|
|
119209
|
+
await Promise.all([
|
|
119210
|
+
test.expect(expiryDateInput).toHaveValue(expiryDate),
|
|
119211
|
+
test.expect(this.page.getByRole("button", { name: CALENDAR_LABELS.month })).toHaveText(parsedExpiryDate.format(DATE_FORMATS.month)),
|
|
119212
|
+
test.expect(this.page.getByRole("button", { name: CALENDAR_LABELS.year })).toHaveText(parsedExpiryDate.format(DATE_FORMATS.year)),
|
|
119213
|
+
test.expect(this.page.getByTitle(parsedExpiryDate.format(DATE_FORMATS.calendarDate))).toHaveClass(RegExp(DATE_PICKER_SELECTORS.selectedDateInCalendarClass)),
|
|
119214
|
+
]);
|
|
119195
119215
|
await this.page.keyboard.press("Enter");
|
|
119196
119216
|
await test.expect(this.page.getByLabel(DATE_TEXTS.nextYear, { exact: true })).toBeHidden();
|
|
119197
119217
|
}
|
|
@@ -125233,6 +125253,7 @@ exports.ApiKeysApi = ApiKeysApi;
|
|
|
125233
125253
|
exports.ApiKeysPage = ApiKeysPage;
|
|
125234
125254
|
exports.AuditLogsPage = AuditLogsPage;
|
|
125235
125255
|
exports.BASE_URL = BASE_URL;
|
|
125256
|
+
exports.CALENDAR_LABELS = CALENDAR_LABELS;
|
|
125236
125257
|
exports.CERTIFICATE_LIMIT_EXCEEDED_MESSAGE = CERTIFICATE_LIMIT_EXCEEDED_MESSAGE;
|
|
125237
125258
|
exports.CERTIFICATE_LIMIT_EXCEEDED_REGEXP = CERTIFICATE_LIMIT_EXCEEDED_REGEXP;
|
|
125238
125259
|
exports.CHANGELOG_WIDGET_SELECTORS = CHANGELOG_WIDGET_SELECTORS;
|
|
@@ -125249,6 +125270,7 @@ exports.CUSTOM_DOMAIN_SUFFIX = CUSTOM_DOMAIN_SUFFIX;
|
|
|
125249
125270
|
exports.CustomCommands = CustomCommands;
|
|
125250
125271
|
exports.CustomDomainApi = CustomDomainApi;
|
|
125251
125272
|
exports.CustomDomainPage = CustomDomainPage;
|
|
125273
|
+
exports.DATE_FORMATS = DATE_FORMATS;
|
|
125252
125274
|
exports.DATE_PICKER_SELECTORS = DATE_PICKER_SELECTORS;
|
|
125253
125275
|
exports.DATE_RANGES = DATE_RANGES;
|
|
125254
125276
|
exports.DATE_TEXTS = DATE_TEXTS;
|