codeceptjs / codeceptjs/ui

_stringifyMetaStep crashes

オープン
#685 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
84
フォーク
30
PR マージ指標
30日以内にマージされた PR はありません

説明

When using the auth plugin with codecept-ui, tests fail with:

```
Cannot read properties of null (reading 'replace')
TypeError:
at RealtimeReporterHelper._stringifyMetaStep (node_modules/@codeceptjs/ui/lib/codeceptjs/realtime-reporter.helper.js:204:30)
at RealtimeReporterHelper._generateSection (node_modules/@codeceptjs/ui/lib/codeceptjs/realtime-reporter.helper.js:174:23)
```

Cause:
Line 204 in realtime-reporter.helper.js assumes metaStep.actor is always a string:
line = `${metaStep.actor.replace(/[\W_]+/g, '') || ''}-${metaStep.name.replace(/[\W_]+/g, '') || ''}...`

But when using the auth plugin's login function, metaStep.actor is null.

Versions:
- @codeceptjs/ui: 1.3.8
- codeceptjs: 3.7.6

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

node_modules/@codeceptjs/ui/lib/codeceptjs/realtime-reporter.helper.js:204 から始めて RealtimeReporterHelper._stringifyMetaStep を調査し、その後 @codeceptjs/ui 1.3.8 と codeceptjs 3.7.6 を使って auth plugin のログインフローを再現します。_generateSection 中に metaStep.actor が null の場合でも codecept-ui が例外をスローしなくなれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript, node.js
領域
testing-qa
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
55/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。