cypress-playwright-data-gen 1.0.0 โ 1.0.1
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 +34 -0
- package/package.json +13 -3
package/README.md
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
๐ง cypress-playwright-data-gen
|
2
|
+
|
3
|
+
A lightweight fake data generator for Cypress and Playwright tests โ create realistic test data like users, cards, institutions, and more in seconds!
|
4
|
+
|
5
|
+
๐ Installation
|
6
|
+
|
7
|
+
Install using npm or yarn:
|
8
|
+
|
9
|
+
npm install cypress-playwright-data-gen
|
10
|
+
|
11
|
+
or
|
12
|
+
|
13
|
+
yarn add cypress-playwright-data-gen
|
14
|
+
|
15
|
+
|
16
|
+
๐งช Usage
|
17
|
+
In Cypress
|
18
|
+
|
19
|
+
Add the commands in your cypress/support/e2e.js (or commands.js):
|
20
|
+
|
21
|
+
import 'cypress-playwright-data-gen/cypress/commands';
|
22
|
+
|
23
|
+
|
24
|
+
Then you can use the custom commands anywhere in your tests:
|
25
|
+
|
26
|
+
it('should create fake user and card data', () => {
|
27
|
+
const user = cy.generateUser();
|
28
|
+
const card = cy.generateCard();
|
29
|
+
|
30
|
+
cy.log(JSON.stringify(user));
|
31
|
+
cy.log(JSON.stringify(card));
|
32
|
+
});
|
33
|
+
|
34
|
+
|
package/package.json
CHANGED
@@ -1,11 +1,21 @@
|
|
1
1
|
{
|
2
2
|
"name": "cypress-playwright-data-gen",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.1",
|
4
4
|
"description": "A simple Cypress & Playwright plugin for generating realistic test data using Faker.js.",
|
5
5
|
"main": "src/index.js",
|
6
6
|
"exports": {
|
7
|
-
".":
|
8
|
-
|
7
|
+
".": {
|
8
|
+
"import": "./dist/index.js",
|
9
|
+
"require": "./dist/index.js"
|
10
|
+
},
|
11
|
+
"./cypress/commands": {
|
12
|
+
"import": "./dist/cypress/commands.js",
|
13
|
+
"require": "./dist/cypress/commands.js"
|
14
|
+
},
|
15
|
+
"./playwright/utils": {
|
16
|
+
"import": "./dist/playwright/utils.js",
|
17
|
+
"require": "./dist/playwright/utils.js"
|
18
|
+
}
|
9
19
|
},
|
10
20
|
"scripts": {
|
11
21
|
"test": "echo \"Error: no test specified\" && exit 1",
|