@bigbinary/neeto-playwright-commons 4.1.13 → 4.1.14
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/README.md +20 -26
- package/index.d.ts +2 -2
- package/index.js +13 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# neeto-playwright-commons
|
|
2
2
|
|
|
3
|
-
A library that packages common boilerplate Playwright code necessary for all
|
|
4
|
-
neeto products.
|
|
3
|
+
A library that packages common boilerplate Playwright code necessary for all neeto products.
|
|
5
4
|
|
|
6
5
|
## Installing neeto-playwright-commons in a Playwright Project
|
|
7
6
|
|
|
@@ -13,21 +12,20 @@ Then, install the package using Yarn:
|
|
|
13
12
|
```bash
|
|
14
13
|
yarn add "@bigbinary/neeto-playwright-commons@latest"
|
|
15
14
|
```
|
|
16
|
-
If `neeto-playwright-commons` is already listed in `package.json` of Playwright project, simply install dependencies
|
|
15
|
+
If `neeto-playwright-commons` is already listed in `package.json` of Playwright project, simply install dependencies
|
|
16
|
+
with:
|
|
17
17
|
```bash
|
|
18
18
|
yarn install
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
## Dependencies
|
|
22
22
|
|
|
23
|
-
**neeto-playwright-commons** has some peer dependencies which can be installed
|
|
24
|
-
using the commands listed below:
|
|
23
|
+
**neeto-playwright-commons** has some peer dependencies which can be installed using the commands listed below:
|
|
25
24
|
|
|
26
25
|
### `neeto-cist`
|
|
27
26
|
|
|
28
|
-
A collection of common utility functions used across all our
|
|
29
|
-
[
|
|
30
|
-
[neetoCommons REPL](https://neeto-cist.neeto.com/).
|
|
27
|
+
A collection of common utility functions used across all our [neeto](https://www.neeto.com/) products. Try out the
|
|
28
|
+
utility functions live at [neetoCommons REPL](https://neeto-cist.neeto.com/).
|
|
31
29
|
|
|
32
30
|
```
|
|
33
31
|
yarn add @bigbinary/neeto-cist
|
|
@@ -57,8 +55,8 @@ yarn add nano-staged
|
|
|
57
55
|
|
|
58
56
|
### `dotenv-webpack`
|
|
59
57
|
|
|
60
|
-
`dotenv-webpack` is a secure webpack plugin that supports
|
|
61
|
-
|
|
58
|
+
`dotenv-webpack` is a secure webpack plugin that supports [dotenv](https://www.npmjs.com/package/dotenv) and other
|
|
59
|
+
environment variables.
|
|
62
60
|
|
|
63
61
|
```
|
|
64
62
|
yarn add dotenv-webpack
|
|
@@ -66,8 +64,7 @@ yarn add dotenv-webpack
|
|
|
66
64
|
|
|
67
65
|
### `dayjs`
|
|
68
66
|
|
|
69
|
-
Dayjs is a JavaScript library that parses, validates, manipulates, and displays
|
|
70
|
-
dates and times.
|
|
67
|
+
Dayjs is a JavaScript library that parses, validates, manipulates, and displays dates and times.
|
|
71
68
|
|
|
72
69
|
```
|
|
73
70
|
yarn add dayjs
|
|
@@ -75,8 +72,8 @@ yarn add dayjs
|
|
|
75
72
|
|
|
76
73
|
### `ramda`
|
|
77
74
|
|
|
78
|
-
Ramda is a JavaScript library that facilitates functional programming in
|
|
79
|
-
|
|
75
|
+
Ramda is a JavaScript library that facilitates functional programming in JavaScript. It provides a collection of utility
|
|
76
|
+
functions that operate on data.
|
|
80
77
|
|
|
81
78
|
```
|
|
82
79
|
yarn add ramda
|
|
@@ -84,8 +81,7 @@ yarn add ramda
|
|
|
84
81
|
|
|
85
82
|
### `playwright-i18next-fixture`
|
|
86
83
|
|
|
87
|
-
Use your `i18next` translations in Playwright to create multi-language
|
|
88
|
-
selectors.
|
|
84
|
+
Use your `i18next` translations in Playwright to create multi-language selectors.
|
|
89
85
|
|
|
90
86
|
```
|
|
91
87
|
yarn add playwright-i18next-fixture
|
|
@@ -102,29 +98,27 @@ yarn add @bigbinary/neeto-cist @faker-js/faker @playwright/test nano-staged dote
|
|
|
102
98
|
### Methods
|
|
103
99
|
|
|
104
100
|
## MailerUtils
|
|
105
|
-
Note: ENV variables `NEETO_AUTOMATION_FASTMAIL_API_KEY` and
|
|
106
|
-
|
|
101
|
+
Note: ENV variables `NEETO_AUTOMATION_FASTMAIL_API_KEY` and `FASTMAIL_DOMAIN_NAME` are required for this methods to
|
|
102
|
+
work.
|
|
107
103
|
## Slack integration methods
|
|
108
104
|
|
|
109
|
-
Note: Either ENV variables `SLACK_WORKSPACE`, `SLACK_LOGIN_PASSWORD` and
|
|
110
|
-
|
|
111
|
-
`workspace`, `loginPassword` and `loginEmail` must be passed.
|
|
105
|
+
Note: Either ENV variables `SLACK_WORKSPACE`, `SLACK_LOGIN_PASSWORD` and `SLACK_LOGIN_EMAIL` is required for this method
|
|
106
|
+
to work or custom credentials `workspace`, `loginPassword` and `loginEmail` must be passed.
|
|
112
107
|
|
|
113
108
|
## Zapier integration methods
|
|
114
109
|
|
|
115
|
-
Note: ENV variables `NEETO_AUTOMATION_FASTMAIL_API_KEY`, `FASTMAIL_DOMAIN_NAME`, `ZAPIER_LOGIN_EMAIL`,
|
|
110
|
+
Note: ENV variables `NEETO_AUTOMATION_FASTMAIL_API_KEY`, `FASTMAIL_DOMAIN_NAME`, `ZAPIER_LOGIN_EMAIL`,
|
|
111
|
+
`ZAPIER_LOGIN_PASSWORD`, and `ZAP_ID` are required for this methods to work.
|
|
116
112
|
|
|
117
113
|
## Usage
|
|
118
114
|
|
|
119
|
-
You can import the utility functions and constants from the
|
|
120
|
-
`@bigbinary/neeto-playwright-commons` wherever required.
|
|
115
|
+
You can import the utility functions and constants from the `@bigbinary/neeto-playwright-commons` wherever required.
|
|
121
116
|
|
|
122
117
|
```js
|
|
123
118
|
import { COMMON_SELECTORS } from "@bigbinary/neeto-playwright-common";
|
|
124
119
|
```
|
|
125
120
|
|
|
126
|
-
This package is published as ESM-only. Use `import` syntax and avoid
|
|
127
|
-
CommonJS `require()` for package consumption.
|
|
121
|
+
This package is published as ESM-only. Use `import` syntax and avoid CommonJS `require()` for package consumption.
|
|
128
122
|
|
|
129
123
|
## Exported Functions
|
|
130
124
|
|
package/index.d.ts
CHANGED
|
@@ -5076,11 +5076,11 @@ interface VerifyAuditLogProps<T extends ActionDataKey> {
|
|
|
5076
5076
|
declare class AuditLogsPage {
|
|
5077
5077
|
private page;
|
|
5078
5078
|
private neetoPlaywrightUtilities;
|
|
5079
|
-
private product;
|
|
5080
5079
|
private readonly currentDate;
|
|
5081
5080
|
messageBuilders: MessageBuilders;
|
|
5082
5081
|
private admin;
|
|
5083
|
-
constructor(page: Page, neetoPlaywrightUtilities: CustomCommands, product
|
|
5082
|
+
constructor(page: Page, neetoPlaywrightUtilities: CustomCommands, /** @deprecated Audit log messages no longer include the product name. */
|
|
5083
|
+
product?: NeetoProducts);
|
|
5084
5084
|
/**
|
|
5085
5085
|
*
|
|
5086
5086
|
* Verifies an audit log entry by building the expected message based on the action type and data, then checking that the audit log content matches the expected message and current date.
|
package/index.js
CHANGED
|
@@ -120885,25 +120885,26 @@ dayjs.extend(timezone);
|
|
|
120885
120885
|
class AuditLogsPage {
|
|
120886
120886
|
page;
|
|
120887
120887
|
neetoPlaywrightUtilities;
|
|
120888
|
-
product;
|
|
120889
120888
|
currentDate;
|
|
120890
120889
|
messageBuilders;
|
|
120891
120890
|
admin;
|
|
120892
|
-
constructor(page, neetoPlaywrightUtilities,
|
|
120891
|
+
constructor(page, neetoPlaywrightUtilities,
|
|
120892
|
+
/** @deprecated Audit log messages no longer include the product name. */
|
|
120893
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
120894
|
+
product) {
|
|
120893
120895
|
this.page = page;
|
|
120894
120896
|
this.neetoPlaywrightUtilities = neetoPlaywrightUtilities;
|
|
120895
|
-
this.product = product;
|
|
120896
120897
|
this.currentDate = dayjs().tz("Asia/Kolkata").format("MMM D, YYYY");
|
|
120897
120898
|
this.messageBuilders = {
|
|
120898
|
-
[ACTIONS.inviteUsers]: (data) => `${this.admin} added ${data.emails.join(", ").toLowerCase()}
|
|
120899
|
-
[ACTIONS.updatedUser]: (data) => `${this.admin} changed ${data.emails[0].toLowerCase()}'s email from ${data.emails[0].toLowerCase()} to ${data.emails[1].toLowerCase()}
|
|
120900
|
-
[ACTIONS.removedUser]: (data) => `${this.admin} removed ${data.emails[0].toLowerCase()}
|
|
120901
|
-
[ACTIONS.createdRole]: (data) => `${this.admin} created ${data.roleName} role
|
|
120902
|
-
[ACTIONS.addedPermission]: (data) => `${this.admin} added ${data.permissions.join(", ").toLowerCase()} permission to ${data.roleName} role
|
|
120903
|
-
[ACTIONS.removedPermission]: (data) => `${this.admin} removed ${data.permissions.join(", ")} permissions from ${data.roleName} role
|
|
120904
|
-
[ACTIONS.updatedRole]: (data) => `${this.admin} updated ${data.roleName} role
|
|
120905
|
-
[ACTIONS.deletedRole]: (data) => `${this.admin} deleted ${data.roleName} role
|
|
120906
|
-
[ACTIONS.updatedName]: (data) => `${this.admin} changed first name from ${data.name} to ${this.admin.split(" ")[0]}
|
|
120899
|
+
[ACTIONS.inviteUsers]: (data) => `${this.admin} added ${data.emails.join(", ").toLowerCase()}.`,
|
|
120900
|
+
[ACTIONS.updatedUser]: (data) => `${this.admin} changed ${data.emails[0].toLowerCase()}'s email from ${data.emails[0].toLowerCase()} to ${data.emails[1].toLowerCase()}.`,
|
|
120901
|
+
[ACTIONS.removedUser]: (data) => `${this.admin} removed ${data.emails[0].toLowerCase()}.`,
|
|
120902
|
+
[ACTIONS.createdRole]: (data) => `${this.admin} created ${data.roleName} role.`,
|
|
120903
|
+
[ACTIONS.addedPermission]: (data) => `${this.admin} added ${data.permissions.join(", ").toLowerCase()} permission to ${data.roleName} role.`,
|
|
120904
|
+
[ACTIONS.removedPermission]: (data) => `${this.admin} removed ${data.permissions.join(", ")} permissions from ${data.roleName} role.`,
|
|
120905
|
+
[ACTIONS.updatedRole]: (data) => `${this.admin} updated ${data.roleName} role.`,
|
|
120906
|
+
[ACTIONS.deletedRole]: (data) => `${this.admin} deleted ${data.roleName} role.`,
|
|
120907
|
+
[ACTIONS.updatedName]: (data) => `${this.admin} changed first name from ${data.name} to ${this.admin.split(" ")[0]}.`,
|
|
120907
120908
|
[ACTIONS.connectedIntegration]: (data) => data.detail
|
|
120908
120909
|
? `${this.admin} connected ${data.integrationName} using ${data.detail}.`
|
|
120909
120910
|
: `${this.admin} connected ${data.integrationName}.`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-playwright-commons",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.14",
|
|
4
4
|
"description": "A package encapsulating common playwright code across neeto projects.",
|
|
5
5
|
"repository": "git@github.com:bigbinary/neeto-playwright-commons.git",
|
|
6
6
|
"license": "apache-2.0",
|