codeceptjs / codeceptjs/CodeceptJS
I.seeTraffic on post data traffic unexpectedly passes
- Langage dominant
- JavaScript
- Étoiles
- 4.2k
- Forks
- 757
- Merge moyen
- 2 j 9 h
- PR mergées (30 j)
- 16
Description
#### 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
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.