@bigbinary/neeto-playwright-commons 1.9.31 → 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 +41 -1
- package/index.cjs.js.map +1 -1
- package/index.d.ts +20 -1
- package/index.js +39 -2
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -143,6 +143,9 @@ const CREDENTIALS = {
|
|
|
143
143
|
const OTP_EMAIL_PATTERN = "is your login code";
|
|
144
144
|
const SLACK_DEFAULT_CHANNEL = "general";
|
|
145
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 };
|
|
146
149
|
|
|
147
150
|
/* eslint-disable playwright/no-skipped-test */
|
|
148
151
|
const execCommand = (command) => child_process.execSync(command)
|
|
@@ -3580,7 +3583,10 @@ class CustomCommands {
|
|
|
3580
3583
|
await test$1.expect(this.page.getByTestId(selectMenu)).toBeVisible({
|
|
3581
3584
|
timeout: options.visibilityTimeout,
|
|
3582
3585
|
});
|
|
3583
|
-
await this.page
|
|
3586
|
+
await this.page
|
|
3587
|
+
.getByTestId(selectMenu)
|
|
3588
|
+
.getByText(value, { exact: true })
|
|
3589
|
+
.click();
|
|
3584
3590
|
await test$1.expect(this.page.getByTestId(selectValueContainer)).toContainText(value, { timeout: options.textAssertionTimeout });
|
|
3585
3591
|
}).toPass({ timeout: options.retryTimeout });
|
|
3586
3592
|
};
|
|
@@ -148623,6 +148629,37 @@ const filterUtils = {
|
|
|
148623
148629
|
clearFiltersFromActionBlock,
|
|
148624
148630
|
};
|
|
148625
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
|
+
|
|
148626
148663
|
var main$2 = {exports: {}};
|
|
148627
148664
|
|
|
148628
148665
|
var name = "dotenv";
|
|
@@ -149294,11 +149331,13 @@ exports.NEETO_ROUTES = NEETO_ROUTES;
|
|
|
149294
149331
|
exports.NEETO_TEXT_MODIFIER_SELECTORS = NEETO_TEXT_MODIFIER_SELECTORS;
|
|
149295
149332
|
exports.OTP_EMAIL_PATTERN = OTP_EMAIL_PATTERN;
|
|
149296
149333
|
exports.OrganizationPage = OrganizationPage;
|
|
149334
|
+
exports.PLURAL = PLURAL;
|
|
149297
149335
|
exports.PROFILE_SECTION_SELECTORS = PROFILE_SECTION_SELECTORS;
|
|
149298
149336
|
exports.PROJECT_TRANSLATIONS_PATH = PROJECT_TRANSLATIONS_PATH;
|
|
149299
149337
|
exports.ROLES_SELECTORS = ROLES_SELECTORS;
|
|
149300
149338
|
exports.ROUTES = ROUTES;
|
|
149301
149339
|
exports.SIGNUP_SELECTORS = SIGNUP_SELECTORS;
|
|
149340
|
+
exports.SINGULAR = SINGULAR;
|
|
149302
149341
|
exports.SLACK_DATA_QA_SELECTORS = SLACK_DATA_QA_SELECTORS;
|
|
149303
149342
|
exports.SLACK_DEFAULT_CHANNEL = SLACK_DEFAULT_CHANNEL;
|
|
149304
149343
|
exports.SLACK_SELECTORS = SLACK_SELECTORS;
|
|
@@ -149325,6 +149364,7 @@ exports.basicHTMLContent = basicHTMLContent;
|
|
|
149325
149364
|
exports.clearCredentials = clearCredentials;
|
|
149326
149365
|
exports.commands = commands;
|
|
149327
149366
|
exports.cpuThrottlingUsingCDP = cpuThrottlingUsingCDP;
|
|
149367
|
+
exports.currencyUtils = currencyUtils;
|
|
149328
149368
|
exports.decodeQRCodeFromFile = decodeQRCodeFromFile;
|
|
149329
149369
|
exports.definePlaywrightConfig = definePlaywrightConfig;
|
|
149330
149370
|
exports.executeWithThrottledResources = executeWithThrottledResources;
|