Skip to content

[LWDM] detox evm staking#17564

Open
dilaouid wants to merge 6 commits into
developfrom
tests/detox-evm-staking
Open

[LWDM] detox evm staking#17564
dilaouid wants to merge 6 commits into
developfrom
tests/detox-evm-staking

Conversation

@dilaouid

@dilaouid dilaouid commented May 18, 2026

Copy link
Copy Markdown
Member

✅ Checklist

  • npx changeset was attached.
  • Covered by automatic tests.
  • Impact of the changes:
    • ...

📝 Description

e2e detox tests for the evm native staking; only the happy delegation path is tested and the delegation table check

❓ Context


🧐 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)

@live-github-bot live-github-bot Bot added mobile Has changes in LLM common Has changes in live-common labels May 18, 2026
@live-github-bot live-github-bot Bot changed the title wip [LWDM] wip May 18, 2026
@github-actions

github-actions Bot commented May 18, 2026

Copy link
Copy Markdown
Contributor

Web Tools Build Status

Build Status Deployment
Web Tools Build ✅ Deployed https://web-tools-99sumcdsd-ledger-hq-prd.vercel.app
Native Storybook Build ⏭️ Skipped
React Storybook Build ⏭️ Skipped

@github-actions

github-actions Bot commented May 18, 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.7 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.7 MB - -
📄 JavaScript 108.7 MB - -
🎨 CSS 0 B - -
🌐 HTML 0 B - -
📁 Other Assets 150.0 MB - -

Generated by Rsdoctor GitHub Action

@dilaouid dilaouid changed the title [LWDM] wip [LWDM] detox evm staking May 18, 2026
@dilaouid dilaouid force-pushed the tests/detox-evm-staking branch 3 times, most recently from 7612d25 to 48d5d26 Compare May 18, 2026 17:48
@dilaouid dilaouid marked this pull request as ready for review May 19, 2026 07:31
@dilaouid dilaouid requested a review from a team as a code owner May 19, 2026 07:31
Copilot AI review requested due to automatic review settings May 19, 2026 07:31
@dilaouid dilaouid requested a review from a team as a code owner May 19, 2026 07:31

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 Detox E2E coverage for EVM native staking on Sei and introduces the necessary app/test hooks to make the flow testable under mock/userdata conditions.

Changes:

  • Persist EVM staking resources in the live-common EVM mock bridge by wiring assignFromAccountRaw / assignToAccountRaw.
  • Update the EVM validator selection UI to support Detox (stable validator row testIDs and an E2E validator source from account.stakingResources.validators when running under Detox).
  • Add Sei EVM staking Detox specs, page object, and a dedicated seiEvmStaking userdata fixture.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
libs/ledger-live-common/src/families/evm/bridge/mock.ts Exposes EVM staking raw-assign hooks in the mock bridge so staking resources survive serialization.
apps/ledger-live-mobile/src/families/evm/DelegationFlow/ValidatorRow.tsx Adds a deterministic Detox-friendly testID for validator rows.
apps/ledger-live-mobile/src/families/evm/DelegationFlow/01-SelectValidator.tsx Uses the EVM ValidatorRow + adds Detox-only validator sourcing from account staking resources.
apps/ledger-live-mobile/e2e/userdata/seiEvmStaking.json New mocked portfolio fixture with Sei EVM staking state + validator list.
apps/ledger-live-mobile/e2e/specs/delegate/sei.spec.ts New Detox test suite covering the happy delegation path + delegation summary visibility.
apps/ledger-live-mobile/e2e/page/trade/evmDelegate.page.ts New page object for the EVM delegation flow interactions/assertions.
apps/ledger-live-mobile/e2e/page/index.ts Registers the new evmDelegate page object on the global app helper.
.changeset/odd-pillows-smash.md Declares the changeset for the mobile/common updates.

Comment thread apps/ledger-live-mobile/src/families/evm/DelegationFlow/01-SelectValidator.tsx Outdated
Comment thread apps/ledger-live-mobile/e2e/page/trade/evmDelegate.page.ts Outdated
@github-actions

github-actions Bot commented May 19, 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: tests/detox-evm-staking
  • Device: nanoSP or stax

📱 Mobile

-> Run Mobile E2E

  • Select "Run workflow"
  • Branch: tests/detox-evm-staking
  • Device: nanoX

Copilot AI review requested due to automatic review settings May 19, 2026 10:03
@dilaouid dilaouid force-pushed the tests/detox-evm-staking branch from 6a57730 to 2b189f6 Compare May 19, 2026 10:03

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 8 out of 8 changed files in this pull request and generated 3 comments.

Comment thread apps/ledger-live-mobile/src/families/evm/DelegationFlow/01-SelectValidator.tsx Outdated
Comment thread apps/ledger-live-mobile/e2e/page/trade/evmDelegate.page.ts Outdated
Comment thread .changeset/odd-pillows-smash.md
Copilot AI review requested due to automatic review settings May 21, 2026 02:49
@dilaouid dilaouid force-pushed the tests/detox-evm-staking branch from 9fffcac to 1cb66d2 Compare May 21, 2026 02:49
Comment thread apps/ledger-live-mobile/e2e/page/trade/evmDelegate.page.ts Outdated
Comment thread e2e/desktop/tests/page/modal/evmDelegate.modal.ts Outdated
Comment thread e2e/desktop/tests/page/modal/evmDelegate.modal.ts Outdated
@henri-ly

Copy link
Copy Markdown
Contributor

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 18 out of 18 changed files in this pull request and generated 3 comments.

Comment thread libs/ledger-live-common/src/e2e/speculos.ts
Comment thread e2e/desktop/tests/specs/delegateSEI.spec.ts Outdated
Comment thread e2e/desktop/tests/page/modal/evmDelegate.modal.ts Outdated
@henri-ly

Copy link
Copy Markdown
Contributor

E2E Desktop 🟢 with feedbacks : https://github.com/LedgerHQ/ledger-live/actions/runs/27770054165

Comment thread e2e/mobile/specs/delegate/delegateSEI.spec.ts Outdated
martijnhjk
martijnhjk previously approved these changes Jun 19, 2026

@martijnhjk martijnhjk 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.

for e2e content

deepyjr
deepyjr previously approved these changes Jun 19, 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 18 out of 18 changed files in this pull request and generated no new comments.

henri-ly
henri-ly previously approved these changes Jun 19, 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 18 out of 18 changed files in this pull request and generated no new comments.

@ypolishchuk-ledger

Copy link
Copy Markdown
Contributor

Desktop test is failing on touch and button devices, could you please check?

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 22 out of 22 changed files in this pull request and generated 2 comments.

Comment thread libs/ledger-live-common/src/e2e/speculos.ts

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 22 out of 22 changed files in this pull request and generated 4 comments.

Comment thread e2e/mobile/page/speculos.page.ts
Comment thread e2e/mobile/page/speculos.page.ts
Comment thread e2e/desktop/tests/page/speculos.page.ts
Comment thread e2e/desktop/tests/page/speculos.page.ts
@henri-ly

Copy link
Copy Markdown
Contributor

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 22 out of 22 changed files in this pull request and generated 1 comment.

Comment thread libs/ledger-live-common/src/e2e/speculos.ts

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 22 out of 22 changed files in this pull request and generated no new comments.

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 27 out of 27 changed files in this pull request and generated 1 comment.

Comment thread libs/live-dmk-speculos/src/transport/DeviceManagementKitTransportSpeculos.ts Outdated
@henri-ly

henri-ly commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

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 22 out of 22 changed files in this pull request and generated 1 comment.

Comment on lines +1128 to +1143
let isTransactionCheckDisplayed = false;
for (let attempt = 0; attempt < 60; attempt++) {
const texts = (await fetchCurrentScreenTexts(port)).toLowerCase();
if (texts.includes(enableLabel)) {
isTransactionCheckDisplayed = true;
break;
}
if (texts.includes(reviewLabel)) {
break;
}
await sleep(500);
}

if (!isTransactionCheckDisplayed) {
return;
}

@francois-guerin-ledger francois-guerin-ledger 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.

Need to rebase on origin/develop for the smoke tests fix.

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 23 out of 23 changed files in this pull request and generated 2 comments.

Comment on lines +1125 to +1143
const port = getEnv("SPECULOS_API_PORT");
const enableLabel = DeviceLabels.ENABLE_TRANSACTION_CHECK.toLowerCase();
const reviewLabel = DeviceLabels.REVIEW_TRANSACTION.toLowerCase();
let isTransactionCheckDisplayed = false;
for (let attempt = 0; attempt < 60; attempt++) {
const texts = (await fetchCurrentScreenTexts(port)).toLowerCase();
if (texts.includes(enableLabel)) {
isTransactionCheckDisplayed = true;
break;
}
if (texts.includes(reviewLabel)) {
break;
}
await sleep(500);
}

if (!isTransactionCheckDisplayed) {
return;
}
Comment on lines +9 to +12
export default class EvmStakePage {
startStakingCtaId = "account-quick-action-button-cta";
addDelegationCtaId = "account-quick-action-button-addDelegation";
amountInputId = "evm-delegation-amount-input";
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
10 New Code Smells (required ≤ 1)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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

Labels

common Has changes in live-common desktop Has changes in LLD mobile Has changes in LLM

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants