Skip to content

Commit f4dd393

Browse files
Merge branch 'microsoft:main' into main
2 parents ac7fb5f + 4819747 commit f4dd393

File tree

1,683 files changed

+140966
-53341
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,683 files changed

+140966
-53341
lines changed

.devcontainer/devcontainer.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

.eslintignore

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
test/assets/modernizr.js
2+
/tests/third_party/
23
/packages/*/lib/
34
*.js
45
/packages/playwright-core/src/generated/*
56
/packages/playwright-core/src/third_party/
67
/packages/playwright-core/types/*
8+
/packages/playwright-ct-core/src/generated/*
79
/index.d.ts
8-
utils/generate_types/overrides.d.ts
9-
utils/generate_types/test/test.ts
1010
node_modules/
11-
browser_patches/*/checkout/
12-
browser_patches/chromium/output/
1311
**/*.d.ts
1412
output/
1513
test-results/
16-
tests/components/
17-
tests/installation/fixture-scripts/
18-
examples/
14+
/tests/components/
15+
/tests/installation/fixture-scripts/
1916
DEPS
20-
.cache/
17+
.cache/
18+
/utils/

.eslintrc-with-ts-config.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module.exports = {
2+
extends: "./.eslintrc.js",
3+
parserOptions: {
4+
ecmaVersion: 9,
5+
sourceType: "module",
6+
project: "./tsconfig.json",
7+
},
8+
rules: {
9+
"@typescript-eslint/no-base-to-string": "error",
10+
"@typescript-eslint/no-unnecessary-boolean-literal-compare": 2,
11+
},
12+
parserOptions: {
13+
project: "./tsconfig.json"
14+
},
15+
};

.eslintrc.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,14 @@ module.exports = {
66
sourceType: "module",
77
},
88
extends: [
9+
"plugin:react/recommended",
910
"plugin:react-hooks/recommended"
1011
],
1112

13+
settings: {
14+
react: { version: "18" }
15+
},
16+
1217
/**
1318
* ESLint rules
1419
*
@@ -30,6 +35,7 @@ module.exports = {
3035
"avoidEscape": true,
3136
"allowTemplateLiterals": true
3237
}],
38+
"jsx-quotes": [2, "prefer-single"],
3339
"no-extra-semi": 2,
3440
"@typescript-eslint/semi": [2],
3541
"comma-style": [2, "last"],
@@ -48,6 +54,7 @@ module.exports = {
4854
"arrow-parens": [2, "as-needed"],
4955
"prefer-const": 2,
5056
"quote-props": [2, "consistent"],
57+
"nonblock-statement-body-position": [2, "below"],
5158

5259
// anti-patterns
5360
"no-var": 2,
@@ -108,19 +115,23 @@ module.exports = {
108115
"@typescript-eslint/type-annotation-spacing": 2,
109116

110117
// file whitespace
111-
"no-multiple-empty-lines": [2, {"max": 2}],
118+
"no-multiple-empty-lines": [2, {"max": 2, "maxEOF": 0}],
112119
"no-mixed-spaces-and-tabs": 2,
113120
"no-trailing-spaces": 2,
114121
"linebreak-style": [ process.platform === "win32" ? 0 : 2, "unix" ],
115122
"indent": [2, 2, { "SwitchCase": 1, "CallExpression": {"arguments": 2}, "MemberExpression": 2 }],
116123
"key-spacing": [2, {
117124
"beforeColon": false
118125
}],
126+
"eol-last": 2,
119127

120128
// copyright
121129
"notice/notice": [2, {
122130
"mustMatch": "Copyright",
123131
"templateFile": require("path").join(__dirname, "utils", "copyright.js"),
124132
}],
133+
134+
// react
135+
"react/react-in-jsx-scope": 0
125136
}
126137
};

.github/ISSUE_TEMPLATE/bug.md

Lines changed: 0 additions & 73 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: Bug Report 🪲
2+
description: Create a bug report to help us improve
3+
title: '[Bug]: '
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
# Please follow these steps first:
9+
- type: markdown
10+
attributes:
11+
value: |
12+
## Troubleshoot
13+
If Playwright is not behaving the way you expect, we'd ask you to look at the [documentation](https://playwright.dev/docs/intro) and search the issue tracker for evidence supporting your expectation.
14+
Please make reasonable efforts to troubleshoot and rule out issues with your code, the configuration, or any 3rd party libraries you might be using.
15+
Playwright offers [several debugging tools](https://playwright.dev/docs/debug) that you can use to troubleshoot your issues.
16+
- type: markdown
17+
attributes:
18+
value: |
19+
## Ask for help through appropriate channels
20+
If you feel unsure about the cause of the problem, consider asking for help on for example [StackOverflow](https://stackoverflow.com/questions/ask) or our [Discord channel](https://aka.ms/playwright/discord) before posting a bug report. The issue tracker is not a help forum.
21+
- type: markdown
22+
attributes:
23+
value: |
24+
## Make a minimal reproduction
25+
To file the report, you will need a GitHub repository with a minimal (but complete) example and simple/clear steps on how to reproduce the bug.
26+
The simpler you can make it, the more likely we are to successfully verify and fix the bug. You can create a new project with `npm init playwright@latest new-project` and then add the test code there.
27+
Please make sure you only include the code and the dependencies absolutely necessary for your repro. Due to the security considerations, we can only run the code we trust. Major web frameworks are Ok to use, but smaller convenience libraries are not.
28+
- type: markdown
29+
attributes:
30+
value: |
31+
> [!IMPORTANT]
32+
> Bug reports without a minimal reproduction will be rejected.
33+
34+
---
35+
- type: input
36+
id: version
37+
attributes:
38+
label: Version
39+
description: |
40+
The version of Playwright you are using.
41+
Is it the [latest](https://github.com/microsoft/playwright/releases)? Test and see if the bug has already been fixed.
42+
placeholder: ex. 1.41.1
43+
validations:
44+
required: true
45+
- type: textarea
46+
id: reproduction
47+
attributes:
48+
label: Steps to reproduce
49+
description: Please link to a repository with a minimal reproduction and describe accurately how we can reproduce/verify the bug.
50+
placeholder: |
51+
Example steps (replace with your own):
52+
1. Clone my repo at https://github.com/<myuser>/example
53+
2. npm install
54+
3. npm run test
55+
4. You should see the error come up
56+
validations:
57+
required: true
58+
- type: textarea
59+
id: expected
60+
attributes:
61+
label: Expected behavior
62+
description: A description of what you expect to happen.
63+
placeholder: I expect to see X or Y
64+
validations:
65+
required: true
66+
- type: textarea
67+
id: what-happened
68+
attributes:
69+
label: Actual behavior
70+
description: |
71+
A clear and concise description of the unexpected behavior.
72+
Please include any relevant output here, especially any error messages.
73+
placeholder: A bug happened!
74+
validations:
75+
required: true
76+
- type: textarea
77+
id: context
78+
attributes:
79+
label: Additional context
80+
description: Anything else that might be relevant
81+
validations:
82+
required: false
83+
- type: textarea
84+
id: envinfo
85+
attributes:
86+
label: Environment
87+
description: |
88+
Please paste the output of running `npx envinfo --preset playwright`.
89+
This will be automatically formatted as a code block, so no need for backticks.
90+
placeholder: |
91+
System:
92+
OS: Linux 6.2 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
93+
CPU: (8) arm64
94+
Binaries:
95+
Node: 18.19.0 - ~/.nvm/versions/node/v18.19.0/bin/node
96+
npm: 10.2.3 - ~/.nvm/versions/node/v18.19.0/bin/npm
97+
npmPackages:
98+
@playwright/test: 1.41.1 => 1.41.1
99+
render: shell
100+
validations:
101+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
blank_issues_enabled: false
12
contact_links:
23
- name: Join our Discord Server
34
url: https://aka.ms/playwright/discord
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Documentation 📖
2+
description: Submit a request to add or update documentation
3+
title: '[Docs]: '
4+
labels: ['Documentation :book:']
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
### Thank you for helping us improve our documentation!
10+
Please be sure you are looking at [the Next version of the documentation](https://playwright.dev/docs/next/intro) before opening an issue here.
11+
- type: textarea
12+
id: links
13+
attributes:
14+
label: Page(s)
15+
description: |
16+
Links to one or more documentation pages that should be modified.
17+
If you are reporting an issue with a specific section of a page, try to link directly to the nearest anchor.
18+
If you are suggesting that a new page be created, link to the parent of the proposed page.
19+
validations:
20+
required: true
21+
- type: textarea
22+
id: description
23+
attributes:
24+
label: Description
25+
description: |
26+
Describe the change you are requesting.
27+
If the issue pertains to a single function or matcher, be sure to specify the entire call signature.
28+
validations:
29+
required: true

.github/ISSUE_TEMPLATE/feature.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Feature Request 🚀
2+
description: Submit a proposal for a new feature
3+
title: '[Feature]: '
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
### Thank you for taking the time to suggest a new feature!
9+
- type: textarea
10+
id: description
11+
attributes:
12+
label: '🚀 Feature Request'
13+
description: A clear and concise description of what the feature is.
14+
validations:
15+
required: true
16+
- type: textarea
17+
id: example
18+
attributes:
19+
label: Example
20+
description: Describe how this feature would be used.
21+
validations:
22+
required: false
23+
- type: textarea
24+
id: motivation
25+
attributes:
26+
label: Motivation
27+
description: |
28+
Outline your motivation for the proposal. How will it make Playwright better?
29+
validations:
30+
required: true

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)