Skip to content
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

Add smoke tests in CI #415

Open
TalDerei opened this issue Jan 26, 2024 · 10 comments
Open

Add smoke tests in CI #415

TalDerei opened this issue Jan 26, 2024 · 10 comments
Labels
ci/cd Deployment and github action related testing Related to writing tests

Comments

@TalDerei
Copy link
Contributor

TalDerei commented Jan 26, 2024

Implement the playwright end-to-end testing framework in our CI pipeline to check against transaction building.

@github-project-automation github-project-automation bot moved this to 🗄️ Backlog in Penumbra web Jan 26, 2024
@TalDerei TalDerei added testing Related to writing tests ci/cd Deployment and github action related labels Jan 26, 2024
@TalDerei TalDerei moved this from 🗄️ Backlog to 📝 Todo in Penumbra web Jan 26, 2024
@TalDerei TalDerei self-assigned this Jan 26, 2024
@grod220
Copy link
Contributor

grod220 commented Jan 26, 2024

What kind of things would these test help catch that we currently don't have coverage for?

Also, Vitest comes with "browser mode" that we've used to do headless browser testing. See crypto package for an example. Ideally, we could use this.

@TalDerei
Copy link
Contributor Author

What kind of things would these test help catch that we currently don't have coverage for?

We currently don't have any smoke-test coverage against whether a transaction can be successfully built / broadcast given a set of code changes. For instance, this would have caught #416 before being committed to main.

@turbocrime
Copy link
Contributor

turbocrime commented Jan 26, 2024

Also, Vitest comes with "browser mode" that we've used to do headless browser testing. See crypto package for an example. Ideally, we could use this.

we currently use the "playwright" backend of vitest browser mode for those tests.

but vitest's 'browser' mode is considered unstable, and is mostly undocumented. it supports multiple backends, but its outward-facing api is fairly limited and generic - it doesn't provide access to all of the features of each underlying backend.

notably it does not seem to consider browser extensions at all. it does provide access to 'launchOptions' of playwright as 'launch' within the browser config, so we could load an extension into the browser that way. but i can't find a single example of anyone on github actually using this config field in a meaningful way

seeing issues like vitest-dev/vitest#4918 makes me skeptical that we would have enough control

it seems like there are ways to more manually use playwright in vitest

and it seems like there is @crxjs/chrome-extension-tools a vite-plugin for exactly our use case that may be worth exploring

@turbocrime
Copy link
Contributor

playwright doesn't support hash routers

@turbocrime turbocrime self-assigned this Jan 27, 2024
@turbocrime
Copy link
Contributor

#418 gave playwright a try idk

@TalDerei TalDerei moved this from 📝 Todo to 🏗 In progress in Penumbra web Jan 27, 2024
@turbocrime
Copy link
Contributor

the other option is webdriverio https://webdriver.io/docs/extension-testing/web-extensions/

same problem with potentially omitted features in vitest api wrapper

@jessepinho
Copy link
Contributor

I can take this on after I'm done with #422

@grod220
Copy link
Contributor

grod220 commented Feb 6, 2024

We briefly chatted on this in some sync. This should be de-prioritized for a few months and kick it back to the backlog for later revisiting. Getting feature complete for mainnet is the main priority.

@jessepinho
Copy link
Contributor

Ah, right — thanks for the reminder

@grod220 grod220 moved this from 🏗 In progress to 🗄️ Backlog in Penumbra web Feb 7, 2024
@TalDerei
Copy link
Contributor Author

TalDerei commented Sep 17, 2024

we should probably dedicate some effort towards this soonish in relation with prax-wallet/prax#146?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/cd Deployment and github action related testing Related to writing tests
Projects
Status: 🗄️ Backlog
Development

No branches or pull requests

4 participants