e2e-mail 0.0.18 → 0.0.19

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 +33 -1
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -28,6 +28,25 @@ Whether you're testing account verification flows, password resets, magic links,
28
28
  npm i e2e-mail
29
29
  ```
30
30
 
31
+ ### Overview
32
+ E2E Mail exposes a few core E2E functions:
33
+ ```ts
34
+ initializeMailbox()
35
+ ```
36
+ Creates a new, free mailbox or logs into an existing mailbox. The email passed here requires a valid domain. **@web-library.net** is the current, known valid domain, but that may change. This command will validate the email domain you pass and suggest valid alternatives in logging if invalid.
37
+
38
+
39
+ ```ts
40
+ searchMailbox()
41
+ ```
42
+ Gets the most recent mailbox item. Filters can be combined to narrow your search even further. This command has been adapted in the E2E implementations to also render the email DOM directly into the running test, allowing you to selecte and assert in your chosen E2E framework like any other page.
43
+
44
+
45
+ ```ts
46
+ removeMailbox()
47
+ ```
48
+ Deletes the account. This is strongly suggested for signup flows where accounts are created programmatically and reuse is not intended (e.g. include a uniqe ID or timestamp). This helps maintain good citizenship of the free, backing email infrastructure.
49
+
31
50
  ### Cypress
32
51
 
33
52
  ```ts
@@ -106,7 +125,7 @@ That's it... Seriously!
106
125
 
107
126
  ### I have multiple tests sharing an inbox and want to uniquely identify their emails.
108
127
 
109
- Email subaddressing is supported here. Add your unique identifier to your email like `test+<any-string-identifier>@example.com` and then
128
+ Email subaddressing is supported here. Add your unique identifier to your email like `test+<any-string-identifier>@example.com` and then:
110
129
 
111
130
  ```ts
112
131
  searchMailbox({
@@ -114,3 +133,16 @@ searchMailbox({
114
133
  // ...additional filters
115
134
  });
116
135
  ```
136
+
137
+ ### My testing framework isn't in here
138
+ Cypress and Playwright currently have first-class support. However, the core client is also provided if you'd prefer to build your own framework extensions or plugins:
139
+
140
+ ```ts
141
+ import { E2EMailClient } from "e2e-mail";
142
+
143
+ const client = new E2EMailClient('test@example.com', "Pass1234");
144
+
145
+ client.initialize()
146
+ client.pollMessages()
147
+ client.dispose()
148
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "e2e-mail",
3
- "version": "0.0.18",
3
+ "version": "0.0.19",
4
4
  "description": "A zero-config solution for testing email in major testing frameworks.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -61,7 +61,7 @@
61
61
  "@playwright/test": "^1.49.0",
62
62
  "@types/node": "^25.9.3",
63
63
  "cypress": "^15.17.0",
64
- "e2e-mail": "^0.0.18",
64
+ "e2e-mail": "^0.0.19",
65
65
  "openapi-typescript": "^7.13.0",
66
66
  "tsx": "^4.22.4",
67
67
  "typescript": "^5.9.0",