New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/pkgsite: frontend testing strategy #43361
Comments
Change https://golang.org/cl/280711 mentions this issue: |
Change https://golang.org/cl/280893 mentions this issue: |
This change updates the jest config to specify test environments separately for unit and e2e tests and adds the isolated modules option to the ts-jest config to improve test startup time. For golang/go#43361 Change-Id: I3fbfae2a42c26bd0eeb2d235dab1cced0c8701ea Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/280711 Trust: Jamal Carvalho <jamal@golang.org> Run-TryBot: Jamal Carvalho <jamal@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
Migrates CopyToClipboardController to TypeScript and adds a unit test. For golang/go#43359 For golang/go#43361 Change-Id: I2e1179aa7cecb0e280a57d420ee2f885c4d6db3c Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/280893 Reviewed-by: Julie Qiu <julie@golang.org> Trust: Jamal Carvalho <jamal@golang.org>
Change https://golang.org/cl/292691 mentions this issue: |
Change https://golang.org/cl/292694 mentions this issue: |
Change https://golang.org/cl/292695 mentions this issue: |
Change https://golang.org/cl/292696 mentions this issue: |
Change https://golang.org/cl/292697 mentions this issue: |
Change https://golang.org/cl/292698 mentions this issue: |
Change https://golang.org/cl/292699 mentions this issue: |
Change https://golang.org/cl/292700 mentions this issue: |
Change https://golang.org/cl/292702 mentions this issue: |
- Updates version string from various dependencies to fix at an exact version. - Refactors scripts to simplify future CI configuration. For golang/go#43361 Change-Id: I73a48bf24a9126c01481c1744567297110b89b46 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/292691 Trust: Jamal Carvalho <jamal@golang.org> Reviewed-by: Julie Qiu <julie@golang.org>
These dockerfiles will create the images used during CI testing. For golang/go#43361 Change-Id: I638b12709fd1a8b3f4bd06448d5e952345cd3917 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/292694 Trust: Jamal Carvalho <jamal@golang.org> Run-TryBot: Jamal Carvalho <jamal@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
For golang/go#43361 Change-Id: I5303902f29c746638c7a562833be52d3403d972f Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/292702 Trust: Jamal Carvalho <jamal@golang.org> Run-TryBot: Jamal Carvalho <jamal@golang.org> Reviewed-by: Jonathan Amsterdam <jba@google.com>
The config creates the following services - nodejs: used to run npm commands, a slight refactor of the existing config for npm in docker-compose.yaml - ci: extends nodejs, used to run the e2e tests - frontend: runs the frontend server - migrate: runs database migrations - wait_for_db: a utility service, used to delay the start of the migrations until the db is ready for connections - db: exposes a postgres database Using the devtools/docker_compose.sh script we can run these services and perform the relevant cleanup. The script exposes the nodejs and ci services. We'll use it in all.bash and CI to run the linters and tests for frontend assets. For golang/go#43361 Change-Id: Ie9c91058f9c6796b737e94c237b2d99f612f45a7 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/292695 Trust: Jamal Carvalho <jamal@golang.org> Reviewed-by: Julie Qiu <julie@golang.org>
- Create a command to run npm scripts as a relacement for devtools/npm.sh. - Adds unit tests to all.bash run and a commmand to e2e tests locally. For golang/go#43361 Change-Id: I8bff0358c9e71b6790ee2f1516716c46bc07a702 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/292696 Trust: Jamal Carvalho <jamal@golang.org> Run-TryBot: Jamal Carvalho <jamal@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Julie Qiu <julie@golang.org> Reviewed-by: Jonathan Amsterdam <jba@google.com>
Summary
The frontend testing strategy will include a combination of unit, e2e, visual diffing, accessibility, and performance tests using Puppeteer and the Jest testing framework. Lighthouse will be integrated in the testing suite to make assertions on performance and accessibility.
Details
Code in script files should be tested by co-located .test.ts files.
Snapshot tests will be written for pages served by the pkgsite.
Example performance tests.
Related Issues
The text was updated successfully, but these errors were encountered: