-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Background: Upon running the frontend tests, you can see there are many unexpected logs being printed out. This ranges from: 1. 404 Network Requests ([Example](https://github.com/GoogleChrome/webstatus.dev/actions/runs/12553689104/job/35001422582#step:6:10143)) 2. Uncaught exceptions ([Example](https://github.com/GoogleChrome/webstatus.dev/actions/runs/12553689104/job/35001422582#step:6:10178)) 3. Inefficient rendering ([Example](https://github.com/GoogleChrome/webstatus.dev/actions/runs/12553689104/job/35001422582#step:6:10338)) 4. An error was thrown in a Promise outside a test ([Example](https://github.com/GoogleChrome/webstatus.dev/actions/runs/12553689104/job/35001422582#step:6:10173)) **Case 1** Problem: - Tests are missing static resources Remedy: - Copy the static resources to same folder as the compiled tests. - Shoelace-only assets: Adjust the test html in web-test-runner.config.mjs to set the path for shoelace assets like we do in our main [index.ts](https://github.com/GoogleChrome/webstatus.dev/blob/4b8b4696cd20c37bec10b187190863266593bd4d/frontend/src/static/js/index.ts#L47) **Case 2** Remedy: Adjust the individual tests to fix the problems **Case 3** Remedy: - Remove unnecessary reactivity from certain class members for each instance - Specifically for `sl-tree-item`: Add lazy attribute. Its reactivity was causing internal re-rendering. After reading the shoelace code, I saw that setting lazy could help.
- Loading branch information
1 parent
df141c5
commit 324eea2
Showing
9 changed files
with
87 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters