From c7beebb40f0fb0f6f7ef0a6d3f01658a013fe751 Mon Sep 17 00:00:00 2001 From: Michael Seele Date: Fri, 28 Jul 2023 22:19:01 +0200 Subject: [PATCH] fix api-testing example (#24407) --- docs/src/api-testing-js.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/api-testing-js.md b/docs/src/api-testing-js.md index 7a77e5a9b6..7c7fe1d94f 100644 --- a/docs/src/api-testing-js.md +++ b/docs/src/api-testing-js.md @@ -234,7 +234,7 @@ test.afterAll(async ({ }) => { await apiContext.dispose(); }); -test('last created issue should be on the server', async ({ page, request }) => { +test('last created issue should be on the server', async ({ page }) => { await page.goto(`https://github.com/${USER}/${REPO}/issues`); await page.getByText('New Issue').click(); await page.getByRole('textbox', { name: 'Title' }).fill('Bug report 1'); @@ -242,7 +242,7 @@ test('last created issue should be on the server', async ({ page, request }) => await page.getByText('Submit new issue').click(); const issueId = page.url().substr(page.url().lastIndexOf('/')); - const newIssue = await request.get(`https://api.github.com/repos/${USER}/${REPO}/issues/${issueId}`); + const newIssue = await apiContext.get(`https://api.github.com/repos/${USER}/${REPO}/issues/${issueId}`); expect(newIssue.ok()).toBeTruthy(); expect(newIssue.json()).toEqual(expect.objectContaining({ title: 'Bug report 1'