feat(web-test): M7.1+M7.2 — ctx.testInfo + проброс custom-полей контекстов

- ctx.testInfo (name/file/filePath/tags/timeout/attempt/maxAttempts/param/contexts/primaryContext)
  выставляется перед каждой попыткой, доступен в beforeEach/test/afterEach
- ctx.testResult (status/duration/attempts/error/steps) доступен в afterEach
- run.mjs:411 spread полного contextSpec (был whitelist {url, isolation});
  CLI --url override сохраняет custom-поля через merge
- webtest.config.mjs: displayName для a/b
- spec §3 — подраздел «Метаданные теста», §6 — availability testInfo/testResult,
  §7 — рекомендация латинский ID + кириллический displayName
- Full regression 18/18 ✓ (9m 9.8s)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Nick Shirokov
2026-05-13 12:44:07 +03:00
parent 96dad75b2f
commit e0197683e1
3 changed files with 89 additions and 12 deletions
+5 -2
View File
@@ -7,8 +7,11 @@
// конфликтовать с ручной разведкой и работать поверх отдельного Apache на :9191.
export default {
contexts: {
a: { url: 'http://localhost:9191/webtest-runner/ru_RU' },
b: { url: 'http://localhost:9191/webtest-runner/ru_RU' },
// `displayName` — человекочитаемое имя контекста, видно хукам через
// testInfo.contexts[name].displayName (например для showTitleSlide).
// Custom-поля любого типа пробрасываются как есть.
a: { url: 'http://localhost:9191/webtest-runner/ru_RU', displayName: 'Пользователь A' },
b: { url: 'http://localhost:9191/webtest-runner/ru_RU', displayName: 'Пользователь B' },
},
defaultContext: 'a',
// isolation: 'tab' (default) — persistent context, tabs in one window, 1С extension loads.