cypress-playwright-data-gen 1.0.7 → 1.0.8

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.
Files changed (2) hide show
  1. package/README.md +14 -47
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -19,10 +19,10 @@ import 'cypress-playwright-data-gen/cypress/commands';
19
19
 
20
20
 
21
21
  Then you can use the custom commands anywhere in your tests:
22
+ /** Just an example — OrangeHRM doesn’t have public signup, so let’s imagine we were testing a form or registration flow: **/
22
23
 
23
24
  it('uses generated user data for a signup-style test', () => {
24
25
  cy.generateUser().then((user) => {
25
- /** Just an example — OrangeHRM doesn’t have public signup, so let’s imagine we were testing a form or registration flow: **/
26
26
  cy.visit('https://example.com/register');
27
27
  cy.get('#firstName').type(user.firstName);
28
28
  cy.get('#lastName').type(user.lastName);
@@ -32,6 +32,7 @@ it('uses generated user data for a signup-style test', () => {
32
32
  cy.log(`Generated user: ${user.firstName} ${user.lastName}, email: ${user.email}`);
33
33
  });
34
34
  });
35
+
35
36
 
36
37
  it('generates card data for payment-related tests', () => {
37
38
  cy.generateCard().then((card) => {
@@ -51,9 +52,12 @@ import { generateUser, generateCard, generateAddress, generateTransaction, gener
51
52
 
52
53
 
53
54
  Then you can use them anywhere in your Playwright tests:
55
+
54
56
  import { test, expect } from '@playwright/test';
55
57
  import { generateUser, generateCard } from 'cypress-playwright-data-gen/playwright/utils';
58
+
56
59
  /** Just an example — OrangeHRM doesn’t have public signup, so let’s imagine we were testing a form or registration flow: **/
60
+
57
61
  test('uses generated user data for a signup-style test', async ({ page }) => {
58
62
  const user = generateUser();
59
63
  await page.goto('https://example.com/register');
@@ -65,6 +69,7 @@ import { generateUser, generateCard } from 'cypress-playwright-data-gen/playwrig
65
69
  console.log(`Generated user: ${user.firstName} ${user.lastName}, email: ${user.email}`);
66
70
  });
67
71
 
72
+
68
73
  /**
69
74
  * Just an example
70
75
  */
@@ -80,49 +85,11 @@ import { generateUser, generateCard } from 'cypress-playwright-data-gen/playwrig
80
85
  ##############################################################################
81
86
 
82
87
 
83
- 🧩 Available Generators & Their Attributes:
84
-
85
- 🧍‍♂️generateUser()
86
- fullName
87
- firstName
88
- lastName
89
- username
90
- password
91
- userId
92
- avatar
93
- email
94
- phone
95
- address
96
-
97
- 💳 generateCard()
98
- cardNumber
99
- cvv
100
- expiry
101
-
102
- 🏠 generateAddress()
103
- street
104
- city
105
- state
106
- postalCode
107
- country
108
-
109
- 🏦 generateInstitution()
110
- institutionId
111
- name
112
- type
113
- country
114
- branchCode
115
- contactEmail
116
- phone
117
-
118
- 💰 generateTransaction()
119
- amount
120
- currency
121
- type
122
- date
123
- merchant
124
- transactionId
125
- status
126
-
127
-
128
-
88
+ ## 🧩 Available Generators
89
+ | Generator | Attributes |
90
+ |------------|-------------|
91
+ | 👤 **generateUser()** | fullName, firstName, lastName, username, password, userId, avatar, email, phone, address |
92
+ | 💳 **generateCard()** | cardNumber, cvv, expiry |
93
+ | 🏠 **generateAddress()** | street, city, state, postalCode, country |
94
+ | 🏦 **generateInstitution()** | institutionId, name, type, country, branchCode, contactEmail, phone |
95
+ | 💰 **generateTransaction()** | amount, currency, type, date, merchant, transactionId, status |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cypress-playwright-data-gen",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "A simple Cypress & Playwright plugin for generating realistic test data using Faker.js.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",