-
Notifications
You must be signed in to change notification settings - Fork 13
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
homebase-app: Integrate testing suite #673
Comments
This is a priority immediately after my onboarding. |
Duplicate issue: #702
|
Tests being referred to seem to be in this repository: https://github.com/W3DevTeam/TezosHomebaseTests name: Playwright Tests
on:
deployment_status:
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
if: github.event.deployment_status.state == 'success'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm ci
- name: Install Playwright
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test
env:
PLAYWRIGHT_TEST_BASE_URL: ${{ github.event.deployment_status.target_url }} Playwright has good documentation to execute on this: https://playwright.dev/docs/ci-intro |
Sadly, Netlfiy does not currently send a |
Current approach seems to be working but CSS class paths seem to be the cause of the current test failures (timeouts likely due to being unable to find the elements) |
It seems like the first test is now getting stuck when it's prompted to connect a wallet when it clicks the deploy button |
WIP pull request: #740 |
@Man-Jain @EightRice @thenerdcat Were the tests intended to work without a wallet connection? I'm asking because it seems like a wallet was never setup for the tests and yet, when I'm debugging the first test case, it seems to be getting stuck at the wallet connection prompt: |
Andrei has custom deployment preview for hardcoded wallet which can be extended |
@benefacto This is the deploy preview with the hardcoded wallet: https://deploy-preview-629--tezos-homebase.netlify.app/ |
This pull request reconfigured the codebase to be testable: #629 |
Will actually need to use a URL parameter to handle the test mode, maybe something like this: Approach 1: Higher-Order Component (HOC)You can create a HOC that wraps your components and automatically appends the test mode parameter to any navigation links.
Approach 2: Custom HookAlternatively, you can create a custom hook to handle the navigation logic with the test mode parameter.
In both approaches, the test mode parameter is preserved in the URL during navigation. This helps maintain a consistent application state based on the URL parameter, ensuring that the test mode remains active across different views and user interactions. Choose the approach that best fits your application architecture and coding style. |
Need access to LaunchDarkly as that's the feature flag system that's already setup:
|
Magenta now has access and can grant me it |
What's remaining on this one is to setup a feature flag (LaunchDarkly) such that when it is passed, the app is considered to be in test mode (using the test wallet rather than the connected one), then this URL should be used by the GitHub action for testing purposes (possible that you might need a wait for Netlify action: https://github.com/JakePartusch/wait-for-netlify-action); possible that tests may need tweaks to use the latest UI |
Have the tests perform on every merge / PR creation
The text was updated successfully, but these errors were encountered: