Skip to content

Commit 2e4d0bb

Browse files
committed
update docs
1 parent a483106 commit 2e4d0bb

File tree

2 files changed

+178
-10
lines changed

2 files changed

+178
-10
lines changed

docs/changelog.md

Lines changed: 178 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,184 @@ layout: Section
77

88
# Releases
99

10+
## 3.7.4
11+
12+
❤️ Thanks all to those who contributed to make this release! ❤️
13+
14+
🛩️ _Features_
15+
16+
- **Test Suite Shuffling**: Randomize test execution order to discover test dependencies and improve test isolation ([#5051](https://github.com/codeceptjs/CodeceptJS/issues/5051)) - by **[NivYarmus](https://github.com/NivYarmus)**
17+
18+
```bash
19+
# Shuffle tests to find order-dependent failures using lodash.shuffle algorithm
20+
npx codeceptjs run --shuffle
21+
22+
# Combined with grep and other options
23+
npx codeceptjs run --shuffle --grep "@smoke" --steps
24+
```
25+
26+
- **Enhanced Interactive Debugging**: Better logging for `I.grab*` methods in live interactive mode for clearer debugging output ([#4986](https://github.com/codeceptjs/CodeceptJS/issues/4986)) - by **[owenizedd](https://github.com/owenizedd)**
27+
28+
```js
29+
// Interactive pause() now shows detailed grab results with JSON formatting
30+
I.amOnPage('/checkout')
31+
pause() // Interactive shell started
32+
> I.grabTextFrom('.price')
33+
Result $res= "Grabbed text: $29.99" // Pretty-printed JSON output
34+
> I.grabValueFrom('input[name="email"]')
35+
{"value":"[email protected]"} // Structured JSON response
36+
```
37+
38+
🐛 _Bug Fixes_
39+
40+
- **Playwright Session Traces**: Fixed trace file naming convention and improved error handling for multi-session test scenarios ([#5073](https://github.com/codeceptjs/CodeceptJS/issues/5073)) - by **[julien-ft-64](https://github.com/julien-ft-64)** **[kobenguyent](https://github.com/kobenguyent)**
41+
42+
```js
43+
// Example outputs:
44+
// - a1b2c3d4-e5f6_checkout_login_test.failed.zip
45+
// - b2c3d4e5-f6g7_admin_dashboard_test.failed.zip
46+
```
47+
48+
_Trace files use UUID prefixes with `sessionName_testTitle.status.zip` format_
49+
50+
- **Worker Data Injection**: Resolved proxy object serialization preventing data sharing between parallel test workers ([#5072](https://github.com/codeceptjs/CodeceptJS/issues/5072)) - by **[kobenguyent](https://github.com/kobenguyent)**
51+
52+
```js
53+
// Fixed: Complex objects can now be properly shared and injected between workers
54+
// Bootstrap data sharing in codecept.conf.js:
55+
exports.config = {
56+
bootstrap() {
57+
share({
58+
userData: { id: 123, preferences: { theme: 'dark' } },
59+
apiConfig: { baseUrl: 'https://api.test.com', timeout: 5000 },
60+
})
61+
},
62+
}
63+
64+
// In tests across different workers:
65+
const testData = inject()
66+
console.log(testData.userData.preferences.theme) // 'dark' - deep nesting works
67+
console.log(Object.keys(testData)) // ['userData', 'apiConfig'] - key enumeration works
68+
69+
// Dynamic sharing during test execution:
70+
share({ newData: 'shared across workers' })
71+
```
72+
73+
- **Hook Exit Codes**: Fixed improper exit codes when test hooks fail, ensuring CI/CD pipelines properly detect failures ([#5058](https://github.com/codeceptjs/CodeceptJS/issues/5058)) - by **[kobenguyent](https://github.com/kobenguyent)**
74+
75+
```bash
76+
# Before: Exit code 0 even when beforeEach/afterEach failed
77+
# After: Exit code 1 when any hook fails, properly failing CI builds
78+
```
79+
80+
- **TypeScript Effects Support**: Added complete TypeScript definitions for effects functionality ([#5027](https://github.com/codeceptjs/CodeceptJS/issues/5027)) - by **[kobenguyent](https://github.com/kobenguyent)**
81+
82+
```typescript
83+
// Import effects with full TypeScript type definitions
84+
import { tryTo, retryTo, within } from 'codeceptjs/effects'
85+
86+
// tryTo returns Promise<boolean> for conditional actions
87+
const success: boolean = await tryTo(async () => {
88+
await I.see('Cookie banner')
89+
await I.click('Accept')
90+
})
91+
92+
// retryTo with typed parameters for reliability
93+
await retryTo(() => {
94+
I.click('Submit')
95+
I.see('Success')
96+
}, 3) // retry up to 3 times
97+
```
98+
99+
_Note: Replaces deprecated global plugins - import from 'codeceptjs/effects' module_
100+
101+
- **Mochawesome Screenshot Uniqueness**: Fixed screenshot naming to prevent test failures from being overwritten when multiple tests run at the same time ([#4959](https://github.com/codeceptjs/CodeceptJS/issues/4959)) - by **[Lando1n](https://github.com/Lando1n)**
102+
103+
```js
104+
// Problem: When tests run in parallel, screenshots had identical names
105+
// This caused later test screenshots to overwrite earlier ones
106+
107+
// Before: All failed tests saved as "screenshot.png"
108+
// Result: Only the last failure screenshot was kept
109+
110+
// After: Each screenshot gets a unique name with timestamp
111+
// Examples:
112+
// - "login_test_1645123456.failed.png"
113+
// - "checkout_test_1645123789.failed.png"
114+
// - "profile_test_1645124012.failed.png"
115+
116+
// Configuration in codecept.conf.js:
117+
helpers: {
118+
Mochawesome: {
119+
uniqueScreenshotNames: true // Enable unique naming
120+
}
121+
}
122+
```
123+
124+
_Ensures every failed test keeps its own screenshot for easier debugging_
125+
126+
📖 _Documentation_
127+
128+
- Fixed Docker build issues and improved container deployment process ([#4980](https://github.com/codeceptjs/CodeceptJS/issues/4980)) - by **[thomashohn](https://github.com/thomashohn)**
129+
- Updated dependency versions to maintain security and compatibility ([#4957](https://github.com/codeceptjs/CodeceptJS/issues/4957), [#4950](https://github.com/codeceptjs/CodeceptJS/issues/4950), [#4943](https://github.com/codeceptjs/CodeceptJS/issues/4943)) - by **[thomashohn](https://github.com/thomashohn)**
130+
- Fixed automatic documentation generation system for custom plugins ([#4973](https://github.com/codeceptjs/CodeceptJS/issues/4973)) - by **[Lando1n](https://github.com/Lando1n)**
131+
132+
## 3.7.3
133+
134+
❤️ Thanks all to those who contributed to make this release! ❤️
135+
136+
🛩️ _Features_
137+
138+
- feat(cli): improve info command to return installed browsers ([#4890](https://github.com/codeceptjs/CodeceptJS/issues/4890)) - by **[kobenguyent](https://github.com/kobenguyent)**
139+
140+
```
141+
➜ helloworld npx codeceptjs info
142+
Environment information:
143+
144+
codeceptVersion: "3.7.2"
145+
nodeInfo: 18.19.0
146+
osInfo: macOS 14.4
147+
cpuInfo: (8) x64 Apple M1 Pro
148+
osBrowsers: "chrome: 133.0.6943.143, edge: 133.0.3065.92, firefox: not installed, safari: 17.4"
149+
playwrightBrowsers: "chromium: 133.0.6943.16, firefox: 134.0, webkit: 18.2"
150+
helpers: {
151+
"Playwright": {
152+
"url": "http://localhost",
153+
...
154+
```
155+
156+
🐛 _Bug Fixes_
157+
158+
- fix: resolving path inconsistency in container.js and appium.js ([#4866](https://github.com/codeceptjs/CodeceptJS/issues/4866)) - by **[mjalav](https://github.com/mjalav)**
159+
- fix: broken screenshot links in mochawesome reports ([#4889](https://github.com/codeceptjs/CodeceptJS/issues/4889)) - by **[kobenguyent](https://github.com/kobenguyent)**
160+
- some internal fixes to make UTs more stable by **[thomashohn](https://github.com/thomashohn)**
161+
- dependencies upgrades by **[thomashohn](https://github.com/thomashohn)**
162+
163+
## 3.7.2
164+
165+
❤️ Thanks all to those who contributed to make this release! ❤️
166+
167+
🛩️ _Features_
168+
169+
- feat(playwright): Clear cookie by name ([#4693](https://github.com/codeceptjs/CodeceptJS/issues/4693)) - by **[ngraf](https://github.com/ngraf)**
170+
171+
🐛 _Bug Fixes_
172+
173+
- fix(stepByStepReport): no records html is generated when running with run-workers ([#4638](https://github.com/codeceptjs/CodeceptJS/issues/4638))
174+
- fix(webdriver): bidi error in log with webdriver ([#4850](https://github.com/codeceptjs/CodeceptJS/issues/4850))
175+
- fix(types): TS types of methods (Feature|Scenario)Config.config ([#4851](https://github.com/codeceptjs/CodeceptJS/issues/4851))
176+
- fix: redundant popup log ([#4830](https://github.com/codeceptjs/CodeceptJS/issues/4830))
177+
- fix(webdriver): grab browser logs using bidi protocol ([#4754](https://github.com/codeceptjs/CodeceptJS/issues/4754))
178+
- fix(webdriver): screenshots for sessions ([#4748](https://github.com/codeceptjs/CodeceptJS/issues/4748))
179+
180+
📖 _Documentation_
181+
182+
- fix(docs): mask sensitive data ([#4636](https://github.com/codeceptjs/CodeceptJS/issues/4636)) - by **[gkushang](https://github.com/gkushang)**
183+
184+
## 3.7.1
185+
186+
- Fixed `reading charAt` error in `asyncWrapper.js`
187+
10188
## 3.7.0
11189

12190
This release introduces major new features and internal refactoring. It is an important step toward the 4.0 release planned soon, which will remove all deprecations introduced in 3.7.
@@ -434,7 +612,6 @@ I.flushSoftAssertions() // Throws an error if any soft assertions have failed. T
434612
```
435613
436614
- feat(cli): print failed hooks ([#4476](https://github.com/codeceptjs/CodeceptJS/issues/4476)) - by **[kobenguyent](https://github.com/kobenguyent)**
437-
438615
- run command
439616
![Screenshot 2024-09-02 at 15 25 20](https://github.com/user-attachments/assets/625c6b54-03f6-41c6-9d0c-cd699582404a)
440617
@@ -694,7 +871,6 @@ heal.addRecipe('reloadPageIfModalIsNotVisisble', {
694871
```
695872
696873
- **Breaking Change** **AI** features refactored. Read updated [AI guide](./ai):
697-
698874
- **removed dependency on `openai`**
699875
- added support for **Azure OpenAI**, **Claude**, **Mistal**, or any AI via custom request function
700876
- `--ai` option added to explicitly enable AI features
@@ -705,7 +881,6 @@ heal.addRecipe('reloadPageIfModalIsNotVisisble', {
705881
- `OpenAI` helper renamed to `AI`
706882
707883
- feat(puppeteer): network traffic manipulation. See [#4263](https://github.com/codeceptjs/CodeceptJS/issues/4263) by **[KobeNguyenT](https://github.com/KobeNguyenT)**
708-
709884
- `startRecordingTraffic`
710885
- `grabRecordedNetworkTraffics`
711886
- `flushNetworkTraffics`
@@ -2043,7 +2218,6 @@ await I.seeTraffic({
20432218

20442219
- **🪄 [AI Powered Test Automation](/ai)** - use OpenAI as a copilot for test automation. [#3713](https://github.com/codeceptjs/CodeceptJS/issues/3713) By **[davertmik](https://github.com/davertmik)**
20452220
![](https://user-images.githubusercontent.com/220264/250418764-c382709a-3ccb-4eb5-b6bc-538f3b3b3d35.png)
2046-
20472221
- [AI guide](/ai) added
20482222
- added support for OpenAI in `pause()`
20492223
- added [`heal` plugin](/plugins#heal) for self-healing tests
@@ -2054,7 +2228,6 @@ await I.seeTraffic({
20542228
![](https://user-images.githubusercontent.com/220264/250415226-a7620418-56a4-4837-b790-b15e91e5d1f0.png)
20552229
20562230
- **[Playwright]** Support for APIs in Playwright ([#3665](https://github.com/codeceptjs/CodeceptJS/issues/3665)) - by Egor Bodnar
2057-
20582231
- `clearField` replaced to use new Playwright API
20592232
- `blur` added
20602233
- `focus` added
@@ -3465,9 +3638,7 @@ I.seeFile(fileName)
34653638
## 2.0.0
34663639
34673640
- **[WebDriver]** **Breaking Change.** Updated to webdriverio v5. New helper **WebDriver** helper introduced.
3468-
34693641
- **Upgrade plan**:
3470-
34713642
1. Install latest webdriverio
34723643
34733644
```
@@ -3484,9 +3655,7 @@ I.seeFile(fileName)
34843655

34853656
- **[Appium]** **Breaking Change.** Updated to use webdriverio v5 as well. See upgrade plan
34863657
- **[REST]** **Breaking Change.** Replaced `unirest` library with `axios`.
3487-
34883658
- **Upgrade plan**:
3489-
34903659
1. Refer to [axios API](https://github.com/axios/axios).
34913660
2. If you were using `unirest` requests/responses in your tests change them to axios format.
34923661

docs/plugins.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1032,7 +1032,6 @@ Run tests with plugin enabled:
10321032
- `overrideStepLimits` - whether to use timeouts set in plugin config to override step timeouts set in code with I.limitTime(x).action(...), default false
10331033
10341034
- `noTimeoutSteps` - an array of steps with no timeout. Default:
1035-
10361035
- `amOnPage`
10371036
- `wait*`
10381037

0 commit comments

Comments
 (0)