mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
Update bug.md
Strong-require repro steps. Signed-off-by: Pavel Feldman <pavel.feldman@gmail.com>
This commit is contained in:
parent
274939eaf8
commit
0961c48313
87
.github/ISSUE_TEMPLATE/bug.md
vendored
87
.github/ISSUE_TEMPLATE/bug.md
vendored
@ -7,43 +7,66 @@ assignees: ''
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
**Context:**
|
<!-- ⚠️⚠️ Do not delete this template ⚠️⚠️ -->
|
||||||
- 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]
|
|
||||||
|
|
||||||
<!-- CLI to auto-capture this info -->
|
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
|
||||||
<!-- npx envinfo --preset playwright --markdown -->
|
<!-- 🧪 Test using the latest Playwright release to see if your issue has already been fixed -->
|
||||||
|
<!-- 💡 Provide enough information for us to be able to reproduce your issue locally -->
|
||||||
|
|
||||||
**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
|
### Source code
|
||||||
that we can run and debug locally. For example:
|
|
||||||
|
|
||||||
```javascript
|
- [ ] I provided exact source code that allows reproducing the issue locally.
|
||||||
const {chromium, webkit, firefox} = require('playwright');
|
|
||||||
|
|
||||||
(async () => {
|
<!-- For simple cases, please provide a self-contained test file along with the config file -->
|
||||||
const browser = await chromium.launch();
|
<!-- For larger cases, you can provide a GitHub repo you created for this issue -->
|
||||||
const context = await browser.newContext();
|
<!-- If we can not reproduce the problem locally, we won't be able to act on it -->
|
||||||
const page = await context.newPage();
|
<!-- You can still file without the exact code and we will try to help, but if we can't repro, it will be closed -->
|
||||||
|
|
||||||
// Please include a snippet of HTML that shows an example of the content
|
**Link to the GitHub repository with the repro**
|
||||||
// you are testing.
|
|
||||||
await page.setContent(`
|
[https://github.com/your_profile/playwright_issue_title]
|
||||||
<div>
|
|
||||||
…
|
or
|
||||||
</div>
|
|
||||||
`);
|
**Config file**
|
||||||
// Alternatively, if you are testing a public application, include the URL:
|
|
||||||
// await page.goto('https://example.com/')
|
```js
|
||||||
|
// playwright.config.ts
|
||||||
await page.locator(…);
|
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(`<input id='checkbox' type='checkbox'></input>`);
|
||||||
|
await page.getByRole('checkbox').check();
|
||||||
|
await expect(page.getByRole('checkbox')).toBeChecked();
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
**Steps**
|
||||||
|
- [Run the test]
|
||||||
|
- [...]
|
||||||
|
|
||||||
|
**Expected**
|
||||||
|
|
||||||
|
[Describe expected behavior]
|
||||||
|
|
||||||
|
**Actual**
|
||||||
|
|
||||||
|
[Describe actual behavior]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user