Add TradeBox component tests with prod-like mock infrastructure FEDEV-4024#2618
Open
qwinndev wants to merge 2 commits into
Open
Add TradeBox component tests with prod-like mock infrastructure FEDEV-4024#2618qwinndev wants to merge 2 commits into
qwinndev wants to merge 2 commits into
Conversation
55 Playwright CT tests covering the trade widget (TradeBoxHeaderTabs + TradeBox): field interactions in slider and manual leverage modes, limit/stop price flows, swap and TWAP modes, submit validations, pool switching, TP/SL, warnings and localStorage-seeded scenarios. Infra: MockSyntheticsStateProvider assembles SyntheticsState from real hooks (useTradeboxState, settings, order/position editor states) over static chain fixtures; wagmi mock connector; position/market/gas fixtures; SyntheticsEvents replaced with an idle stub via vite alias; network blocked per test.
Deploying gmx-interface-home with
|
| Latest commit: |
8b1d14a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://cd7ec9a2.gmx-interface-home.pages.dev |
| Branch Preview URL: | https://tradebox-component-tests.gmx-interface-home.pages.dev |
Deploying gmx-interface with
|
| Latest commit: |
8b1d14a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d7d01323.gmx-interface.pages.dev |
| Branch Preview URL: | https://tradebox-component-tests.gmx-interface.pages.dev |
Playwright Component Test ReportAll tests passed. Commit 8b1d14a |
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.
What
Linear: FEDEV-4024
54 Playwright component tests for the trade widget (
TradeBoxHeaderTabs+TradeBox), running against the production provider stack with mocked chain data.Mock infrastructure
MockSyntheticsStateProvider— assemblesSyntheticsStatefrom the real stateful hooks (useTradeboxState, settings, order/position editor states, permits, subaccount) over static fixtures, so every derived selector (increaseAmounts, fees, leverage, swap path) computes through the production pipeline.connectedstory prop) unlocks submit-button validation states.playwright-ct.config.ts(websocket layer; documented limitation: txn/approval event flows are not observable in CT).Covered