Fix trade-book Edit E2E: stale cancel-copy assertion (blocks #292 smoke) #338
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic#338
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Smoke E2E
trade-book-edit-178.spec.tsfails because it asserts copy that is not present in the UI (cancel the resting order before placing a replacement). Pair deep-link resolution for the seeded EMBER/CORAL pair was fixed in !836; the remaining failure is a stale / incorrect Playwright assertion (and possibly missing coverage of the real edit-context UX).Discovered as a #292 acceptance-criterion-3 blocker (smoke 105/106).
Current codebase
Edit UX (shipped — GitLab #247 / #178)
frontend-dapp/src/components/trade/OrderBookPanel.tsx—trade-book-edit-{side}-{order_id}/trade-book-cancel-{side}-{order_id}.frontend-dapp/src/components/trade/TradeOrderTicket.tsx—editContextstate; Edit prefills limit tab without network POST.frontend-dapp/src/utils/limitOrderPriceEdit.ts:isPriceOnlyLimitEdit→ Update price (trade-limit-update-price-submit).LIMIT_EDIT_NON_PRICE_CHANGE_MESSAGE:editContextis set):data-testid="trade-limit-edit-context"— shows order id and one of three branches (price-only hint, non-price block message, default price-adjust hint).frontend-dapp/src/pages/LimitOrdersPage.tsx— sameLIMIT_EDIT_NON_PRICE_CHANGE_MESSAGEpattern.docs/frontend.md§ Edit UX (#247); skillskills/AGENTS_FRONTEND_ORDER_BOOK_ROW_ACTIONS.md.Failing smoke spec
frontend-dapp/e2e/trade-book-edit-178.spec.ts:SEEDED_PAIR(EMBER/CORAL), waits fortrade-desktop-workspace, then before any Edit click asserts:TradePage.test.tsx,OrderBookPanel.test.tsx).Pair resolution fix (!836 — merged)
gotoAndCaptureFactoryPairsPage,requireLimitTxPair— ensure/trade/:pairlands on factory-known pair before book polling.scripts/e2e-seed-hybrid-book.shplaces dev-wallet bids onSEEDED_PAIR.Why this is needed
make test-e2esmoke phase fails on desktop Edit spec even when Edit/cancel flows work — blocks strict CI and leaves #292 criterion 3 open.trade-limit-edit-contextwon't be caught reliably.Constraints / guardrails
UpdateLimitOrderPricevs cancel-then-place for size/side/expiry (#247).data-testidover brittle full-string regex — usetrade-limit-edit-contextand structured sub-assertions.test.skipfor chain-present environments (#201).LIMIT_EDIT_NON_PRICE_CHANGE_MESSAGE+ Vitest inlimitOrderPriceEdit.test.tsin the same MR.Relevant files
frontend-dapp/e2e/trade-book-edit-178.spec.tsTradeOrderTicket.tsx,OrderBookPanel.tsx,limitOrderPriceEdit.tsLimitOrdersPage.tsxe2e/helpers/limit-e2e.ts,e2e/helpers/lcd.tsTradePage.test.tsx,LimitOrdersPage.test.tsx,OrderBookPanel.test.tsx,limitOrderPriceEdit.test.tsdocs/frontend.md,skills/AGENTS_FRONTEND_ORDER_BOOK_ROW_ACTIONS.md,frontend-dapp/e2e/README.mdRecommended solution direction
editBtn.click(), asserttrade-limit-edit-contextis visible and contains order id + price-update hint (default state: only price changed path available).LIMIT_EDIT_NON_PRICE_CHANGE_MESSAGE(or/cancel this order first/i) and thattrade-limit-submitis disabled.npx playwright test e2e/trade-book-edit-178.spec.ts --project=e2e-smoke.Acceptance criteria
trade-book-edit-178.spec.tspasses on LocalTerra + indexer + deploy + global setup (both viewport tests).trade-limit-edit-contextwith correct order id and prefill (limit-order-price-input,limit-order-escrow-amount-input).make test-frontendunchanged or improved (no new failures).Test plan — functional paths
trade-sub-lg-workspace.limitOrderPriceEdit+OrderBookPaneledit handler still green.Test plan — attack / abuse / abuse vectors
editNonPriceChanged(user cannot skip cancel for size/side/expiry changes).owner === walletgate); E2E uses dev-wallet seeded bids only.Verification criteria
bash scripts/with-node.sh --cwd frontend-dapp -- npx playwright test e2e/trade-book-edit-178.spec.ts --project=e2e-smoke— 2/2 pass.CI=1 make test-e2esmoke phase includes this spec green.npm test— related Vitest files pass./tradeand/limitsshows consistenttrade-limit-edit-contextcopy.Related
mentioned in issue #292
mentioned in commit d3fb2824a3b2c53c142a3260e838d11c73c23ba9
mentioned in commit e6a225c09bea23a7c1416f0ac60b5ea6ee77ae82
mentioned in commit 41008e0ce25c00013109936fd3986788147d8818
mentioned in commit
e7083fbd86mentioned in commit fe2ba782a216931e48a8688504074662f5b2c7bf
mentioned in merge request !849
MR !849 opened (docs; code fix on main
e7083fb)Changes: E2E/agent doc crosslinks for
trade-limit-edit-contextinvariants.Verify
npx playwright test e2e/trade-book-edit-178.spec.ts --project=e2e-smoke— 2/2mentioned in commit 590594a9ac824a99f74d94cfaee31d7779392872
E2E verification: trade-book-edit-178.spec.ts 2/2 pass after reordering sub-desktop before desktop cancel (commit on !849 branch).
mentioned in commit
0ca0f482bcmentioned in commit
94214b0339mentioned in commit
e689d83351Verification complete — #338
All acceptance and verification criteria PASS on
main(83dc192).Results
trade-book-edit-178.spec.tssmoke 2/2npx playwright test e2e/trade-book-edit-178.spec.ts --project=e2e-smoketrade-limit-edit-contextafter Edit click onlylimitOrderPriceEdit,OrderBookPanel,TradePage— 28/28Merged fix: !849 (
94214b0sub-desktop ordering + doc crosslinks).Re-verify checklist
npx playwright test e2e/trade-book-edit-178.spec.ts --project=e2e-smoke— 2/2trade-limit-edit-context; amount drift → cancel-first copy; no POST on Edit alone