[codex] Add end-to-end testing workflow#1239
Draft
rossgalloway wants to merge 30 commits into
Draft
Conversation
) * feat: init portfolio history * fix: build * fix: getEnv * fix: env * fix: localhost connection attempt * chore: debug * chore: attempt * feat: add v2 support * fix: transfers calculation * chore: rm clearCache * feat: calculate gauge * fix: loading state * fix: optimize pps fetch * chore: rename * feat: add breakdown * feat: store aggregated data * chore: upd docs * feat: add seenTokens * feat: always recalculate today * fix: use only 12:00:00 AM timestamps * feat: add 1y option * feat: cache prices * feat: doc * feat: add batching for queries * feat: doc * feat: sequential + batching * upd: doc * fix: db spam * feat: rate limit & clear stale cache * debug: add logs * fix: query * chore: do not expose internals * chore: remove logging * chore: misc * chore: cleanup * chore: rm dead code * feat: invalidate cache * chore: address comments * chore: remove refresh for safety * chore: return clear cache for local * chore: lint * Feat/portfolio pnl 2 (#1125) * feat: init pnl * feat: consider staking * feat: omit migrate * chore: support migrate * feat: 3 calc types * feat: add totalEconomicGainUsd * chore: docs * chore: refactor * feat: actually consider price at deposit time * chore: optimize price fetch * fix: cache * chore: make fetching more aggressive * feat: test params * feat: improve totalCurrentValueUsd * feat: share events & kong * feat: fe + history fix * fix: defillama batching * feat: tooltips * feat: handle cow * feat: tune defillama * chore: tune a bit more * feat: add missing prices cache * feat: docs * fix: timeout * chore: copy * feat: stable vs volatile * Feat/portfolio pnl excessive (#1148) * feat: init excessive * chore: naming * feat: actually add drilldown * fix: v2/v3 filter * fix: version * fix: env * feat: cover crvusd rewards * feat: vault to vault migrate via enso * feat: init katana rewards * chore: upd receiver address * feat: fix bold * feat: add fetchType + paginationMode * feat: support fetchtype + pagination on vercel * feat: hash user address * feat: ensure schema is initialized * chore: lint * fix: katana pricing * feat: dummy chart * feat: breakdown * feat: breakdown for timestamp * feat: merge yvUSD * fix: nasty scroll * chore: lint * chore: hide if isHidden=true * feat: make it case insensitive * feat: init simple * feat: display * add annualized return and ETH denominated charting * Styling and add all time duration * add charts * fix staked asset withdrawal issue * fix issues with staked shares * fix simple return accounting and growth index charts * add simple return chart explainers * add growth chart numeraire spec * Finalize growth display modes * Split growth index chart modes * Keep ETH growth history when partial vaults exist * remove overall cumulative chart * improve charts and add to portfolio rows * Feat/chart tweaks (#1193) * fix: rescale growth * fix: prevent flickering * style: flickering & mobile * feat: sort overlay by index * feat: add growth position & index * fix: growth index empty values * feat: connect the dots * feat: consistent chart * Add position charts to vault pages with balance and to portfolio expanded views. other minor tweaks * fix review comments * fix review issues and dark mode tooltip * feat: dedupe transfer and stake * feat: improve aggregator (#1195) * feat: improve aggregator * chore: lint * Feat/indexed history (#1198) * feat: init activity * feat: enrich * chore: rm address --------- Co-authored-by: w84april <donyaschefer@gmail.com> Co-authored-by: w84april <32621609+w84april@users.noreply.github.com>
* Fix pending transaction overlay copy * commit lock file
* fix: disable enso balance caching * fix: refetch wallet balances on focus * fix: refresh balances on portfolio entry
* make tenderly mode a toggle. add API port picker flow to build and preview steps * fix issues with port selection scripts * additional review and hardening * fix review issues * fix confetti * fix: autoswitch chain on tenderly disengage
* Fix Merkl rewards filtering and refresh * lint
* fix: classify yvBTC as a yearn vault * feat: pin yvBTC at the top of vaults * fix: surface yvBTC in the default vault list * update filtering * init * adjust spacing * improve vault list row chips and expanded info * add etherscan link to compressed header * add hover effect and more vault info * better styling * improved compressed header title * improve widget clarity * check for swap in zap and display info differently accordingly * Improve lock icon in vault page header * update risk section * more yvBTC prep * Show yvUSD cooldown status in deposits header * fix: show yvUSD cooldown status in mobile header * add cooldown info to deposits panel * generalize cooldown changes to yvBTC * fix issue with neon password * Hide yvBTC from vault lists before launch * lint and update docs * hide dust under $0.01 * fix: clean up more yvBTC stuff * improve chip and yvUSD widget alert styling
* fix: breakdown pricing * fix: flicker * chore: rm hook and use chart data * test: share data * fix: utc price * fix: annual % * fix: balance calc Co-Authored-By: w84april <donyaschefer@gmail.com> * chore: cleanup Co-Authored-By: w84april <donyaschefer@gmail.com> * add yvusd portfolio charts (#1209) * add yvUSD charts * improve yvUSD charts and other fixes * fix dependency * feat: yearn-prices (#1211) * feat: yearn-prices * chore: lint * init * update chart layout and breakpoints * update suggested cards * update placeholder card for chart and chart loading spinners * improve loading input with progress bar * fix chart data error and lint * improve labelling and margins * add timeframe dropdown to vault page charts * consolidate loading spinner types * chore: rm price caching * fix portfolio holdings history consistency * fix staking edge cases * fix misc small review issues * feat: activity style update Co-Authored-By: w84april <donyaschefer@gmail.com> * feat: support router/zap Co-Authored-By: w84april <donyaschefer@gmail.com> * fix: symbol Co-Authored-By: w84april <donyaschefer@gmail.com> * style: icons Co-Authored-By: w84april <donyaschefer@gmail.com> * feat: filters Co-Authored-By: w84april <donyaschefer@gmail.com> * fix: mobile Co-Authored-By: w84april <donyaschefer@gmail.com> * lint * update activity row styling * more styling updates * update dev server startup message * fix list styling, update icons, improve date picker * remove image * fix review issues * back off fetches to prevent 429s * increase rate limit * surface transfers without other events * feat: better decode zaps & fix date range * feat: add mobile * add locker reward claims, ycrv zaps, and better v2 enrichement * improve yBOLD transaction resolution * style: move chain selector * update icons * style: mobile * add zap swaps and old zapper zaps, * fix duplicate keys * clean up build warnings and errors * update mobile styling for activity list * reward claim styling * Feat/progress (#1220) * feat: progress * feat: kill chores * feat: rm fake progress * chore: copy * feat: hash address * chore: cache 1h & do not disable db * Prep for yvBTC (#1185) * fix: classify yvBTC as a yearn vault * feat: pin yvBTC at the top of vaults * fix: surface yvBTC in the default vault list * update filtering * init * adjust spacing * improve vault list row chips and expanded info * add etherscan link to compressed header * add hover effect and more vault info * better styling * improved compressed header title * improve widget clarity * check for swap in zap and display info differently accordingly * Improve lock icon in vault page header * update risk section * more yvBTC prep * Show yvUSD cooldown status in deposits header * fix: show yvUSD cooldown status in mobile header * add cooldown info to deposits panel * generalize cooldown changes to yvBTC * fix issue with neon password * Hide yvBTC from vault lists before launch * lint and update docs * hide dust under $0.01 * fix: clean up more yvBTC stuff * improve chip and yvUSD widget alert styling * fix: stale loading * update gitignore * make vaults and portfolio eager loaded * clean up unconnected and no balance pages and add yvUSD card to suggested * prevent refetch from re-initializing loading * fix mobile styling * fix styling that no one will notice --------- Co-authored-by: rossgalloway <58150151+rossgalloway@users.noreply.github.com> * feat: render controls even with 0 current balance * feat: restore position based growth * fix: hide selector if 1 option --------- Co-authored-by: rossgalloway <58150151+rossgalloway@users.noreply.github.com>
…rlays and flows (#1186) * fix: support safe katana approval overlay * fix: handle safe transaction overlay submission * fix: handle safe approval overlay submission * fix: prefer safe target chain for overlays * fix: poll safe overlay execution * feat: show pending safe execution in wallet panel * fix: refresh vault state after safe execution * fix: track safe tx lifecycle from safe hashes * fix: refresh safe state before settling success * fix: keep safe approve flow moving * fix: pause before safe step auto-continue * fix: slow safe interstep progression * feat: safe batching (#1210) * feat: safe batching Co-Authored-By: w84april <donyaschefer@gmail.com> * fix test --------- Co-authored-by: rossgalloway <58150151+rossgalloway@users.noreply.github.com> * lint --------- Co-authored-by: w84april <32621609+w84april@users.noreply.github.com>
* chore: remove kat haircut schedule info * update steer text size
Add a small Playwright smoke suite for public routes and wire it into PR CI. - Add Playwright config, E2E scripts, and browser artifact handling - Cover landing-to-vaults, vaults, and portfolio smoke paths - Document the testing split between durable unit tests and E2E smoke checks
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Dependency ReviewThe following issues were found:
License Issues.github/workflows/e2e.yml
OpenSSF Scorecard
Scanned Files
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
* Add stable test selectors Add a generic data-testid selector contract for durable user-facing surfaces across header, vault, transaction, portfolio, and rewards flows. - Tag core navigation, wallet, vault list, vault detail, action widget, transaction, portfolio, and rewards surfaces - Add pass-through test id props for shared controls where needed - Document selector naming and dynamic identifier conventions in TESTING.md * Lint * Lint * Add readable custom page tags * Fix custom tag display cascade * Add custom tags for test targets * Add custom tags for portfolio reward tabs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/testcoverage, culling reports, and pre-commit safeguards.Important note: This commit adds a pre-commit script that insists that tests are located in the
/src/test/folder.This branch supersedes #1153
Test organization and process
This branch moves long-lived frontend/domain tests into a curated
src/test/tree instead of leaving them scattered beside components and hooks. The durable buckets are:src/test/math/for calculations, bigint/share conversions, APY/APR, slippage, valuations, cooldowns, and other independently checkable math.src/test/transactions/for transaction state, overlays, Safe batching, approval/deposit/withdraw behavior, and wallet-flow helpers.src/test/api-contracts/for route contracts, Kong/yDaemon response shapes, selectors, and URL/schema expectations.src/test/formatting/for formatting behavior that has meaningful expected values.src/test/vaults/for durable vault-domain behavior.Temporary colocated tests are still allowed while building. Before handoff or commit, each touched colocated frontend/domain test should be deliberately handled: move it into
src/test/if it protects durable behavior, convert it into an E2E smoke path if it protects a user-visible flow, or delete it if it only helped build the PR.The branch adds
bun run test:cullas a review aid for touched tests. It reports keep/cull/E2E candidates but does not auto-delete anything. The Husky pre-commit hook now runsscripts/check-test-location.mjs, which blocks stagedsrc/**/*.test.*andsrc/**/*.spec.*files unless they live undersrc/test/. API tests, script tests, and Playwright tests keep their own homes underapi/,scripts/, ande2e/.Added end-to-end tests
The PR adds Playwright as the repo-level smoke test layer via
e2e/public-smoke.spec.ts,playwright.config.ts, and.github/workflows/e2e.yml. These tests are intentionally small and public-route focused; they are not meant to replace domain unit tests or become component tests.The initial smoke coverage checks:
/loads as Yearn and can navigate through the Explore Vaults link./vaultsrenders the vault search/table surface./portfoliorenders without a connected wallet.The goal is quick confidence that the app boots, public routes render, primary navigation works, and the unauthenticated portfolio path does not blank-screen. Future UI/flow-heavy PRs should add one similarly stable smoke path when they change a critical public workflow.
Playwright smoke coverage in CI
The new
.github/workflows/e2e.ymlworkflow runs onpull_requestandworkflow_dispatch. It checks out the repo, sets up Node 20 and Bun, installs dependencies withbun install, installs Chromium withbunx playwright install --with-deps chromium, runsbun run test:e2e, and always uploads the Playwright HTML report for 7 days.playwright.config.tspoints ate2e/, runs Desktop Chromium with one worker, retries twice in CI, keeps traces/videos on failure, and starts the app withHOST=127.0.0.1 PORT=3000 bun run devunlessPLAYWRIGHT_BASE_URLis provided.These are deliberately cheap boot/navigation checks rather than deep behavioral tests. Their job is to catch blank screens, route breaks, and basic public UI regressions.
Validation
bun run buildbun run test:e2e