Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

fix api-testing example (#24407)

Michael Seelec7beebb40f0f
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'