A package encapsulating common playwright code across neeto projects.
npm install @bigbinary/neeto-playwright-commonsA library that packages common boilerplate Playwright code necessary for all
neeto products.
First, navigate to the Playwright test directory:
``bash`
cd playwright-tests`
Then, install the package using Yarn:bash`
yarn add "@bigbinary/neeto-playwright-commons@latest"neeto-playwright-commons
If is already listed in package.json of Playwright project, simply install dependencies with:`bash`
yarn install
neeto-playwright-commons has some peer dependencies which can be installed
using the commands listed below:
A collection of common utility functions used across all our
neeto products. Try out the utility functions live at
neetoCommons REPL.
``
yarn add @bigbinary/neeto-cist
Faker is used to generate fake data.
``
yarn add @faker-js/faker
``
yarn add @playwright/test
Run linters against staged git files.
``
yarn add lint-staged
dotenv-webpack is a secure webpack plugin that supports
dotenv and other environment variables.
``
yarn add dotenv-webpack
Dayjs is a JavaScript library that parses, validates, manipulates, and displays
dates and times.
``
yarn add dayjs
Ramda is a JavaScript library that facilitates functional programming in
JavaScript. It provides a collection of utility functions that operate on data.
``
yarn add ramda
Use your i18next translations in Playwright to create multi-language
selectors.
``
yarn add playwright-i18next-fixture
We can install all the above peer dependencies by running a single command.
``
yarn add @bigbinary/neeto-cist @faker-js/faker @playwright/test lint-staged dotenv-webpack dayjs ramda playwright-i18next-fixture
and
FASTMAIL_DOMAIN_NAME are required for this methods to work.
Slack integration methods
Note: Either ENV variables
SLACK_WORKSPACE, SLACK_LOGIN_PASSWORD and
SLACK_LOGIN_EMAIL is required for this method to work or custom credentials
workspace, loginPassword and loginEmail must be passed.Zapier integration methods
Note: ENV variables
NEETO_AUTOMATION_FASTMAIL_API_KEY, FASTMAIL_DOMAIN_NAME, ZAPIER_LOGIN_EMAIL, ZAPIER_LOGIN_PASSWORD, and ZAP_ID are required for this methods to work.Usage
You can import the utility functions and constants from the
@bigbinary/neeto-playwright-commons wherever required.`js
import { COMMON_SELECTORS } from "@bigbinary/neeto-playwright-common";
``- Common default configurations
- Commons and Envs
- Routes
- Custom commands
- MailerUtils
- Util functions
- POMs
- Integration
- Selectors
- Texts