From 0961c48313d5c255259f7acb6097ef018e8a2482 Mon Sep 17 00:00:00 2001 From: Pavel Feldman Date: Tue, 28 Feb 2023 08:57:46 -0800 Subject: [PATCH] Update bug.md Strong-require repro steps. Signed-off-by: Pavel Feldman --- .github/ISSUE_TEMPLATE/bug.md | 87 ++++++++++++++++++++++------------- 1 file changed, 55 insertions(+), 32 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md index 6b212dcc69..370d836a4e 100644 --- a/.github/ISSUE_TEMPLATE/bug.md +++ b/.github/ISSUE_TEMPLATE/bug.md @@ -7,43 +7,66 @@ assignees: '' --- -**Context:** -- Playwright Version: [what Playwright version do you use?] -- Operating System: [e.g. Windows, Linux or Mac] -- Node.js version: [e.g. 12.22, 14.6] -- Browser: [e.g. All, Chromium, Firefox, WebKit] -- Extra: [any specific details about your environment] + - - + + + -**Code Snippet** +### System info +- Playwright Version: [v1.XX] +- Operating System: [All, Windows 11, Ubuntu 20, macOS 13.2, etc.] +- Browser: [All, Chromium, Firefox, WebKit] +- Other info: -Help us help you! Put down a short code snippet that illustrates your bug and -that we can run and debug locally. For example: +### Source code -```javascript -const {chromium, webkit, firefox} = require('playwright'); +- [ ] I provided exact source code that allows reproducing the issue locally. -(async () => { - const browser = await chromium.launch(); - const context = await browser.newContext(); - const page = await context.newPage(); - - // Please include a snippet of HTML that shows an example of the content - // you are testing. - await page.setContent(` -
- … -
- `); - // Alternatively, if you are testing a public application, include the URL: - // await page.goto('https://example.com/') - - await page.locator(…); -})(); + + + + + +**Link to the GitHub repository with the repro** + +[https://github.com/your_profile/playwright_issue_title] + +or + +**Config file** + +```js +// playwright.config.ts +import { defineConfig, devices } from '@playwright/test'; + +export default defineConfig({ + projects: [ + { + name: 'chromium', + use: { ...devices['Desktop Chrome'], }, + }, +}); ``` -**Describe the bug** +**Test file (self-contained)** -Add any other details about the problem here. +```js +it('should check the box using setChecked', async ({ page }) => { + await page.setContent(``); + await page.getByRole('checkbox').check(); + await expect(page.getByRole('checkbox')).toBeChecked(); +}); +``` + +**Steps** +- [Run the test] +- [...] + +**Expected** + +[Describe expected behavior] + +**Actual** + +[Describe actual behavior]