@bigbinary/neeto-playwright-commons 3.1.4 → 3.1.6
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 +18 -13
- package/index.cjs.js.map +1 -1
- package/index.js +18 -13
- package/index.js.map +1 -1
- package/package.json +3 -3
package/index.cjs.js
CHANGED
|
@@ -5209,9 +5209,7 @@ const skipTest = {
|
|
|
5209
5209
|
forAllExceptStagingEnv: () => test.skip(process.env.TEST_ENV !== ENVIRONMENT.staging),
|
|
5210
5210
|
forNonNightlyRun: () => {
|
|
5211
5211
|
const currentBranch = execCommand("git rev-parse --abbrev-ref HEAD");
|
|
5212
|
-
const isNightlyRun = currentBranch === "main" &&
|
|
5213
|
-
IS_STAGING_ENV &&
|
|
5214
|
-
IS_CI;
|
|
5212
|
+
const isNightlyRun = currentBranch === "main" && IS_STAGING_ENV && IS_CI;
|
|
5215
5213
|
return test.skip(ramda.not(isNightlyRun), "Run test only in playwright-nightly");
|
|
5216
5214
|
},
|
|
5217
5215
|
ifNotWithinAllowedNightlyHours: ({ reason, allowedNightlyRunHours = [0, 6, 12, 18], }) => {
|
|
@@ -5275,18 +5273,25 @@ const createTextareaAndEvaluateCopiedText = async (page) => {
|
|
|
5275
5273
|
}
|
|
5276
5274
|
};
|
|
5277
5275
|
const getClipboardContent = async (page) => {
|
|
5278
|
-
|
|
5279
|
-
|
|
5280
|
-
|
|
5281
|
-
|
|
5282
|
-
|
|
5283
|
-
|
|
5284
|
-
|
|
5285
|
-
|
|
5276
|
+
const isWebkit = page.context().browser()?.browserType().name() === "webkit";
|
|
5277
|
+
if (!isWebkit) {
|
|
5278
|
+
// Attempt 1: Native Clipboard API
|
|
5279
|
+
const clipboardText = await page.evaluate(async () => {
|
|
5280
|
+
if (!navigator.clipboard?.readText)
|
|
5281
|
+
return null;
|
|
5282
|
+
return await navigator.clipboard.readText();
|
|
5283
|
+
});
|
|
5284
|
+
if (ramda.isNotNil(clipboardText))
|
|
5285
|
+
return clipboardText;
|
|
5286
|
+
}
|
|
5286
5287
|
// Attempt 2: Keyboard paste fallback
|
|
5287
5288
|
return createTextareaAndEvaluateCopiedText(page);
|
|
5288
5289
|
};
|
|
5289
|
-
const grantClipboardPermissions = (context) =>
|
|
5290
|
+
const grantClipboardPermissions = async (context) => {
|
|
5291
|
+
if (context.browser()?.browserType().name() === "webkit")
|
|
5292
|
+
return;
|
|
5293
|
+
await context.grantPermissions(["clipboard-read", "clipboard-write"]);
|
|
5294
|
+
};
|
|
5290
5295
|
const getFullUrl = (path) => shouldSkipCustomDomainSetup() ? path : `${process.env.BASE_URL}${path}`;
|
|
5291
5296
|
const globalShortcuts = (t) => [
|
|
5292
5297
|
{
|
|
@@ -121365,7 +121370,7 @@ class AuditLogsPage {
|
|
|
121365
121370
|
this.currentDate = dayjs().tz("Asia/Kolkata").format("MMM D, YYYY");
|
|
121366
121371
|
this.messageBuilders = {
|
|
121367
121372
|
[ACTIONS.inviteUsers]: (data) => `${this.admin} added ${data.emails.join(", ").toLowerCase()} to Neeto${this.product}.`,
|
|
121368
|
-
[ACTIONS.updatedUser]: (data) => `${this.admin} changed ${data.emails[
|
|
121373
|
+
[ACTIONS.updatedUser]: (data) => `${this.admin} changed ${data.emails[0].toLowerCase()}'s email from ${data.emails[0].toLowerCase()} to ${data.emails[1]} on Neeto${this.product}.`,
|
|
121369
121374
|
[ACTIONS.removedUser]: (data) => `${this.admin} removed ${data.emails[0].toLowerCase()} from Neeto${this.product}.`,
|
|
121370
121375
|
[ACTIONS.createdRole]: (data) => `${this.admin} created ${data.roleName} role on Neeto${this.product}.`,
|
|
121371
121376
|
[ACTIONS.addedPermission]: (data) => `${this.admin} added ${data.permissions.join(", ").toLowerCase()} permission to ${data.roleName} role on Neeto${this.product}.`,
|