@bigbinary/neeto-playwright-commons 1.9.30 → 1.9.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 +95 -50
- package/index.cjs.js.map +1 -1
- package/index.d.ts +25 -1
- package/index.js +92 -50
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var test$1 = require('@playwright/test');
|
|
6
5
|
var child_process = require('child_process');
|
|
7
6
|
var fs$d = require('fs');
|
|
7
|
+
var test$1 = require('@playwright/test');
|
|
8
8
|
var ramda = require('ramda');
|
|
9
9
|
var require$$0$2 = require('util');
|
|
10
10
|
var Path = require('path');
|
|
@@ -49,9 +49,9 @@ function _interopNamespace(e) {
|
|
|
49
49
|
return Object.freeze(n);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
var test__default = /*#__PURE__*/_interopDefaultLegacy(test$1);
|
|
53
52
|
var fs__namespace = /*#__PURE__*/_interopNamespace(fs$d);
|
|
54
53
|
var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs$d);
|
|
54
|
+
var test__default = /*#__PURE__*/_interopDefaultLegacy(test$1);
|
|
55
55
|
var require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0$2);
|
|
56
56
|
var Path__default = /*#__PURE__*/_interopDefaultLegacy(Path);
|
|
57
57
|
var Path__namespace = /*#__PURE__*/_interopNamespace(Path);
|
|
@@ -126,53 +126,6 @@ const NEETO_ROUTES = {
|
|
|
126
126
|
imageUploader: "/neeto_image_uploader_engine",
|
|
127
127
|
};
|
|
128
128
|
|
|
129
|
-
const NEETO_FILTERS_SELECTORS = {
|
|
130
|
-
emailSelectContainer: "email-select-container-wrapper",
|
|
131
|
-
filterPaneHeading: "neeto-filters-pane-header",
|
|
132
|
-
neetoFiltersEmailBlock: "neeto-filters-email-block",
|
|
133
|
-
neetoFiltersRoleBlock: "neeto-filters-role-block",
|
|
134
|
-
neetoFiltersBarClearButton: "neeto-filters-bar-clear-btn",
|
|
135
|
-
neetoFiltersNameFilterField: "neeto-filters-name-filter",
|
|
136
|
-
neetoFilterNameBlock: "neeto-filters-name-block",
|
|
137
|
-
roleSelectContainer: "role-select-container-wrapper",
|
|
138
|
-
filterButton: "neeto-filters-toggle-btn",
|
|
139
|
-
filtersClearButton: "neeto-filters-clear-btn",
|
|
140
|
-
filterDoneButton: "neeto-filters-done-btn",
|
|
141
|
-
filteredMembersCount: "ntm-filtered-members-count",
|
|
142
|
-
allMenubarBlock: "ntm-members-menubar-all-block",
|
|
143
|
-
filtersEmailFilter: "neeto-filters-email-filter",
|
|
144
|
-
paneModalCrossIcon: "neeto-filters-close-button",
|
|
145
|
-
searchTermBlock: "neeto-filters-search-term-block",
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
const NEETO_IMAGE_UPLOADER_SELECTORS = {
|
|
149
|
-
imageUploaderWrapper: "image-uploader-wrapper",
|
|
150
|
-
browseText: "neeto-image-uploader-browse-text",
|
|
151
|
-
fileInput: "neeto-image-uploader-file-input",
|
|
152
|
-
uploadedImage: "uploaded-image",
|
|
153
|
-
uploadNewAsset: "upload-new-asset",
|
|
154
|
-
basicImageUploaderRemoveButton: "basic-image-uploader-remove-button",
|
|
155
|
-
removeButton: "image-uploader-remove-button",
|
|
156
|
-
openImageLibraryButton: "image-uploader-open-image-library-button",
|
|
157
|
-
openAssetLibraryButton: "open-asset-library-button",
|
|
158
|
-
imageEditorBackButton: "image-editor-back-button",
|
|
159
|
-
aspectRatioWidthInput: "aspect-ratio-width-input",
|
|
160
|
-
aspectRatioHeightInput: "aspect-ratio-height-input",
|
|
161
|
-
cropSubmitButton: "neeto-image-uploader-crop-submit-button",
|
|
162
|
-
restrictionMessage: "neeto-image-uploader-restriction-message",
|
|
163
|
-
progressBar: "neeto-image-uploader-progress-bar",
|
|
164
|
-
myImagesTab: "neeto-image-uploader-my-images-tab",
|
|
165
|
-
unsplashTab: "neeto-image-uploader-unsplash-tab",
|
|
166
|
-
nthLibraryImage: (index) => `niu-library-image-${index}`,
|
|
167
|
-
nthUnsplashImage: (index) => `niu-unsplash-image-${index}`,
|
|
168
|
-
unsplashSearchInput: "niu-unsplash-image-picker-search-input",
|
|
169
|
-
imageEditorUploadedImage: "image-editor-uploaded-image",
|
|
170
|
-
selectOriginalImageSwitch: "select-original-image-switch",
|
|
171
|
-
lockAspectRatioSwitch: "lock-aspect-ratio-switch",
|
|
172
|
-
widthInputField: "width-input-field",
|
|
173
|
-
heightInputField: "height-input-field",
|
|
174
|
-
};
|
|
175
|
-
|
|
176
129
|
const ENVIRONMENT = {
|
|
177
130
|
development: "development",
|
|
178
131
|
staging: "staging",
|
|
@@ -190,6 +143,9 @@ const CREDENTIALS = {
|
|
|
190
143
|
const OTP_EMAIL_PATTERN = "is your login code";
|
|
191
144
|
const SLACK_DEFAULT_CHANNEL = "general";
|
|
192
145
|
const ZAPIER_TEST_EMAIL = (product) => `neeto-${product}-zapier-test@${process.env.INTEGRATION_MAILOSAUR_SERVER_ID}.mailosaur.net`;
|
|
146
|
+
// constants for translation
|
|
147
|
+
const SINGULAR = { count: 1 };
|
|
148
|
+
const PLURAL = { count: 2 };
|
|
193
149
|
|
|
194
150
|
/* eslint-disable playwright/no-skipped-test */
|
|
195
151
|
const execCommand = (command) => child_process.execSync(command)
|
|
@@ -289,6 +245,54 @@ const getListCount = async ({ page, countSelector, }) => {
|
|
|
289
245
|
return Number(countText === null || countText === void 0 ? void 0 : countText.trim().split(" ")[0]);
|
|
290
246
|
};
|
|
291
247
|
|
|
248
|
+
const NEETO_FILTERS_SELECTORS = {
|
|
249
|
+
emailSelectContainer: "email-select-container-wrapper",
|
|
250
|
+
filterPaneHeading: "neeto-filters-pane-header",
|
|
251
|
+
neetoFiltersEmailBlock: "neeto-filters-email-block",
|
|
252
|
+
neetoFiltersRoleBlock: "neeto-filters-role-block",
|
|
253
|
+
neetoFiltersBarClearButton: "neeto-filters-bar-clear-btn",
|
|
254
|
+
neetoFiltersNameFilterField: "neeto-filters-name-filter",
|
|
255
|
+
neetoFilterNameBlock: "neeto-filters-name-block",
|
|
256
|
+
roleSelectContainer: "role-select-container-wrapper",
|
|
257
|
+
filterButton: "neeto-filters-toggle-btn",
|
|
258
|
+
filtersClearButton: "neeto-filters-clear-btn",
|
|
259
|
+
filterDoneButton: "neeto-filters-done-btn",
|
|
260
|
+
filteredMembersCount: "ntm-filtered-members-count",
|
|
261
|
+
allMenubarBlock: "ntm-members-menubar-all-block",
|
|
262
|
+
filtersEmailFilter: "neeto-filters-email-filter",
|
|
263
|
+
paneModalCrossIcon: "neeto-filters-close-button",
|
|
264
|
+
searchTermBlock: "neeto-filters-search-term-block",
|
|
265
|
+
neetoFiltersFilter: (filterName) => `neeto-filters-${hyphenize(filterName)}-filter`,
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
const NEETO_IMAGE_UPLOADER_SELECTORS = {
|
|
269
|
+
imageUploaderWrapper: "image-uploader-wrapper",
|
|
270
|
+
browseText: "neeto-image-uploader-browse-text",
|
|
271
|
+
fileInput: "neeto-image-uploader-file-input",
|
|
272
|
+
uploadedImage: "uploaded-image",
|
|
273
|
+
uploadNewAsset: "upload-new-asset",
|
|
274
|
+
basicImageUploaderRemoveButton: "basic-image-uploader-remove-button",
|
|
275
|
+
removeButton: "image-uploader-remove-button",
|
|
276
|
+
openImageLibraryButton: "image-uploader-open-image-library-button",
|
|
277
|
+
openAssetLibraryButton: "open-asset-library-button",
|
|
278
|
+
imageEditorBackButton: "image-editor-back-button",
|
|
279
|
+
aspectRatioWidthInput: "aspect-ratio-width-input",
|
|
280
|
+
aspectRatioHeightInput: "aspect-ratio-height-input",
|
|
281
|
+
cropSubmitButton: "neeto-image-uploader-crop-submit-button",
|
|
282
|
+
restrictionMessage: "neeto-image-uploader-restriction-message",
|
|
283
|
+
progressBar: "neeto-image-uploader-progress-bar",
|
|
284
|
+
myImagesTab: "neeto-image-uploader-my-images-tab",
|
|
285
|
+
unsplashTab: "neeto-image-uploader-unsplash-tab",
|
|
286
|
+
nthLibraryImage: (index) => `niu-library-image-${index}`,
|
|
287
|
+
nthUnsplashImage: (index) => `niu-unsplash-image-${index}`,
|
|
288
|
+
unsplashSearchInput: "niu-unsplash-image-picker-search-input",
|
|
289
|
+
imageEditorUploadedImage: "image-editor-uploaded-image",
|
|
290
|
+
selectOriginalImageSwitch: "select-original-image-switch",
|
|
291
|
+
lockAspectRatioSwitch: "lock-aspect-ratio-switch",
|
|
292
|
+
widthInputField: "width-input-field",
|
|
293
|
+
heightInputField: "height-input-field",
|
|
294
|
+
};
|
|
295
|
+
|
|
292
296
|
const COMMON_SELECTORS = {
|
|
293
297
|
emailInputError: "email-input-error",
|
|
294
298
|
pane: "pane-wrapper",
|
|
@@ -317,6 +321,8 @@ const COMMON_SELECTORS = {
|
|
|
317
321
|
toastIcon: ".Toastify__toast-icon",
|
|
318
322
|
paneModalCrossIcon: "pane-close-button",
|
|
319
323
|
inputField: "nui-input-field",
|
|
324
|
+
alertBox: "alert-box",
|
|
325
|
+
tableContainer: "table-container",
|
|
320
326
|
alertConfirmationText: "alert-confirmation-text",
|
|
321
327
|
alertCancelButton: "alert-cancel-button",
|
|
322
328
|
alertModalCrossIcon: "modal-close-button",
|
|
@@ -365,6 +371,8 @@ const COMMON_SELECTORS = {
|
|
|
365
371
|
columnsSearchInput: "neeto-ui-columns-search",
|
|
366
372
|
errorToastIcon: "error-toast-icon",
|
|
367
373
|
nuiRadioLabel: "nui-radio-label",
|
|
374
|
+
submitButton: "submit-button",
|
|
375
|
+
tableRow: ".ant-table-row",
|
|
368
376
|
};
|
|
369
377
|
|
|
370
378
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
@@ -3575,7 +3583,10 @@ class CustomCommands {
|
|
|
3575
3583
|
await test$1.expect(this.page.getByTestId(selectMenu)).toBeVisible({
|
|
3576
3584
|
timeout: options.visibilityTimeout,
|
|
3577
3585
|
});
|
|
3578
|
-
await this.page
|
|
3586
|
+
await this.page
|
|
3587
|
+
.getByTestId(selectMenu)
|
|
3588
|
+
.getByText(value, { exact: true })
|
|
3589
|
+
.click();
|
|
3579
3590
|
await test$1.expect(this.page.getByTestId(selectValueContainer)).toContainText(value, { timeout: options.textAssertionTimeout });
|
|
3580
3591
|
}).toPass({ timeout: options.retryTimeout });
|
|
3581
3592
|
};
|
|
@@ -148618,6 +148629,37 @@ const filterUtils = {
|
|
|
148618
148629
|
clearFiltersFromActionBlock,
|
|
148619
148630
|
};
|
|
148620
148631
|
|
|
148632
|
+
const getAmountWithSymbol = (amount, options) => {
|
|
148633
|
+
const formatter = new Intl.NumberFormat(dayjs__default["default"].locale(), {
|
|
148634
|
+
...options,
|
|
148635
|
+
});
|
|
148636
|
+
return formatter.format(Number(amount));
|
|
148637
|
+
};
|
|
148638
|
+
const currencyFormat = {
|
|
148639
|
+
withAmount: (amount, options = { minimumFractionDigits: 2 }) => getAmountWithSymbol(amount, {
|
|
148640
|
+
style: undefined,
|
|
148641
|
+
...options,
|
|
148642
|
+
}), // 1000, { maximumFractionDigits: 1 } => 1,000.0
|
|
148643
|
+
withSymbol: (amount, currency, options) => getAmountWithSymbol(amount, {
|
|
148644
|
+
...options,
|
|
148645
|
+
style: "currency",
|
|
148646
|
+
currency,
|
|
148647
|
+
}), // 1000, "INR", { maximumFractionDigits: 0 } => ₹1,000
|
|
148648
|
+
withCode: (amount, currency, options = { minimumFractionDigits: 2 }) => `${getAmountWithSymbol(amount, {
|
|
148649
|
+
...options,
|
|
148650
|
+
style: undefined,
|
|
148651
|
+
})} ${currency}`, // 1000, "USD" => 1,000.00 USD
|
|
148652
|
+
withSymbolAndCode: (amount, currency, options) => `${getAmountWithSymbol(amount, {
|
|
148653
|
+
...options,
|
|
148654
|
+
style: "currency",
|
|
148655
|
+
currency,
|
|
148656
|
+
})} ${currency}`, // 1000, "INR", { maximumFractionDigits: 0 } => ₹1,000 INR
|
|
148657
|
+
};
|
|
148658
|
+
const currencyUtils = {
|
|
148659
|
+
getAmountWithSymbol,
|
|
148660
|
+
currencyFormat,
|
|
148661
|
+
};
|
|
148662
|
+
|
|
148621
148663
|
var main$2 = {exports: {}};
|
|
148622
148664
|
|
|
148623
148665
|
var name = "dotenv";
|
|
@@ -149289,11 +149331,13 @@ exports.NEETO_ROUTES = NEETO_ROUTES;
|
|
|
149289
149331
|
exports.NEETO_TEXT_MODIFIER_SELECTORS = NEETO_TEXT_MODIFIER_SELECTORS;
|
|
149290
149332
|
exports.OTP_EMAIL_PATTERN = OTP_EMAIL_PATTERN;
|
|
149291
149333
|
exports.OrganizationPage = OrganizationPage;
|
|
149334
|
+
exports.PLURAL = PLURAL;
|
|
149292
149335
|
exports.PROFILE_SECTION_SELECTORS = PROFILE_SECTION_SELECTORS;
|
|
149293
149336
|
exports.PROJECT_TRANSLATIONS_PATH = PROJECT_TRANSLATIONS_PATH;
|
|
149294
149337
|
exports.ROLES_SELECTORS = ROLES_SELECTORS;
|
|
149295
149338
|
exports.ROUTES = ROUTES;
|
|
149296
149339
|
exports.SIGNUP_SELECTORS = SIGNUP_SELECTORS;
|
|
149340
|
+
exports.SINGULAR = SINGULAR;
|
|
149297
149341
|
exports.SLACK_DATA_QA_SELECTORS = SLACK_DATA_QA_SELECTORS;
|
|
149298
149342
|
exports.SLACK_DEFAULT_CHANNEL = SLACK_DEFAULT_CHANNEL;
|
|
149299
149343
|
exports.SLACK_SELECTORS = SLACK_SELECTORS;
|
|
@@ -149320,6 +149364,7 @@ exports.basicHTMLContent = basicHTMLContent;
|
|
|
149320
149364
|
exports.clearCredentials = clearCredentials;
|
|
149321
149365
|
exports.commands = commands;
|
|
149322
149366
|
exports.cpuThrottlingUsingCDP = cpuThrottlingUsingCDP;
|
|
149367
|
+
exports.currencyUtils = currencyUtils;
|
|
149323
149368
|
exports.decodeQRCodeFromFile = decodeQRCodeFromFile;
|
|
149324
149369
|
exports.definePlaywrightConfig = definePlaywrightConfig;
|
|
149325
149370
|
exports.executeWithThrottledResources = executeWithThrottledResources;
|