Skip to content

Commit 339f82b

Browse files
authored
chore: skip flaky tests pre-work (#5680)
* chore: picker tests are passing but not pretty * chore: adding awaits to picker * chore: skip picker flaky tests * chore: refactored sendMousePlugin to accept targets and pointer positions * chore: updating sendMouse implementations * chore: updating sendMouse implementations saving before starting overlay * chore: investigating isInteractive * chore: overlay clean up * chore: lower threshold for skipping * chore: logging user agent * chore: cross checking flaky list and skipping * chore: added TODOs and final skips from CI failures * chore: locking playwright version to avoid browser install issues with web-test-runner * chore: tests are passing locally, firefox race condition and browser settings updated * chore: got some picker tests resolved with some wait helpers * chore: attempting to get webkit tab settings working * chore: attempting to get webkit tab settings working * chore: remove unknown option * chore: webkit hates feature flags * chore: fix memory test to headed * chore: trying to unbork webkit * chore: trying to unbork webkit * chore: resource class bump * chore: remove patch * Revert "chore: remove patch" This reverts commit a933fc9. * chore: modifying patch to be less aggressive * chore: fix patch format * chore: remove patch-package and patched the two web-test-runner packages with yarn patch * chore: bump circleci resource back down to xl * chore: adding back firefox parallelism * chore: store aritfact update * chore: another attempt * chore: another attempt * chore: trying to block vrt * chore: typo and skipping packages that were missed * chore: rename accordion memory test and define group in ci * chore: checking file output * chore: checking file output with run * chore: running with group * chore: remove echo update store results location * chore: reverting to original command for parallel * chore: add unit-ci empty group * chore: try chromium parallel * chore: supressing files from glob * chore: we grepping some files out
1 parent 8ede898 commit 339f82b

File tree

73 files changed

+2310
-2807
lines changed

Some content is hidden

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

73 files changed

+2310
-2807
lines changed

.circleci/config.yml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -207,45 +207,58 @@ commands:
207207
jobs:
208208
test-chromium:
209209
executor: node
210+
parallelism: 5
210211

211212
steps:
212213
- downstream
213214
- run:
214-
name: Run unit tests
215-
command: yarn test:focus no-memory-ci --config web-test-runner.config.ci-chromium.js --coverage
215+
name: Run chromium tests
216+
command: |
217+
TEST=$(circleci tests glob "{packages,tools}/*/test/*.test.js" | grep -v ".*-memory\.test\.js$" | circleci tests split --split-by=timings)
218+
yarn test:start --files $TEST --config web-test-runner.config.ci-chromium.js --group unit-ci
216219
- store_test_results:
217220
path: /root/project/results/
218221

219222
test-chromium-memory:
220223
executor: node
224+
parallelism: 5
221225

222226
steps:
223227
- downstream
224228
- run:
225229
name: Run memory tests
226-
command: yarn test:focus memory-ci --config web-test-runner.config.ci-chromium.js
230+
command: |
231+
TEST=$(circleci tests glob "{packages,tools}/*/test/*-memory.test.js" | grep -v "packages/color-.*/test/.*-memory\.test\.js" | grep -v "tools/grid/test/.*-memory\.test\.js" | circleci tests split --split-by=timings)
232+
echo $TEST
233+
yarn test:start --files $TEST --config web-test-runner.config.ci-chromium-memory.js --group unit-ci
227234
- store_test_results:
228235
path: /root/project/results/
229236

230237
test-firefox:
231238
executor: node
239+
parallelism: 5
232240

233241
steps:
234242
- downstream
235243
- run:
236-
name: Run tests
237-
command: yarn test:focus no-memory-ci --config web-test-runner.config.ci-firefox.js
244+
name: Run firefox tests
245+
command: |
246+
TEST=$(circleci tests glob "{packages,tools}/*/test/*.test.js" | grep -v ".*-memory\.test\.js$" | circleci tests split --split-by=timings)
247+
yarn test:start --files $TEST --config web-test-runner.config.ci-firefox.js --group unit-ci
238248
- store_test_results:
239249
path: /root/project/results/
240250

241251
test-webkit:
242252
executor: node
253+
parallelism: 5
243254

244255
steps:
245256
- downstream
246257
- run:
247-
name: Run tests
248-
command: yarn test:focus no-memory-ci --config web-test-runner.config.ci-webkit.js
258+
name: Run webkit tests
259+
command: |
260+
TEST=$(circleci tests glob "{packages,tools}/*/test/*.test.js" | grep -v ".*-memory\.test\.js$" | circleci tests split --split-by=timings)
261+
yarn test:start --files $TEST --config web-test-runner.config.ci-webkit.js --group unit-ci
249262
- store_test_results:
250263
path: /root/project/results/
251264

.github/workflows/coveralls.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
run: yarn playwright install --with-deps
2424

2525
- name: Run unit tests with coverage
26-
run: yarn test:ci --config web-test-runner.config.ci-chromium.js --group no-memory-ci --coverage
26+
run: yarn test:ci --config web-test-runner.config.ci-chromium.js --group unit --coverage
2727
continue-on-error: true
2828

2929
- name: Upload coverage to Coveralls
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/dist/PlaywrightLauncherPage.js b/dist/PlaywrightLauncherPage.js
2+
index 25ee08570e75005ce1100c52fa8dc1ac08e05109..8030b543e72815e55bfce78d6929c33a48022d88 100644
3+
--- a/dist/PlaywrightLauncherPage.js
4+
+++ b/dist/PlaywrightLauncherPage.js
5+
@@ -31,7 +31,7 @@ class PlaywrightLauncherPage {
6+
: undefined;
7+
// navigate to an empty page to kill any running code on the page, stopping timers and
8+
// breaking a potential endless reload loop
9+
- await this.playwrightPage.goto('about:blank');
10+
+ // await this.playwrightPage.goto('about:blank');
11+
await this.playwrightContext.close();
12+
return { testCoverage };
13+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
diff --git a/index.d.ts b/index.d.ts
2+
index f54053805353acd94b798642c7e7cadb9d54239e..5198ffac424cbaa0274ca67a99e1d5120ef091db 100644
3+
--- a/index.d.ts
4+
+++ b/index.d.ts
5+
@@ -1,2 +1,2 @@
6+
// this file is autogenerated with the generate-mjs-dts-entrypoints script
7+
-export * from './browser/commands.mjs';
8+
+export * from './browser/commands';

CONTRIBUTING.md

Lines changed: 116 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,42 @@ Welcome! We're excited you're interested in improving Spectrum Web Components. W
44

55
Here you'll find a broad overview of how you can get involved. Please read through these guidelines to help keep the contribution process smooth and to ensure we're all on the same page.
66

7-
- [Community \& support](#community--support)
8-
- [External contributors](#external-contributors)
9-
- [Internal contributors](#internal-contributors)
10-
- [How you can contribute](#how-you-can-contribute)
11-
- [Contributor license agreement](#contributor-license-agreement)
12-
- [Code of conduct](#code-of-conduct)
13-
- [Using the issue tracker](#using-the-issue-tracker)
14-
- [Before submitting a bug report](#before-submitting-a-bug-report)
15-
- [Bug reports](#bug-reports)
16-
- [Issue severity classification](#issue-severity-classification)
17-
- [Feature requests/new component](#feature-requestsnew-component)
18-
- [Pull requests](#pull-requests)
19-
- [Branches](#branches)
20-
- [Developing locally](#developing-locally)
21-
- [Testing](#testing)
22-
- [Documentation](#documentation)
23-
- [Best practices \& guidelines](#best-practices--guidelines)
24-
- [Code formatting](#code-formatting)
25-
- [Accessibility](#accessibility)
26-
- [Commit guidelines](#commit-guidelines)
27-
- [Thank you](#thank-you)
7+
- [Community \& support](#community--support)
8+
- [External contributors](#external-contributors)
9+
- [Internal contributors](#internal-contributors)
10+
- [How you can contribute](#how-you-can-contribute)
11+
- [Contributor license agreement](#contributor-license-agreement)
12+
- [Code of conduct](#code-of-conduct)
13+
- [Using the issue tracker](#using-the-issue-tracker)
14+
- [Before submitting a bug report](#before-submitting-a-bug-report)
15+
- [Bug reports](#bug-reports)
16+
- [Issue severity classification](#issue-severity-classification)
17+
- [Feature requests/new component](#feature-requestsnew-component)
18+
- [Pull requests](#pull-requests)
19+
- [Branches](#branches)
20+
- [Developing locally](#developing-locally)
21+
- [Testing](#testing)
22+
- [Patching dependencies](#patching-dependencies)
23+
- [Creating a patch](#creating-a-patch)
24+
- [How patches work](#how-patches-work)
25+
- [Updating existing patches](#updating-existing-patches)
26+
- [Best practices](#best-practices)
27+
- [Documentation](#documentation)
28+
- [Best practices \& guidelines](#best-practices--guidelines)
29+
- [Code formatting](#code-formatting)
30+
- [Accessibility](#accessibility)
31+
- [Commit guidelines](#commit-guidelines)
32+
- [Thank you](#thank-you)
2833

2934
---
3035

3136
## Community & support
3237

3338
A fantastic first step to contributing is filing an issue. This is where you can:
3439

35-
- Ask questions, file bugs, and troubleshoot with other users.
36-
- Propose new features and ideas or get feedback on your own through a linked pull request.
37-
- Additionally, you can check GitHub Discussions to stay up-to-date with any major announcements about the project.
40+
- Ask questions, file bugs, and troubleshoot with other users.
41+
- Propose new features and ideas or get feedback on your own through a linked pull request.
42+
- Additionally, you can check GitHub Discussions to stay up-to-date with any major announcements about the project.
3843

3944
### External contributors
4045

@@ -51,12 +56,12 @@ If you work for Adobe, our Slack channel #spectrum_web_components has some great
5156

5257
There's a common misconception that you need to code in order to contribute. In reality, there are many different ways to help:
5358

54-
- Filing well-structured bug reports that show what's broken and how to reproduce it.
55-
- Suggesting new features that improve the current design system.
56-
- Improving our documentation to make it clearer for the next person.
57-
- Reviewing pull requests from other community members and sharing feedback.
58-
- Helping other users on GitHub Discussions.
59-
- Advocating for the project on social media or at meetups.
59+
- Filing well-structured bug reports that show what's broken and how to reproduce it.
60+
- Suggesting new features that improve the current design system.
61+
- Improving our documentation to make it clearer for the next person.
62+
- Reviewing pull requests from other community members and sharing feedback.
63+
- Helping other users on GitHub Discussions.
64+
- Advocating for the project on social media or at meetups.
6065

6166
Of course, contributing code is also welcome from fixing a bug to building a brand-new component. All types of contributions help keep Spectrum Web Components thriving.
6267

@@ -98,12 +103,12 @@ If you're having a usage issue or need support, do not open an issue. Instead, r
98103

99104
When you file a bug, please use the `Bug Report` template provided in GitHub. Include the following information:
100105

101-
- A concise summary of the problem.
102-
- Relevant components involved in the issue.
103-
- Issue Severity based on our classifications defined below.
104-
- What you expected vs. what actually happened, along with any errors logged in the console.
105-
- Steps to reproduce the issue, preferably in an isolated environment, so that we can narrow down where the bug is originating from. (e.g., webcomponents.dev or CodePen). Be detailed if you write out the steps!
106-
- Relevant environment details (OS, browser, library version).
106+
- A concise summary of the problem.
107+
- Relevant components involved in the issue.
108+
- Issue Severity based on our classifications defined below.
109+
- What you expected vs. what actually happened, along with any errors logged in the console.
110+
- Steps to reproduce the issue, preferably in an isolated environment, so that we can narrow down where the bug is originating from. (e.g., webcomponents.dev or CodePen). Be detailed if you write out the steps!
111+
- Relevant environment details (OS, browser, library version).
107112

108113
Clear bug reports speed up the triage process, help us replicate the issue, and keep the project robust.
109114

@@ -126,8 +131,8 @@ Below is our issue severity classification criteria:
126131

127132
Is there something you wish the project did differently? Have a new component in mind? We love hearing new ideas and are eager to collaborate!
128133

129-
- Start with a discussion: Share your idea in Discussions to gather feedback and see if it aligns with project goals.
130-
- Open a feature request issue: After some positive initial conversation, open an issue using the `Feature Request` or `New Component` template with details and potential use cases.
134+
- Start with a discussion: Share your idea in Discussions to gather feedback and see if it aligns with project goals.
135+
- Open a feature request issue: After some positive initial conversation, open an issue using the `Feature Request` or `New Component` template with details and potential use cases.
131136

132137
---
133138

@@ -141,8 +146,8 @@ If you plan to fix a bug, create a feature, or improve documentation, follow the
141146

142147
We keep things organized with a branch naming strategy:
143148

144-
- `[username]/[short-description]` (e.g., `alex/fix-dropdown-bug`) is often all you need.
145-
- If your work references a known issue, you could also incorporate the issue number (e.g., `alex/123-bug-fix`).
149+
- `[username]/[short-description]` (e.g., `alex/fix-dropdown-bug`) is often all you need.
150+
- If your work references a known issue, you could also incorporate the issue number (e.g., `alex/123-bug-fix`).
146151

147152
Avoid editing distribution files (if present). Make changes to the source files, then allow the build system to generate any bundled or output files automatically.
148153

@@ -160,22 +165,82 @@ If you encounter hurdles, feel free to ask for help in your pull request or in t
160165

161166
Quality and stability are important. We require writing tests for any fixes or features you introduce. This helps ensure:
162167

163-
- Bugs don't resurface later.
164-
- New features work as intended for all users.
165-
- Overall library reliability remains high.
168+
- Bugs don't resurface later.
169+
- New features work as intended for all users.
170+
- Overall library reliability remains high.
166171

167172
Read about our testing guidance in the [README.md](README.md).
168173

169174
If you're unsure how to write tests for certain parts of the library, don't hesitate to ask maintainers for guidance. We appreciate every effort to keep the code solid!
170175

171176
---
172177

178+
## Patching dependencies
179+
180+
Sometimes you may need to temporarily patch a dependency to fix a bug or add functionality while waiting for an upstream fix. This project uses **Yarn 4's built-in patching system** instead of external tools like `patch-package`.
181+
182+
### Creating a patch
183+
184+
1. **Extract the package** for editing:
185+
186+
```bash
187+
yarn patch <package-name>
188+
```
189+
190+
Example:
191+
192+
```bash
193+
yarn patch @web/test-runner-playwright
194+
```
195+
196+
2. **Edit the extracted files** in the temporary directory that Yarn creates. Yarn will show you the path where you can make your changes.
197+
198+
3. **Commit the patch** once you're done editing:
199+
200+
```bash
201+
yarn patch-commit -s <temp-folder-path>
202+
```
203+
204+
Example:
205+
206+
```bash
207+
yarn patch-commit -s /private/var/folders/.../user
208+
```
209+
210+
### How patches work
211+
212+
- Patches are automatically stored in `.yarn/patches/` directory
213+
- They are applied automatically during `yarn install`
214+
- Patches are version-specific and will need to be recreated if the dependency version changes
215+
- All patches are committed to the repository so they apply for all contributors
216+
217+
### Updating existing patches
218+
219+
To modify an existing patch:
220+
221+
```bash
222+
yarn patch <package-name> --update
223+
```
224+
225+
This will extract the current patched version, allowing you to make additional changes.
226+
227+
### Best practices
228+
229+
- **Keep patches minimal**: Only change what's necessary to fix the specific issue
230+
- **Document the reason**: Add comments in your pull request explaining why the patch is needed
231+
- **Plan for removal**: Patches should be temporary until the upstream fix is available
232+
- **Test thoroughly**: Ensure your patch doesn't break other functionality
233+
234+
For more details, see the [Yarn patching documentation](https://yarnpkg.com/features/patching).
235+
236+
---
237+
173238
## Documentation
174239
175240
In addition to well-tested code, documentation is crucial. Whenever you add or change a feature,include documentation for it in the relevant areas:
176241
177-
- **README.md**: Each component has a README within its directory. Ensure your changes are included here. This file is used in our generated documentation site.
178-
- **Comment annotations**: We use comment-based documentation ([JSDocs](https://jsdoc.app/)) so that references are generated automatically where possible.
242+
- **README.md**: Each component has a README within its directory. Ensure your changes are included here. This file is used in our generated documentation site.
243+
- **Comment annotations**: We use comment-based documentation ([JSDocs](https://jsdoc.app/)) so that references are generated automatically where possible.
179244
180245
Accessible, helpful docs are a huge win for everyone, especially newcomers.
181246
@@ -191,9 +256,9 @@ We rely on automated tools like Prettier, ESLint, and Stylelint to enforce style
191256
192257
Since this project is used by a diverse audience, the accessibility of our product is of utmost importance. Features will be evaluated for inclusivity by:
193258
194-
- The use of semantic markup.
195-
- Labeled interactive elements with appropriate accordance's.
196-
- Accounting for appropriate states, such as focus and keyboard navigation, according to [standards](https://www.w3.org/WAI/perspective-videos/keyboard/).
259+
- The use of semantic markup.
260+
- Labeled interactive elements with appropriate accordance's.
261+
- Accounting for appropriate states, such as focus and keyboard navigation, according to [standards](https://www.w3.org/WAI/perspective-videos/keyboard/).
197262

198263
If you're unsure about an accessibility detail, the [Web Accessibility Initiative (WAI) ARIA Practices Guide (APG)](https://www.w3.org/WAI/ARIA/apg/patterns/) is a good place to start. You can also open a discussion or ask in your PR.
199264
@@ -206,9 +271,9 @@ As mentioned previously, we use [Conventional Commit](https://www.conventionalco
206271
207272
Examples:
208273
209-
- `feat(sp-card): add shadow styles for theme consistency`
210-
- `fix(sp-action-menu): correct arrow key navigation in nested menus`
211-
- `docs: clarify how to submit bug reports`
274+
- `feat(sp-card): add shadow styles for theme consistency`
275+
- `fix(sp-action-menu): correct arrow key navigation in nested menus`
276+
- `docs: clarify how to submit bug reports`
212277
213278
This helps us track changes in a predictable way and automate versioning.
214279

0 commit comments

Comments
 (0)