Skip to content

[LWD] Staking/Unstaking e2e tests#18882

Open
amaslakov wants to merge 5 commits into
developfrom
LIVE-32928-tezos-lwd-staking-unstaking-e-2-e-tests
Open

[LWD] Staking/Unstaking e2e tests#18882
amaslakov wants to merge 5 commits into
developfrom
LIVE-32928-tezos-lwd-staking-unstaking-e-2-e-tests

Conversation

@amaslakov

@amaslakov amaslakov commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

✅ Checklist

  • npx changeset was attached.
  • Covered by automatic tests.
  • Impact of the changes:
  • App code: only two buttonId props on the Tezos staking-section / delegation DropDownSelectors — test-id enablers, no UX or behaviour change. QA: confirm both account-page "⋯" menus (staking + delegation) still open and route as before.
  • All other changes are e2e test code (spec + page objects) — zero runtime impact.
  • Speculos seed preconditions: index-0 account must be delegated + staked (stake/unstake/blocked tests); index-1 account must be funded + undelegated (earning-choice). The blocked tests assert only that the menu is gated when staked (no signing/broadcast).
  • Gated on lldTezosStaking; transactions are not broadcast in CI.
  • Device focus: staking on Nano S (@lns) is the least-certain matrix entry — worth a close look.

📝 Description

Adds desktop (Playwright + Speculos) end-to-end coverage for the Tezos LWD staking feature (lldTezosStaking), which previously had none. New
e2e/desktop/tests/specs/stake.spec.ts + Tezos page objects cover:

  • Earning-choice chooser routing — delegate vs stake (B2CQA-5915)
  • Stake / restake on a delegated account (B2CQA-5917)
  • Unstake from a staked account (B2CQA-5918)
  • Change validator blocked while staked → unstake-required modal (B2CQA-5919)
  • Stop delegation blocked while staked (B2CQA-5921)

Device signing reuses the existing Tezos delegation flow — the app signs stake/unstake through the same on-device review screens, so no new signer was added. The only non-test change is two buttonId props on the staking-section and delegation context-menu dropdowns so their menus are addressable from tests (no behaviour change).

❓ Context

  • JIRA or GitHub link: LIVE-32928
  • ADR link (if any):

🧐 Checklist for the PR Reviewers

  • The code aligns with the requirements described in the linked JIRA or GitHub issue.
  • The PR description clearly documents the changes made and explains any technical trade-offs or design decisions.
  • There are no undocumented trade-offs, technical debt, or maintainability issues.
  • The PR has been tested thoroughly, and any potential edge cases have been considered and handled.
  • Any new dependencies have been justified and documented.
  • Performance considerations have been taken into account. (changes have been profiled or benchmarked if necessary)

Covers the staking entry on a delegated account (3-step stake modal) and
the earning-choice chooser routing on an undelegated account.
Unstake from the staking-section menu; change-validator and stop-delegation
are blocked (unstake-required modal) while staked. Adds menu buttonIds and
fills the staking-flow Xray ids.
Copilot AI review requested due to automatic review settings June 23, 2026 12:44
@amaslakov amaslakov requested review from a team as code owners June 23, 2026 12:44
@live-github-bot live-github-bot Bot added the desktop Has changes in LLD label Jun 23, 2026
@live-github-bot live-github-bot Bot changed the title [TEZOS][LWD] Staking/Unstaking e2e tests [LWD] Staking/Unstaking e2e tests Jun 23, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds Ledger Wallet Desktop (Playwright + Speculos) end-to-end coverage for Tezos staking/unstaking flows behind lldTezosStaking, and introduces stable dropdown trigger/item identifiers in the Tezos account UI to make those flows addressable from E2E tests.

Changes:

  • Add a new desktop E2E spec covering Tezos earning-choice routing, stake/restake, unstake, and “blocked while staked” gating behaviors.
  • Add new Tezos staking-related modal page objects and wire them into the E2E Application page holder.
  • Add buttonId props to the Tezos staking-section and delegation context menus to provide stable DOM ids for test selectors, plus a changeset for the desktop package.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
e2e/desktop/tests/specs/stake.spec.ts New Playwright spec covering Tezos staking/unstaking + blocked actions while staked.
e2e/desktop/tests/page/modal/tezos.unstake.required.modal.ts Page object for interacting with the “unstake required” gating modal and delegation menu actions.
e2e/desktop/tests/page/modal/tezos.unstake.modal.ts Page object for opening and completing the Tezos unstake modal flow.
e2e/desktop/tests/page/modal/tezos.stake.modal.ts Page object for Tezos stake flow steps (validator/amount/awaiting-delegation/success).
e2e/desktop/tests/page/modal/tezos.earning.choice.modal.ts Page object for the Tezos earning-choice chooser modal.
e2e/desktop/tests/page/modal/delegate.modal.ts Adds a helper assertion for the Tezos delegation starter UI.
e2e/desktop/tests/page/index.ts Exposes the new Tezos modal page objects on the Application fixture.
apps/ledger-live-desktop/src/renderer/families/tezos/Delegation/StakingSection.tsx Adds buttonId="tezos-staking-menu" to the staking-section dropdown for stable selectors.
apps/ledger-live-desktop/src/renderer/families/tezos/Delegation/ContextMenu.tsx Adds buttonId="tezos-delegation-menu" to the delegation context menu dropdown for stable selectors.
.changeset/mighty-otters-juggle.md Changeset documenting the desktop UI test-id enabling change.

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Web Tools Build Status

Build Status Deployment
Web Tools Build ⏭️ Skipped
Native Storybook Build ⏭️ Skipped
React Storybook Build ⏭️ Skipped

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

⚠️ E2E tests are required

Changes detected require e2e testing before merge (even before asking for any review).

🖥️ Desktop

-> Run Desktop E2E

  • Select "Run workflow"
  • Branch: LIVE-32928-tezos-lwd-staking-unstaking-e-2-e-tests
  • Device: nanoSP or stax

Copilot AI review requested due to automatic review settings June 23, 2026 13:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Rsdoctor Bundle Diff Analysis

Found 7 projects in monorepo, 7 projects with changes.

📊 Quick Summary
Project Total Size Change
desktop-main 2.6 MB -
desktop-preloader 7.1 KB -
desktop-renderer 81.2 MB -
desktop-webviewDappPreloader 36.9 KB -
desktop-webviewPreloader 200.0 B -
desktop-workers 36.8 KB -
mobile 258.6 MB -
📋 Detailed Reports (Click to expand)

📁 desktop-main

Path: rsdoctor/desktop-main/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 2.6 MB - -
📄 JavaScript 2.4 MB - -
🎨 CSS 0 B - -
🌐 HTML 0 B - -
📁 Other Assets 135.3 KB - -

📁 desktop-preloader

Path: rsdoctor/desktop-preloader/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 7.1 KB - -
📄 JavaScript 5.3 KB - -
🎨 CSS 0 B - -
🌐 HTML 0 B - -
📁 Other Assets 1.8 KB - -

📁 desktop-renderer

Path: rsdoctor/desktop-renderer/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 81.2 MB - -
📄 JavaScript 28.9 MB - -
🎨 CSS 172.6 KB - -
🌐 HTML 1.8 KB - -
📁 Other Assets 52.2 MB - -

📁 desktop-webviewDappPreloader

Path: rsdoctor/desktop-webviewDappPreloader/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 36.9 KB - -
📄 JavaScript 36.9 KB - -
🎨 CSS 0 B - -
🌐 HTML 0 B - -
📁 Other Assets 0 B - -

📁 desktop-webviewPreloader

Path: rsdoctor/desktop-webviewPreloader/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 200.0 B - -
📄 JavaScript 200.0 B - -
🎨 CSS 0 B - -
🌐 HTML 0 B - -
📁 Other Assets 0 B - -

📁 desktop-workers

Path: rsdoctor/desktop-workers/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 36.8 KB - -
📄 JavaScript 36.8 KB - -
🎨 CSS 0 B - -
🌐 HTML 0 B - -
📁 Other Assets 0 B - -

📁 mobile

Path: rsdoctor/mobile/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 258.6 MB - -
📄 JavaScript 108.7 MB - -
🎨 CSS 0 B - -
🌐 HTML 0 B - -
📁 Other Assets 150.0 MB - -

Generated by Rsdoctor GitHub Action

index-0 stays undelegated for earning-choice + legacy receive/add/delegate;
index-1 (delegated + staked) hosts stake/unstake/blocked.
Copilot AI review requested due to automatic review settings June 24, 2026 10:45
@live-github-bot live-github-bot Bot added the common Has changes in live-common label Jun 24, 2026
@live-github-bot live-github-bot Bot changed the title [LWD] Staking/Unstaking e2e tests [LWDM] Staking/Unstaking e2e tests Jun 24, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated no new comments.

@amaslakov amaslakov force-pushed the LIVE-32928-tezos-lwd-staking-unstaking-e-2-e-tests branch from f35c592 to 8d996c0 Compare June 24, 2026 21:58
@live-github-bot live-github-bot Bot removed the common Has changes in live-common label Jun 24, 2026
@live-github-bot live-github-bot Bot changed the title [LWDM] Staking/Unstaking e2e tests [LWD] Staking/Unstaking e2e tests Jun 24, 2026
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

desktop Has changes in LLD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants