Skip to content

Commit 0909608

Browse files
committed
Merge branch '3.x' into task-4593-bump-webdriverio
2 parents 8fc1284 + 1769ec0 commit 0909608

File tree

4 files changed

+307
-55
lines changed

4 files changed

+307
-55
lines changed

README.md

Lines changed: 187 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33

44

5+
56
[<img src="https://img.shields.io/badge/[email protected]?logo=slack">](https://join.slack.com/t/codeceptjs/shared_invite/enQtMzA5OTM4NDM2MzA4LWE4MThhN2NmYTgxNTU5MTc4YzAyYWMwY2JkMmZlYWI5MWQ2MDM5MmRmYzZmYmNiNmY5NTAzM2EwMGIwOTNhOGQ) [<img src="https://img.shields.io/badge/discourse-codeceptjs-purple">](https://codecept.discourse.group) [![NPM version][npm-image]][npm-url] [<img src="https://img.shields.io/badge/dockerhub-images-blue.svg?logo=codeceptjs">](https://hub.docker.com/r/codeceptjs/codeceptjs)
67
[![AI features](https://img.shields.io/badge/AI-features?logo=openai&logoColor=white)](https://github.com/codeceptjs/CodeceptJS/edit/3.x/docs/ai.md) [![StandWithUkraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)
78

@@ -292,39 +293,192 @@ When using Typescript, replace `module.exports` with `export` for autocompletion
292293

293294
## Contributors
294295

295-
Thanks all to those who are and will have contributing to this awesome project!
296-
297-
[//]: contributor-faces
298-
<a href="https://github.com/DavertMik"><img src="https://avatars.githubusercontent.com/u/220264?v=4" title="DavertMik" width="80" height="80"></a>
299-
<a href="https://github.com/kobenguyent"><img src="https://avatars.githubusercontent.com/u/7845001?v=4" title="kobenguyent" width="80" height="80"></a>
300-
<a href="https://github.com/Vorobeyko"><img src="https://avatars.githubusercontent.com/u/11293201?v=4" title="Vorobeyko" width="80" height="80"></a>
301-
<a href="https://github.com/reubenmiller"><img src="https://avatars.githubusercontent.com/u/3029781?v=4" title="reubenmiller" width="80" height="80"></a>
302-
<a href="https://github.com/Arhell"><img src="https://avatars.githubusercontent.com/u/26163841?v=4" title="Arhell" width="80" height="80"></a>
303-
<a href="https://github.com/APshenkin"><img src="https://avatars.githubusercontent.com/u/14344430?v=4" title="APshenkin" width="80" height="80"></a>
304-
<a href="https://github.com/fabioel"><img src="https://avatars.githubusercontent.com/u/9824235?v=4" title="fabioel" width="80" height="80"></a>
305-
<a href="https://github.com/pablopaul"><img src="https://avatars.githubusercontent.com/u/635526?v=4" title="pablopaul" width="80" height="80"></a>
306-
<a href="https://github.com/mirao"><img src="https://avatars.githubusercontent.com/u/12584138?v=4" title="mirao" width="80" height="80"></a>
307-
<a href="https://github.com/Georgegriff"><img src="https://avatars.githubusercontent.com/u/9056958?v=4" title="Georgegriff" width="80" height="80"></a>
308-
<a href="https://github.com/KMKoushik"><img src="https://avatars.githubusercontent.com/u/24666922?v=4" title="KMKoushik" width="80" height="80"></a>
309-
<a href="https://github.com/nikocanvacom"><img src="https://avatars.githubusercontent.com/u/83254493?v=4" title="nikocanvacom" width="80" height="80"></a>
310-
<a href="https://github.com/elukoyanov"><img src="https://avatars.githubusercontent.com/u/11647141?v=4" title="elukoyanov" width="80" height="80"></a>
311-
<a href="https://github.com/gkushang"><img src="https://avatars.githubusercontent.com/u/3663389?v=4" title="gkushang" width="80" height="80"></a>
312-
<a href="https://github.com/tsuemura"><img src="https://avatars.githubusercontent.com/u/17092259?v=4" title="tsuemura" width="80" height="80"></a>
313-
<a href="https://github.com/EgorBodnar"><img src="https://avatars.githubusercontent.com/u/63167966?v=4" title="EgorBodnar" width="80" height="80"></a>
314-
<a href="https://github.com/VikalpP"><img src="https://avatars.githubusercontent.com/u/11846339?v=4" title="VikalpP" width="80" height="80"></a>
315-
<a href="https://github.com/thomashohn"><img src="https://avatars.githubusercontent.com/u/3414869?v=4" title="thomashohn" width="80" height="80"></a>
316-
<a href="https://github.com/elaichenkov"><img src="https://avatars.githubusercontent.com/u/29764053?v=4" title="elaichenkov" width="80" height="80"></a>
317-
<a href="https://github.com/BorisOsipov"><img src="https://avatars.githubusercontent.com/u/6514276?v=4" title="BorisOsipov" width="80" height="80"></a>
318-
<a href="https://github.com/ngraf"><img src="https://avatars.githubusercontent.com/u/7094389?v=4" title="ngraf" width="80" height="80"></a>
319-
<a href="https://github.com/nitschSB"><img src="https://avatars.githubusercontent.com/u/39341455?v=4" title="nitschSB" width="80" height="80"></a>
320-
<a href="https://github.com/hubidu"><img src="https://avatars.githubusercontent.com/u/13134082?v=4" title="hubidu" width="80" height="80"></a>
321-
<a href="https://github.com/jploskonka"><img src="https://avatars.githubusercontent.com/u/669483?v=4" title="jploskonka" width="80" height="80"></a>
322-
<a href="https://github.com/maojunxyz"><img src="https://avatars.githubusercontent.com/u/28778042?v=4" title="maojunxyz" width="80" height="80"></a>
323-
<a href="https://github.com/abhimanyupandian"><img src="https://avatars.githubusercontent.com/u/36107381?v=4" title="abhimanyupandian" width="80" height="80"></a>
324-
<a href="https://github.com/martomo"><img src="https://avatars.githubusercontent.com/u/1850135?v=4" title="martomo" width="80" height="80"></a>
325-
<a href="https://github.com/hatufacci"><img src="https://avatars.githubusercontent.com/u/4963181?v=4" title="hatufacci" width="80" height="80"></a>
326-
327-
[//]: contributor-faces
296+
297+
298+
299+
300+
301+
302+
303+
304+
<table>
305+
<tr>
306+
<td align="center">
307+
<a href="https://github.com/DavertMik">
308+
<img src="https://avatars.githubusercontent.com/u/220264?v=4" width="100" height="100" alt="DavertMik"/><br />
309+
<sub><b>DavertMik</b></sub>
310+
</a>
311+
</td>
312+
<td align="center">
313+
<a href="https://github.com/kobenguyent">
314+
<img src="https://avatars.githubusercontent.com/u/7845001?v=4" width="100" height="100" alt="kobenguyent"/><br />
315+
<sub><b>kobenguyent</b></sub>
316+
</a>
317+
</td>
318+
<td align="center">
319+
<a href="https://github.com/Vorobeyko">
320+
<img src="https://avatars.githubusercontent.com/u/11293201?v=4" width="100" height="100" alt="Vorobeyko"/><br />
321+
<sub><b>Vorobeyko</b></sub>
322+
</a>
323+
</td>
324+
<td align="center">
325+
<a href="https://github.com/reubenmiller">
326+
<img src="https://avatars.githubusercontent.com/u/3029781?v=4" width="100" height="100" alt="reubenmiller"/><br />
327+
<sub><b>reubenmiller</b></sub>
328+
</a>
329+
</td></tr>
330+
<tr>
331+
<td align="center">
332+
<a href="https://github.com/Arhell">
333+
<img src="https://avatars.githubusercontent.com/u/26163841?v=4" width="100" height="100" alt="Arhell"/><br />
334+
<sub><b>Arhell</b></sub>
335+
</a>
336+
</td>
337+
<td align="center">
338+
<a href="https://github.com/APshenkin">
339+
<img src="https://avatars.githubusercontent.com/u/14344430?v=4" width="100" height="100" alt="APshenkin"/><br />
340+
<sub><b>APshenkin</b></sub>
341+
</a>
342+
</td>
343+
<td align="center">
344+
<a href="https://github.com/fabioel">
345+
<img src="https://avatars.githubusercontent.com/u/9824235?v=4" width="100" height="100" alt="fabioel"/><br />
346+
<sub><b>fabioel</b></sub>
347+
</a>
348+
</td>
349+
<td align="center">
350+
<a href="https://github.com/pablopaul">
351+
<img src="https://avatars.githubusercontent.com/u/635526?v=4" width="100" height="100" alt="pablopaul"/><br />
352+
<sub><b>pablopaul</b></sub>
353+
</a>
354+
</td></tr>
355+
<tr>
356+
<td align="center">
357+
<a href="https://github.com/mirao">
358+
<img src="https://avatars.githubusercontent.com/u/12584138?v=4" width="100" height="100" alt="mirao"/><br />
359+
<sub><b>mirao</b></sub>
360+
</a>
361+
</td>
362+
<td align="center">
363+
<a href="https://github.com/Georgegriff">
364+
<img src="https://avatars.githubusercontent.com/u/9056958?v=4" width="100" height="100" alt="Georgegriff"/><br />
365+
<sub><b>Georgegriff</b></sub>
366+
</a>
367+
</td>
368+
<td align="center">
369+
<a href="https://github.com/KMKoushik">
370+
<img src="https://avatars.githubusercontent.com/u/24666922?v=4" width="100" height="100" alt="KMKoushik"/><br />
371+
<sub><b>KMKoushik</b></sub>
372+
</a>
373+
</td>
374+
<td align="center">
375+
<a href="https://github.com/nikocanvacom">
376+
<img src="https://avatars.githubusercontent.com/u/83254493?v=4" width="100" height="100" alt="nikocanvacom"/><br />
377+
<sub><b>nikocanvacom</b></sub>
378+
</a>
379+
</td></tr>
380+
<tr>
381+
<td align="center">
382+
<a href="https://github.com/elukoyanov">
383+
<img src="https://avatars.githubusercontent.com/u/11647141?v=4" width="100" height="100" alt="elukoyanov"/><br />
384+
<sub><b>elukoyanov</b></sub>
385+
</a>
386+
</td>
387+
<td align="center">
388+
<a href="https://github.com/thomashohn">
389+
<img src="https://avatars.githubusercontent.com/u/3414869?v=4" width="100" height="100" alt="thomashohn"/><br />
390+
<sub><b>thomashohn</b></sub>
391+
</a>
392+
</td>
393+
<td align="center">
394+
<a href="https://github.com/gkushang">
395+
<img src="https://avatars.githubusercontent.com/u/3663389?v=4" width="100" height="100" alt="gkushang"/><br />
396+
<sub><b>gkushang</b></sub>
397+
</a>
398+
</td>
399+
<td align="center">
400+
<a href="https://github.com/tsuemura">
401+
<img src="https://avatars.githubusercontent.com/u/17092259?v=4" width="100" height="100" alt="tsuemura"/><br />
402+
<sub><b>tsuemura</b></sub>
403+
</a>
404+
</td></tr>
405+
<tr>
406+
<td align="center">
407+
<a href="https://github.com/EgorBodnar">
408+
<img src="https://avatars.githubusercontent.com/u/63167966?v=4" width="100" height="100" alt="EgorBodnar"/><br />
409+
<sub><b>EgorBodnar</b></sub>
410+
</a>
411+
</td>
412+
<td align="center">
413+
<a href="https://github.com/VikalpP">
414+
<img src="https://avatars.githubusercontent.com/u/11846339?v=4" width="100" height="100" alt="VikalpP"/><br />
415+
<sub><b>VikalpP</b></sub>
416+
</a>
417+
</td>
418+
<td align="center">
419+
<a href="https://github.com/elaichenkov">
420+
<img src="https://avatars.githubusercontent.com/u/29764053?v=4" width="100" height="100" alt="elaichenkov"/><br />
421+
<sub><b>elaichenkov</b></sub>
422+
</a>
423+
</td>
424+
<td align="center">
425+
<a href="https://github.com/BorisOsipov">
426+
<img src="https://avatars.githubusercontent.com/u/6514276?v=4" width="100" height="100" alt="BorisOsipov"/><br />
427+
<sub><b>BorisOsipov</b></sub>
428+
</a>
429+
</td></tr>
430+
<tr>
431+
<td align="center">
432+
<a href="https://github.com/ngraf">
433+
<img src="https://avatars.githubusercontent.com/u/7094389?v=4" width="100" height="100" alt="ngraf"/><br />
434+
<sub><b>ngraf</b></sub>
435+
</a>
436+
</td>
437+
<td align="center">
438+
<a href="https://github.com/nitschSB">
439+
<img src="https://avatars.githubusercontent.com/u/39341455?v=4" width="100" height="100" alt="nitschSB"/><br />
440+
<sub><b>nitschSB</b></sub>
441+
</a>
442+
</td>
443+
<td align="center">
444+
<a href="https://github.com/hubidu">
445+
<img src="https://avatars.githubusercontent.com/u/13134082?v=4" width="100" height="100" alt="hubidu"/><br />
446+
<sub><b>hubidu</b></sub>
447+
</a>
448+
</td>
449+
<td align="center">
450+
<a href="https://github.com/jploskonka">
451+
<img src="https://avatars.githubusercontent.com/u/669483?v=4" width="100" height="100" alt="jploskonka"/><br />
452+
<sub><b>jploskonka</b></sub>
453+
</a>
454+
</td></tr>
455+
<tr>
456+
<td align="center">
457+
<a href="https://github.com/maojunxyz">
458+
<img src="https://avatars.githubusercontent.com/u/28778042?v=4" width="100" height="100" alt="maojunxyz"/><br />
459+
<sub><b>maojunxyz</b></sub>
460+
</a>
461+
</td>
462+
<td align="center">
463+
<a href="https://github.com/abhimanyupandian">
464+
<img src="https://avatars.githubusercontent.com/u/36107381?v=4" width="100" height="100" alt="abhimanyupandian"/><br />
465+
<sub><b>abhimanyupandian</b></sub>
466+
</a>
467+
</td>
468+
<td align="center">
469+
<a href="https://github.com/martomo">
470+
<img src="https://avatars.githubusercontent.com/u/1850135?v=4" width="100" height="100" alt="martomo"/><br />
471+
<sub><b>martomo</b></sub>
472+
</a>
473+
</td>
474+
<td align="center">
475+
<a href="https://github.com/hatufacci">
476+
<img src="https://avatars.githubusercontent.com/u/4963181?v=4" width="100" height="100" alt="hatufacci"/><br />
477+
<sub><b>hatufacci</b></sub>
478+
</a>
479+
</td></tr>
480+
</table>
481+
328482

329483
## License
330484

lib/plugin/stepByStepReport.js

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const figures = require('figures')
44
const fs = require('fs')
55
const mkdirp = require('mkdirp')
66
const path = require('path')
7+
const cheerio = require('cheerio')
78

89
const Container = require('../container')
910
const recorder = require('../recorder')
@@ -133,7 +134,49 @@ module.exports = function (config) {
133134

134135
event.dispatcher.on(event.all.result, () => {
135136
if (Object.keys(recordedTests).length === 0 || !Object.keys(slides).length) return
137+
generateRecordsHtml(recordedTests)
138+
})
139+
140+
event.dispatcher.on(event.workers.result, async () => {
141+
await recorder.add(() => {
142+
const recordedTests = getRecordFoldersWithDetails(reportDir)
143+
generateRecordsHtml(recordedTests)
144+
})
145+
})
136146

147+
function getRecordFoldersWithDetails(dirPath) {
148+
let results = {}
149+
150+
try {
151+
const items = fs.readdirSync(dirPath, { withFileTypes: true })
152+
153+
items.forEach((item) => {
154+
if (item.isDirectory() && item.name.startsWith('record_')) {
155+
const recordFolderPath = path.join(dirPath, item.name)
156+
const indexPath = path.join(recordFolderPath, 'index.html')
157+
158+
let name = ''
159+
if (fs.existsSync(indexPath)) {
160+
try {
161+
const htmlContent = fs.readFileSync(indexPath, 'utf-8')
162+
const $ = cheerio.load(htmlContent)
163+
name = $('.navbar-brand').text().trim()
164+
} catch (err) {
165+
console.error(`Error reading index.html in ${recordFolderPath}:`, err.message)
166+
}
167+
}
168+
169+
results[name || 'Unkown'] = `${item.name}/index.html`
170+
}
171+
})
172+
} catch (err) {
173+
console.error(`Error reading directory ${dirPath}:`, err.message)
174+
}
175+
176+
return results
177+
}
178+
179+
function generateRecordsHtml(recordedTests) {
137180
let links = ''
138181

139182
for (const link in recordedTests) {
@@ -150,7 +193,7 @@ module.exports = function (config) {
150193
output.print(
151194
`${figures.circleFilled} Step-by-step preview: ${colors.white.bold(`file://${reportDir}/records.html`)}`,
152195
)
153-
})
196+
}
154197

155198
async function persistStep(step) {
156199
if (stepNum === -1) return // Ignore steps from BeforeSuite function

package.json

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"@xmldom/xmldom": "0.9.5",
7777
"acorn": "8.14.0",
7878
"arrify": "2.0.1",
79-
"axios": "1.7.7",
79+
"axios": "1.7.9",
8080
"chai": "5.1.1",
8181
"chai-deep-match": "1.2.1",
8282
"chai-exclude": "2.1.1",
@@ -85,8 +85,9 @@
8585
"chai-match-pattern": "1.3.0",
8686
"chai-string": "1.5.0",
8787
"chalk": "4.1.2",
88+
"cheerio": "^1.0.0",
8889
"commander": "11.1.0",
89-
"cross-spawn": "7.0.5",
90+
"cross-spawn": "7.0.6",
9091
"css-to-xpath": "0.1.0",
9192
"csstoxpath": "1.6.0",
9293
"envinfo": "7.14.0",
@@ -96,8 +97,8 @@
9697
"fs-extra": "11.2.0",
9798
"glob": "6.0.1",
9899
"html-minifier-terser": "7.2.0",
99-
"invisi-data": "^1.0.0",
100100
"inquirer": "6.5.2",
101+
"invisi-data": "^1.0.0",
101102
"joi": "17.13.3",
102103
"js-beautify": "1.15.1",
103104
"lodash.clonedeep": "4.5.0",
@@ -126,26 +127,24 @@
126127
"@pollyjs/core": "5.1.0",
127128
"@types/chai": "4.3.19",
128129
"@types/inquirer": "9.0.3",
129-
"@types/node": "22.10.1",
130+
"@types/node": "22.10.2",
130131
"@wdio/sauce-service": "9.2.13",
131132
"@wdio/selenium-standalone-service": "8.3.2",
132133
"@wdio/utils": "9.2.8",
133134
"@xmldom/xmldom": "0.9.5",
134135
"apollo-server-express": "3.13.0",
135136
"chai-as-promised": "7.1.2",
136137
"chai-subset": "1.6.0",
137-
"cheerio": "^1.0.0",
138-
"contributor-faces": "1.1.0",
139138
"documentation": "14.0.3",
140139
"electron": "33.2.1",
141-
"eslint": "9.16.0",
140+
"eslint": "9.17.0",
142141
"eslint-config-airbnb-base": "15.0.0",
143142
"eslint-plugin-import": "2.31.0",
144143
"eslint-plugin-mocha": "10.5.0",
145144
"expect": "29.7.0",
146-
"express": "4.21.1",
145+
"express": "4.21.2",
147146
"globals": "15.12.0",
148-
"graphql": "16.9.0",
147+
"graphql": "16.10.0",
149148
"husky": "9.1.7",
150149
"inquirer-test": "2.0.1",
151150
"jsdoc": "4.0.4",
@@ -166,7 +165,7 @@
166165
"tsd": "^0.31.0",
167166
"tsd-jsdoc": "2.5.0",
168167
"typedoc": "0.26.11",
169-
"typedoc-plugin-markdown": "4.2.10",
168+
"typedoc-plugin-markdown": "4.3.2",
170169
"typescript": "5.7.2",
171170
"wdio-docker-service": "1.5.0",
172171
"webdriverio": "9.2.14",
@@ -184,4 +183,4 @@
184183
"strict": false
185184
}
186185
}
187-
}
186+
}

0 commit comments

Comments
 (0)