Skip to content

Commit 6b8c11e

Browse files
authored
Changed page.post to request.post after changing baseURL
The correct function call here is request.post(...), not page.post(...). The sample code has been modified to reflect this.
1 parent 9ff8677 commit 6b8c11e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/content/5/en/part5d.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -980,14 +980,14 @@ All the commands in the tests that use the application url, e.g.
980980

981981
```js
982982
await page.goto('http://localhost:5173')
983-
await page.post('http://localhost:5173/api/testing/reset')
983+
await request.post('http://localhost:5173/api/testing/reset')
984984
```
985985

986986
can now be transformed into:
987987

988988
```js
989989
await page.goto('/')
990-
await page.post('/api/testing/reset')
990+
await request.post('/api/testing/reset')
991991
```
992992

993993
The current code for the tests is on [GitHub](https://github.com/fullstack-hy2020/notes-e2e/tree/part5-2), branch <i>part5-2</i>.

0 commit comments

Comments
 (0)