codeceptjs / codeceptjs/CodeceptJS

I.seeTraffic on post data traffic unexpectedly passes

オープン
#3,920 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る
stale
主要言語
JavaScript
スター
4.2k
フォーク
757
平均マージ
2日 9時間
マージ済み PR(30日)
16

説明

#### What are you trying to achieve?
Test a POST request with `I.seeTraffic` (Playwright Helper) with an intentional fail.

For example at https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST
the existing POST request to https://developer.mozilla.org/pong/get with payload
```
{
keywords: [],
pongs: ["top", "side"
}
```

I use this test code:
```
Scenario('DEMO', async ({I}) => {
I.amOnPage('https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST');
await I.seeTraffic({
url: 'https://developer.mozilla.org/pong/get',
name: 'POST Test',
timeout: 3,
requestPostData: {
keywords: [],
pongs: ["side", "top"],
doesNotExist: true
}
})
})
```

#### What do you get instead?

Test passes unexpectedly.

### Details

* CodeceptJS version: 3.5.6
* NodeJS Version: 20.6.1
* Operating System: MacOS latest version
* Playwright: 1.38.1

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

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

評価

この issue はまだ評価されていません。

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

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