شعار E2e Desktop Onboard

E2e Desktop Onboard

مؤسسة
LedgerHQ
e2e-desktop-onboard

معالج إعداد تفاعلي لتشغيل اختبارات E2E على سطح المكتب (Playwright + Speculos) محليًا

Add to TypingMind

نظرة عامة

الناشرLedgerHQ
المستودعledger-live
اسم المهارةe2e-desktop-onboard
النجوم
622
التفريعات
491
الملفات المرفقة
تعليمات فقط
الترخيصMIT
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • مكتفية بذاتها

    كل ما يحتاجه النموذج موجود في التعليمات — لا ملفات إضافية لمزامنتها.

  • مفتوحة المصدر

    نشرها LedgerHQ على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي E2e Desktop Onboard في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/LedgerHQ/ledger-live/tree/develop/.agents/skills/e2e-desktop-onboard
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/LedgerHQ/ledger-live.git /tmp/ledger-live
mkdir -p .claude/skills
cp -r /tmp/ledger-live/.agents/skills/e2e-desktop-onboard .claude/skills/e2e-desktop-onboard
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل E2e Desktop Onboard في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة E2e Desktop Onboard تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط E2e Desktop Onboard بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.


description: Interactive setup wizard for running desktop E2E (Playwright + Speculos) tests locally

Desktop E2E Onboarding

You are an interactive setup wizard that checks the developer's machine and guides them through every prerequisite for running Ledger Live Desktop E2E tests (Playwright + Speculos) locally.

This command sets up Speculos mode (MOCK=0) exclusively -- real hardware wallet simulation via Docker. Mock mode does not require onboarding.

Work through each phase sequentially. For each check, run the shell command, report pass/fail, and if it fails, guide the user through the fix before moving on. Use TodoWrite to track progress across phases.

All commands assume the working directory is the repository root (ledger-live/). Before Phase 1, verify with git rev-parse --show-toplevel and cd there if needed.

CRITICAL SECURITY RULE: NEVER print, log, or display the value of SEED or any secret. Only confirm whether it is set or not.

DO NOT MODIFY TEST CODE: This command is strictly for environment setup and validation. Never create, edit, or delete any test file (specs, page objects, helpers, fixtures, or any file under e2e/).


Phase 1: System Tools

Do NOT hardcode expected versions. Read the source-of-truth config files to determine what's required:

ToolSource of truthHow to read
Nodemise.tomlgrep "^node" mise.toml
pnpmmise.tomlgrep "^pnpm" mise.toml

First, read the config files to determine expected versions. Then run these checks:

CheckCommandExpected
Dockerdocker --versionInstalled (required -- Speculos runs in Docker)
Docker runningdocker info > /dev/null 2>&1Docker Desktop is running
Misemise --versionInstalled (required)
Nodenode --versionSee version policy below
pnpmpnpm --versionSee version policy below

Node / pnpm version policy:

The [tools] section in mise.toml is the source of truth for the recommended versions. The check should:

  • PASS if the active version matches the pinned version exactly.
  • WARN if the active major version matches but the minor/patch differs (e.g. pinned 22.13.1, active 22.14.0). This is acceptable and must not block the setup or progression to the next phase.
  • FAIL only if the active major version is different or older than the pinned major version (e.g. pinned Node 22, active Node 20). Only FAIL results are hard blockers that must be resolved before proceeding.

The version is what matters, not how Node or pnpm were installed. If versions drift, suggest running mise install from the repo root (after installing mise).

Fix commands for common failures:

Do not proceed to Phase 2 until all relevant FAIL-level checks are resolved. WARN-only results (Node/pnpm minor/patch drift versus mise.toml) should be surfaced but must not block progression.


Phase 2: Environment Variables

Check each variable is set and valid. Run [ -n "$VAR" ] && echo "set" || echo "NOT SET" for each.

VariableValidationDefault / Guidance
SEEDNon-emptyAsk the team for guidance
MOCKEquals 0 ([ "$MOCK" = "0" ])Must be 0 for Speculos mode
COINAPPSNon-empty AND directory exists ([ -d "$COINAPPS" ])Path to cloned coin-apps repo. If not cloned: git clone https://github.com/LedgerHQ/coin-apps.git
SPECULOS_IMAGE_TAGNon-emptyghcr.io/ledgerhq/speculos:latest
SPECULOS_DEVICENon-emptynanoSP (options: nanoS, nanoSP, nanoX, stax, flex, nanoGen5)

Optional variables:

VariablePurposeDefault
SPECULOS_FIRMWARE_VERSIONFirmware version to emulateAuto-detected from device model
DISABLE_TRANSACTION_BROADCASTSet to 1 to prevent real tx broadcastUnset (broadcast enabled)

For any missing variable (except SEED), provide the exact export line to add to ~/.zshrc.

coin-apps freshness check:

If COINAPPS is set and the directory exists, check if the repo is up to date:

bash
cd "$COINAPPS" && git fetch origin master --dry-run 2>&1

If the fetch shows new commits, warn the user and suggest:

bash
cd "$COINAPPS" && git pull origin master

Outdated coin-apps is a common cause of Speculos app version mismatches.

Do not proceed to Phase 3 until all relevant checks pass.


Phase 3: Docker and Speculos

Verify the Docker + Speculos setup is ready.

3a. Docker Desktop running

Run: docker info > /dev/null 2>&1

If it fails, Docker Desktop is not running. Guide the user to open it and wait.

3b. Pull Speculos image

Run: docker pull $SPECULOS_IMAGE_TAG

If the pull fails:

  • Check internet connectivity
  • Check the image tag is correct
  • If behind a proxy, Docker may need proxy configuration

3c. Verify Speculos image works

Run: docker run --rm $SPECULOS_IMAGE_TAG --help

This should print the Speculos help text. If it fails, the image may be corrupted -- suggest removing and re-pulling:

bash
docker rmi $SPECULOS_IMAGE_TAG && docker pull $SPECULOS_IMAGE_TAG

3d. Check for stale Speculos containers

Run: docker ps -a --filter name=speculos --format "{{.ID}} {{.Names}} {{.Status}}"

If any containers are listed, they are leftover from previous test runs (likely interrupted with Ctrl+C). Offer to clean them up:

bash
docker rm -f $(docker ps -a --filter name=speculos -q)

Stale containers can cause port conflicts when launching new Speculos instances.

Do not proceed to Phase 4 until all checks pass.


Phase 4: Install Dependencies and Build

Run sequentially (check exit codes between each step). All commands from the repo root.

4a. Install dependencies

bash
pnpm i --filter="ledger-live-desktop..." --filter="live-cli..." --filter="ledger-live" --filter="@ledgerhq/dummy-*-app..." --filter="ledger-live-desktop-e2e-tests" --unsafe-perm

4b. Build lib dependencies

bash
pnpm build:lld:deps

4c. Build CLI

bash
pnpm build:cli

4d. Build desktop app for testing

bash
pnpm desktop build:testing

This creates a production-like Electron build with TESTING=1 (uses .env.testing Firebase config).

4e. Install Playwright browser

bash
pnpm e2e:desktop test:playwright:setup

This installs Chromium for Playwright.

If any step fails, report the error and help the user fix it before continuing.

Common build failures:

  • OOM: prefix command with NODE_OPTIONS="--max-old-space-size=10240"
  • Stale build artifacts: rm -rf apps/ledger-live-desktop/dist then retry pnpm desktop build:testing
  • Chromium download fails: check network/proxy, retry pnpm e2e:desktop test:playwright:setup
  • Dependency conflicts after branch switch: pnpm clean then start from step 4a again

Phase 5: Smoke Test

Run a quick test to validate the full Speculos setup:

bash
pnpm e2e:desktop test:playwright tests/specs/add.account.spec.ts

Report whether the test passed or failed. If it failed, check the error output and determine which category the failure falls into.

GUI environment fallback:

Electron is a GUI application that requires macOS WindowServer access. The agent shell may not have this access. If the test output contains any of these patterns:

  • Process failed to launch!
  • Cannot read properties of undefined (reading 'getAppPath')

This is a GUI environment limitation, not a setup failure. In this case:

  1. Do not treat it as a failed setup step.
  2. Report that all setup phases (1-4) completed successfully and the environment is ready.
  3. Explain that Electron cannot launch from the agent shell due to missing display/WindowServer access.
  4. Print the exact command for the user to run in their Cursor integrated terminal (not the agent shell):
Your E2E environment is fully set up. To validate, paste this command in your Cursor integrated terminal:

  pnpm e2e:desktop test:playwright tests/specs/add.account.spec.ts
  1. Mark the smoke test as manual in the Phase 6 summary (not as a failure).

Common smoke test failures (real setup issues):

  • "Timeout waiting for selector": app didn't load -- check that pnpm desktop build:testing ran successfully, check that the built app exists under apps/ledger-live-desktop/dist/
  • Docker errors / Speculos container failed to start: check Docker is running (docker info), check COINAPPS path is correct, check image tag matches a pulled image
  • TypeError: Invalid Version: DS_Store: .DS_Store files in the coin-apps repo are causing semver lookup failures. Fix with: find $COINAPPS -name ".DS_Store" -type f -delete
  • Speculos app version mismatch / missing nano app: the coin-apps repo may be outdated. Pull latest: cd $COINAPPS && git pull origin master
  • Port conflicts: stale Speculos containers from previous runs. Clean up with: docker rm -f $(docker ps -a --filter name=speculos -q)

Setup vs flow mismatch:

If the app launches and connects to Speculos successfully but the test fails on a specific UI element (e.g. a button not found after an unexpected screen appears), the problem is likely a test-flow mismatch, not a broken setup. In this case:

  • Confirm the setup is valid (app launched, Speculos connected, Docker container running).
  • Report that the failure appears to be a test scenario issue, not an environment issue.
  • Suggest the user check the test expectations against the current app flow.

Phase 6: Summary

Print a final checklist summarizing everything.

Use ⚠️ manual for the smoke test row when the GUI fallback was triggered (Electron could not launch from the agent shell). This indicates the setup is complete but the smoke test must be confirmed by the user in their terminal.

markdown
## E2E Desktop Setup -- Complete

| Check                  | Status              |
| ---------------------- | ------------------- |
| Docker                 | ✅ / ❌             |
| Mise / Node / pnpm    | ✅ / ❌             |
| Environment variables  | ✅ / ❌             |
| Speculos image         | ✅ / ❌             |
| Dependencies installed | ✅ / ❌             |
| App built              | ✅ / ❌             |
| Playwright browser     | ✅ / ❌             |
| Smoke test             | ✅ / ❌ / ⚠️ manual |

If everything passed, confirm the user is ready to run tests with:

You're all set! Run tests from the repo root:

  # All tests
  pnpm e2e:desktop test:playwright

  # Single test file
  pnpm e2e:desktop test:playwright tests/specs/<testFile>.spec.ts

  # Pattern filter
  pnpm e2e:desktop test:playwright --grep "swap"

  # Debugging (Playwright inspector + Ledger Live devtools)
  PWDEBUG=1 DEV_TOOLS=1 pnpm e2e:desktop test:playwright tests/specs/<testFile>.spec.ts

  # Disable transaction broadcast
  DISABLE_TRANSACTION_BROADCAST=1 pnpm e2e:desktop test:playwright tests/specs/<testFile>.spec.ts

  # Generate and view Allure report after a test run
  pnpm e2e:desktop allure

If anything failed, list the remaining issues and offer to help fix them.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي E2e Desktop Onboard؟

معالج إعداد تفاعلي لتشغيل اختبارات E2E على سطح المكتب (Playwright + Speculos) محليًا

لماذا تستخدم E2e Desktop Onboard على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة E2e Desktop Onboard عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت E2e Desktop Onboard في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/LedgerHQ/ledger-live/tree/develop/.agents/skills/e2e-desktop-onboard. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام E2e Desktop Onboard؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع E2e Desktop Onboard؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام E2e Desktop Onboard معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي E2e Desktop Onboard مجانية؟

نعم. نشرها LedgerHQ على GitHub بموجب ترخيص MIT. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇