-
Notifications
You must be signed in to change notification settings - Fork 45
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
Easily switch between multiple backends #2079
Comments
I would modify it in runtime in playwright, and incrementally add some tests with mocks for nexus either addInitScriptin test use https://playwright.dev/docs/api/class-page#page-add-init-script await page.addInitScript(() => window.REACT_APP_BACKEND = 'nexus')
await page.goto('/') in code export const backend = () => window.REACT_APP_BACKEND || process.env.REACT_APP_BACKEND || BackendAPIs.OasisMonitor or localStoragein test do what we do for addPersistedStorageV1 (open non-javascripty page, set storage, open javascripty) await page.goto('/app.webmanifest')
await page.evaluate(() => window.localStorage.REACT_APP_BACKEND = 'nexus');
await page.goto('/') in code export const backend = () => window.localStorage.REACT_APP_BACKEND || process.env.REACT_APP_BACKEND || BackendAPIs.OasisMonitor maybe these should just be part of mockApi, and rename it to mockApiOasisscan 🤷 |
Doesn't api-transaction-methods.cy.ts help us if v2 doesn't provide types for tx methods? |
cypress test is not a blooker atm. moved it to #2086 |
Currently, all Playwrights mocks are bound to
oasisscan
. Switching app backend should be more flexible.Options:
oasisscan
backend when running e2e (or any that we thing is primary)The text was updated successfully, but these errors were encountered: