-
Notifications
You must be signed in to change notification settings - Fork 7
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
Playwright config and Wallet Connection Test #507
Conversation
✅ Deploy Preview for fractal-framework-interface-dev ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good. 2 notes and 2 changes
Removed tests-examples from tsconfig.json/.gitignore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Hey @SudoPumpkin ! This is looking great! First thing I encountered, the tests failed because the browsers weren't installed. I was able to fix this with After that, I was able to get the first three tests to pass, 84cc575de84edeb083587000e254b8f1f8720e57.webmCould @Da-Colon or @mudrila try running this locally as well (using the Testing steps above), and see if you encounter the same issues? |
@herbig Are you running a local hardhat node when running the tests? There is one step here that is missing. Adding to
I would comment these out when not trying to run these tests but these are needed currently for the tests to run |
In the future this will all run in a dockerized container and there will be no need to set these here |
dammit, cool will do that. Yeah I realize this will be dockerized, just wanted to make sure it's working locally just as a spot check |
@Da-Colon I added these to Is it working locally for you? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it working and tests passed!
@herbig I ran into the same thing. I see that @SudoPumpkin added this step into the instructions in this PR, but I agree that running |
o weird I didn't have to do npx playwright install just a normal |
Description
Playwright has been installed in this PR with 2 tests.
One test confirms navigation to the Fractal app via http://localhost:3000.
The second test navigates to http://localhost:3000, confirms local wallet is present, and connects to the wallet.
A GitHub Actions yml has not been included as of yet.
Notes
The user will need to run a local version of hardhat(blockchain node), start the fractal-interface app, then run the playwright tests.
Issue (if applicable)
Testing
npm i
npx playwright install
.env.local
file to the root of the project with the following information:Comment these out when not trying to run these tests
npx hardhat node
npm start
npx playwright test
in terminal 'A'To test individual tests use the following:
npx playwright test tests/nameOfTest
Example:
npx playwright test tests/ConfirmWalletConnect.spec.ts
To view the tests in a browser(Headful) append the following to your command line:
--headed
Example:
npx playwright test tests/ConfirmWalletConnect.spec.ts --headed
To use particular browser types append the following to your command line:
--project=browserName
Example:
npx playwright test tests/ConfirmWalletConnect.spec.ts --headed --project=chromium
Screenshots (if applicable)