Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
2274a80
test: port kittest interactions.rs from react-native branch
PastaPastaPasta Feb 13, 2026
1c3fcaf
feat: add AccessKit hint_text labels for E2E test widget discovery
PastaPastaPasta Feb 13, 2026
c189c37
test: implement E2E phase 00 — wallet import + SPV sync
PastaPastaPasta Feb 13, 2026
19deb64
fix(test): harden phase 00 wallet import + SPV sync
PastaPastaPasta Feb 13, 2026
7774b0a
test: implement E2E phase 01 — balance verification
PastaPastaPasta Feb 13, 2026
e9027bf
test: implement E2E phase 02 — wallet UI operations
PastaPastaPasta Feb 13, 2026
651c93f
test: implement E2E phase 03 — platform reads
PastaPastaPasta Feb 13, 2026
eaa1493
refactor(test): simplify phase 03 platform reads
PastaPastaPasta Feb 13, 2026
d6022c1
test: implement E2E phase 04 — token search
PastaPastaPasta Feb 13, 2026
5910abc
test: implement E2E phase 05 — teardown + add missing support files
PastaPastaPasta Feb 13, 2026
178c116
test: harden E2E assertions — replace silent skips with hard failures
PastaPastaPasta Feb 13, 2026
f63915f
test: harden E2E suite — eliminate 5 silent failure modes
PastaPastaPasta Feb 13, 2026
040ff48
test: fix 4 E2E silent failure modes with hard assertions
PastaPastaPasta Feb 14, 2026
1f40b48
test: add smoke tests, idempotent runs, and teardown wallet cleanup
PastaPastaPasta Feb 14, 2026
d169175
refactor: simplify E2E tests — extract shared helpers, remove duplica…
PastaPastaPasta Feb 14, 2026
aae89f0
fix: remove unsafe fallback in find_existing_e2e_wallet
PastaPastaPasta Feb 14, 2026
feaf866
fix: resolve ambiguous "Import Wallet" query in E2E setup
PastaPastaPasta Feb 14, 2026
c0a588e
fix: push ImportMnemonicScreen directly instead of AccessKit click
PastaPastaPasta Feb 14, 2026
708b06d
fix: bypass AccessKit for wallet import — set screen state directly
PastaPastaPasta Feb 14, 2026
0eec8f4
fix: poll for balance reconciliation after SPV reaches Running
PastaPastaPasta Feb 14, 2026
ce81106
fix: unlock reused wallet so SPV can register its addresses
PastaPastaPasta Feb 14, 2026
d450704
fix: enable SPV backend mode before wallet import
PastaPastaPasta Feb 14, 2026
df300c3
fix: resolve E2E test failures across all phases
PastaPastaPasta Feb 14, 2026
cab8df6
refactor: extract common E2E test patterns into harness helpers
PastaPastaPasta Feb 14, 2026
b5bcd39
test: harden E2E tests to fail on real regressions
PastaPastaPasta Feb 14, 2026
fd5f0ed
test: improve E2E test infrastructure with panic cleanup and stronger…
PastaPastaPasta Feb 14, 2026
ff993dc
test: add identity creation and DPNS registration E2E phases
PastaPastaPasta Feb 14, 2026
d29b417
refactor: simplify E2E identity, DPNS, and teardown phases
PastaPastaPasta Feb 14, 2026
8cf3e12
test: harden E2E infrastructure with constants, error classification,…
PastaPastaPasta Feb 15, 2026
2c1d5e6
refactor: extract handle_retry_error helper and simplify E2E error ha…
PastaPastaPasta Feb 15, 2026
73ba4d7
test: add identity creation validation sub-tests in Phase 5
PastaPastaPasta Feb 15, 2026
eec1655
refactor: extract helpers to reduce boilerplate in identity validatio…
PastaPastaPasta Feb 15, 2026
423a325
fix: use max_by_key(timestamp) instead of .last() for newest transaction
PastaPastaPasta Feb 15, 2026
9d2b9d3
fix: resolve breadcrumb collision and widget init bugs in E2E tests
PastaPastaPasta Feb 15, 2026
967d201
fix: resolve label collision and classify gRPC errors as retryable
PastaPastaPasta Feb 17, 2026
2a4abdb
test: disable block-dependent E2E tests until SPV mempool support
PastaPastaPasta Feb 18, 2026
e391df7
fix: add missing Color32 import after rebase
PastaPastaPasta Feb 18, 2026
a1092d7
fix: update E2E tests for new SPV SyncProgress API after rebase
PastaPastaPasta Feb 18, 2026
53727ec
fix: use live wallet balance for UI comparison in Phase 1
PastaPastaPasta Feb 18, 2026
81f2a30
fix: address valid CodeRabbit review findings
PastaPastaPasta Feb 18, 2026
356450f
refactor: consolidate E2E tests — replace stubs with full suite
PastaPastaPasta Feb 18, 2026
3214d72
refactor: gate E2E test visibility behind `e2e` feature flag
PastaPastaPasta Feb 18, 2026
cb08bed
fix: address CodeRabbit review findings in E2E and kittest
PastaPastaPasta Feb 18, 2026
e344b7d
refactor: remove unused close_receive_dialog and set_seed_phrase_length
PastaPastaPasta Feb 18, 2026
3220812
refactor: simplify seed_hash_prefix with iterator-based hex encoding
PastaPastaPasta Feb 18, 2026
dbc47c2
refactor: replace cfg field pairs with accessor methods for E2E visib…
PastaPastaPasta Feb 18, 2026
8eaf197
refactor: remove unused test code and reduce boilerplate in E2E/kittest
PastaPastaPasta Feb 18, 2026
eb32e22
fix: use AccessKit value() for Role::Label nodes in E2E tests
PastaPastaPasta Feb 18, 2026
c3fa02b
refactor: address CodeRabbit review findings in E2E tests
PastaPastaPasta Feb 18, 2026
2ba0bd8
test: make network chooser config-label assertion dev-mode aware (#608)
PastaPastaPasta Feb 19, 2026
62d8887
fix: resolve clippy unused import in wallet dialogs
PastaPastaPasta Feb 19, 2026
baa746b
docs: include all-features in e2e run command
PastaPastaPasta Feb 19, 2026
0502dc2
ci: retrigger clippy (stale cache) (#609)
thepastaclaw Feb 19, 2026
f72efff
Merge remote-tracking branch 'upstream/v1.0-dev' into e2e
thepastaclaw Feb 26, 2026
36c6c0f
Merge pull request #666 from thepastaclaw/e2e
PastaPastaPasta Feb 26, 2026
d77c384
ci: add e2e workflow for pull request runs
PastaPastaPasta Feb 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: E2E

on:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always

jobs:
e2e:
name: End-to-end Test Journey
runs-on: ubuntu-latest
timeout-minutes: 90

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Cache Cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
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.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

actions-rs/toolchain@v1 deprecated incompatible GitHub Actions runners 2024 2025

💡 Result:

  • actions-rs/toolchain@v1 is an archived/unmaintained action (repo archived Oct 13, 2023) so it has not been updated for runner-runtime changes. [1]
  • Its action.yml declares runs: using: 'node12', meaning it depends on the Node 12 JavaScript action runtime. [2]
  • GitHub Actions deprecated Node 12 and began enforcing Node 16 instead of Node 12 starting June 14, 2023 (with only a temporary opt-out via ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION). This is why actions-rs/toolchain@v1 started triggering deprecation warnings / breakage on newer runners. [3]
  • GitHub then moved from Node 16 → Node 20 (default switch June 30, 2024) and ultimately removed Node 16 from runners on Nov 12, 2024, further tightening compatibility for old JavaScript actions. [4] [5]

What to do instead: migrate off actions-rs/toolchain@v1 to a maintained Rust toolchain installer such as dtolnay/rust-toolchain. [6]

Sources: [1] [2] [3] [4] [5] [6]


🌐 Web query:

dtolnay rust-toolchain GitHub Actions recommended replacement for actions-rs

💡 Result:

The commonly recommended replacement for the deprecated actions-rs/toolchain action is dtolnay/rust-toolchain. (github.com)

Example:

steps:
  - uses: actions/checkout@v5
  - uses: dtolnay/rust-toolchain@stable   # or `@nightly`, or `@1.89.0`, etc.
  - run: cargo test --all-features

dtolnay/rust-toolchain installs Rust via rustup, and you can add components / targets via inputs if needed. (github.com)

Citations:


Replace actions-rs/toolchain@v1 with dtolnay/rust-toolchain@stable.

The actions-rs/toolchain repository was archived on October 13, 2023 and relies on the Node 12 JavaScript action runtime. GitHub Actions removed support for Node 12 on November 12, 2024, causing this action to fail on current runners. Use the maintained dtolnay/rust-toolchain@stable action instead:

- uses: dtolnay/rust-toolchain@stable
🧰 Tools
🪛 actionlint (1.7.11)

[error] 34-34: the runner of "actions-rs/toolchain@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/e2e.yml at line 34, Replace the deprecated GitHub Action
usage by updating the workflow step that references actions-rs/toolchain@v1 to
use dtolnay/rust-toolchain@stable instead; locate the uses: entry for
actions-rs/toolchain@v1 in the e2e.yml workflow and swap it to
dtolnay/rust-toolchain@stable so the action runs on supported runners.

with:
toolchain: stable
override: true

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential pkg-config clang cmake libsqlite3-dev ca-certificates

- name: Install protoc
run: |
curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v25.2/protoc-25.2-linux-x86_64.zip
sudo unzip -o protoc-25.2-linux-x86_64.zip -d /usr/local bin/protoc
sudo unzip -o protoc-25.2-linux-x86_64.zip -d /usr/local 'include/*'
rm -f protoc-25.2-linux-x86_64.zip

- name: Prepare app configuration
run: |
mkdir -p "$HOME/.config/dash-evo-tool"
cp .env.example "$HOME/.config/dash-evo-tool/.env"

- name: Run E2E test journey
env:
E2E_WALLET_MNEMONIC: ${{ secrets.E2E_WALLET_MNEMONIC }}
E2E_SPV_TIMEOUT_SECS: 900
RUST_BACKTRACE: 1
run: |
if [ -z "${E2E_WALLET_MNEMONIC}" ]; then
echo "::warning::E2E_WALLET_MNEMONIC is not set; skipping E2E test job."
exit 0
fi

cargo test --features="e2e" --test e2e -- --ignored --nocapture | tee /tmp/e2e.log
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.

⚠️ Potential issue | 🟠 Major

Use scripts/safe-cargo.sh for the E2E test command.

Line 67 calls cargo directly, which violates the workflow security guideline and bypasses CI secret scrubbing.

🔧 Proposed fix
-          cargo test --features="e2e" --test e2e -- --ignored --nocapture | tee /tmp/e2e.log
+          scripts/safe-cargo.sh test --test e2e --all-features -- --ignored --nocapture | tee /tmp/e2e.log

As per coding guidelines: "Use scripts/safe-cargo.sh in GitHub Actions instead of calling cargo directly to prevent build scripts from accessing CI credentials."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/e2e.yml at line 67, Replace the direct cargo invocation
with the repository-safe wrapper: instead of running the command string 'cargo
test --features="e2e" --test e2e -- --ignored --nocapture | tee /tmp/e2e.log',
invoke the wrapper script 'scripts/safe-cargo.sh' to execute the exact same
cargo arguments (e.g. run 'scripts/safe-cargo.sh cargo test --features="e2e"
--test e2e -- --ignored --nocapture | tee /tmp/e2e.log'); update the workflow
step that currently runs the 'cargo test ...' command so all E2E tests use the
safe-cargo.sh wrapper.


- name: Upload E2E log
if: always()
uses: actions/upload-artifact@v4
with:
name: e2e-test-log
path: /tmp/e2e.log
if-no-files-found: warn
17 changes: 17 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,30 @@ raw-cpuid = "11.5.0"

[features]
testing = []
e2e = []
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.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, let's look at the Cargo.toml file, specifically around the lines mentioned
cat -n Cargo.toml | sed -n '85,120p'

Repository: dashpay/dash-evo-tool

Length of output: 1908


🏁 Script executed:

# Search for any usage of #[cfg(feature = "e2e")] in the codebase
rg '#\[cfg\(feature\s*=\s*"e2e"' -A 2

Repository: dashpay/dash-evo-tool

Length of output: 979


🏁 Script executed:

# Also search for cfg! macro usage with e2e feature
rg 'cfg!\s*\(\s*feature\s*=\s*"e2e"' -A 2

Repository: dashpay/dash-evo-tool

Length of output: 47


Whitelist the new e2e feature in unexpected_cfgs checks.

The codebase uses #[cfg(feature = "e2e")] in multiple source files (src/ui/wallets/import_mnemonic_screen.rs, src/ui/identities/register_dpns_name_screen.rs, src/ui/identities/add_new_identity_screen/mod.rs, src/context/mod.rs), but line 116 only whitelists "testing". This triggers unexpected_cfgs warnings and will fail stricter CI runs.

Proposed fix
 [lints.rust.unexpected_cfgs]
 level = "warn"
-check-cfg = ["cfg(tokio_unstable)", "cfg(feature, values(\"testing\"))"]
+check-cfg = ["cfg(tokio_unstable)", "cfg(feature, values(\"testing\", \"e2e\"))"]
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Cargo.toml` at line 90, The unexpected_cfgs whitelist currently only allows
"testing" and causes warnings for uses of #[cfg(feature = "e2e")]; update the
unexpected_cfgs configuration to include "e2e" in the whitelist array (i.e., add
the string "e2e" alongside "testing" in the whitelist entry referenced by the
unexpected_cfgs config in Cargo.toml) so the feature is allowed where used in
src/ui/... and src/context/mod.rs.


[dev-dependencies]
egui_kittest = { version = "0.33.3", features = ["eframe"] }

[build-dependencies]
winres = "0.1"

[patch."https://github.com/dashpay/rust-dashcore"]
dash-network = { git = "https://www.github.com/dashpay/rust-dashcore", rev = "6affdaa5db30c04f533cfac4a81b9939d1cf2545" }
dash-spv = { git = "https://www.github.com/dashpay/rust-dashcore", rev = "6affdaa5db30c04f533cfac4a81b9939d1cf2545" }
dashcore = { git = "https://www.github.com/dashpay/rust-dashcore", rev = "6affdaa5db30c04f533cfac4a81b9939d1cf2545" }
dashcore-private = { git = "https://www.github.com/dashpay/rust-dashcore", rev = "6affdaa5db30c04f533cfac4a81b9939d1cf2545" }
dashcore-rpc = { git = "https://www.github.com/dashpay/rust-dashcore", rev = "6affdaa5db30c04f533cfac4a81b9939d1cf2545" }
dashcore-rpc-json = { git = "https://www.github.com/dashpay/rust-dashcore", rev = "6affdaa5db30c04f533cfac4a81b9939d1cf2545" }
dashcore_hashes = { git = "https://www.github.com/dashpay/rust-dashcore", rev = "6affdaa5db30c04f533cfac4a81b9939d1cf2545" }
key-wallet = { git = "https://www.github.com/dashpay/rust-dashcore", rev = "6affdaa5db30c04f533cfac4a81b9939d1cf2545" }
key-wallet-manager = { git = "https://www.github.com/dashpay/rust-dashcore", rev = "6affdaa5db30c04f533cfac4a81b9939d1cf2545" }

[[test]]
name = "e2e"
path = "tests/e2e/main.rs"
required-features = ["e2e"]

[lints.rust.unexpected_cfgs]
level = "warn"
check-cfg = ["cfg(tokio_unstable)", "cfg(feature, values(\"testing\"))"]
Expand Down
13 changes: 13 additions & 0 deletions src/context/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,19 @@ pub struct AppContext {
egui_ctx: egui::Context,
}

#[cfg(feature = "e2e")]
impl AppContext {
/// Public database accessor for E2E tests.
pub fn db(&self) -> &Arc<Database> {
&self.db
}

/// Public wallets accessor for E2E tests.
pub fn wallets(&self) -> &RwLock<BTreeMap<WalletSeedHash, Arc<RwLock<Wallet>>>> {
&self.wallets
}
}

impl AppContext {
pub fn new(
network: Network,
Expand Down
4 changes: 2 additions & 2 deletions src/ui/contracts_documents/add_contracts_screen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ impl AddContractsScreen {
for (i, contract_id) in self.contract_ids_input.iter_mut().enumerate() {
ui.horizontal(|ui| {
ui.label(format!("Contract {}:", i + 1));
ui.text_edit_singleline(contract_id);
ui.add(egui::TextEdit::singleline(contract_id).hint_text("Contract ID"));
});
ui.add_space(5.0);
}
Expand Down Expand Up @@ -353,7 +353,7 @@ impl ScreenLike for AddContractsScreen {
ui.add_space(10.0);
// Add Contracts Button
let button =
egui::Button::new(RichText::new("Add Contracts").color(Color32::WHITE))
egui::Button::new(RichText::new("Fetch Contracts").color(Color32::WHITE))
.fill(DashColors::ACTION_BUTTON_BLUE)
.frame(true)
.corner_radius(3.0);
Expand Down
7 changes: 5 additions & 2 deletions src/ui/identities/add_existing_identity_screen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ impl AddExistingIdentityScreen {
}
}
});
ui.text_edit_singleline(&mut self.identity_id_input);
ui.add(egui::TextEdit::singleline(&mut self.identity_id_input).hint_text("Identity ID"));
ui.end_row();

// Advanced: Identity Type selector
Expand Down Expand Up @@ -793,7 +793,10 @@ impl AddExistingIdentityScreen {
.show(ui, |ui| {
ui.label("Username:");
ui.horizontal(|ui| {
ui.text_edit_singleline(&mut self.dpns_name_input);
ui.add(
egui::TextEdit::singleline(&mut self.dpns_name_input)
.hint_text("DPNS name"),
);
ui.label(".dash");
});
ui.end_row();
Expand Down
21 changes: 20 additions & 1 deletion src/ui/identities/add_new_identity_screen/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ pub struct AddNewIdentityScreen {
show_pop_up_info: Option<String>,
in_key_selection_advanced_mode: bool,
pub app_context: Arc<AppContext>,
successful_qualified_identity_id: Option<Identifier>,
pub(crate) successful_qualified_identity_id: Option<Identifier>,
/// Selected Platform address for funding with the amount in credits
selected_platform_address_for_funding: Option<(
dash_sdk::dpp::address_funds::PlatformAddress,
Expand All @@ -107,6 +107,25 @@ pub struct AddNewIdentityScreen {
completed_fee_result: Option<FeeResult>,
}

#[cfg(feature = "e2e")]
impl AddNewIdentityScreen {
pub fn step(&self) -> &Arc<RwLock<WalletFundedScreenStep>> {
&self.step
}

pub fn funding_method(&self) -> &Arc<RwLock<FundingMethod>> {
&self.funding_method
}

pub fn set_funding_amount(&mut self, amount: Option<Amount>) {
self.funding_amount = amount;
}

pub fn set_alias_input(&mut self, alias: String) {
self.alias_input = alias;
}
}

impl AddNewIdentityScreen {
pub fn new(app_context: &Arc<AppContext>) -> Self {
Self::new_with_wallet(app_context, None)
Expand Down
7 changes: 7 additions & 0 deletions src/ui/identities/register_dpns_name_screen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ pub struct RegisterDpnsNameScreen {
pub source: RegisterDpnsNameSource,
}

#[cfg(feature = "e2e")]
impl RegisterDpnsNameScreen {
pub fn set_name_input(&mut self, name: String) {
self.name_input = name;
}
}

impl RegisterDpnsNameScreen {
pub fn new(app_context: &Arc<AppContext>, source: RegisterDpnsNameSource) -> Self {
let qualified_identities: Vec<_> =
Expand Down
2 changes: 1 addition & 1 deletion src/ui/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ pub mod contracts_documents;
pub mod dashpay;
pub mod dpns;
pub mod helpers;
pub(crate) mod identities;
pub mod identities;
pub mod network_chooser_screen;
pub mod theme;
pub mod tokens;
Expand Down
3 changes: 2 additions & 1 deletion src/ui/tokens/tokens_screen/keyword_search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ impl TokensScreen {
let query_ref = self
.token_search_query
.get_or_insert_with(|| "".to_string());
let text_edit_response = ui.text_edit_singleline(query_ref);
let text_edit_response =
ui.add(egui::TextEdit::singleline(query_ref).hint_text("Search tokens"));

// Clone the current query for use in the closure below
let current_query = query_ref.clone();
Expand Down
32 changes: 31 additions & 1 deletion src/ui/wallets/import_mnemonic_screen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ impl ImportMnemonicScreen {
let response = ui.add_sized(
Vec2::new(input_width, 20.0),
egui::TextEdit::singleline(&mut word)
.hint_text(format!("Word {}", i + 1))
.text_color(DashColors::text_primary(dark_mode))
.background_color(DashColors::input_background(dark_mode)),
);
Expand Down Expand Up @@ -494,6 +495,35 @@ impl ImportMnemonicScreen {
}
}

#[cfg(feature = "e2e")]
impl ImportMnemonicScreen {
/// Set all seed phrase words and parse the mnemonic (for testing).
pub fn set_seed_phrase_words(&mut self, words: &[&str]) {
self.selected_seed_phrase_length = words.len();
self.seed_phrase_words = words.iter().map(|w| w.to_string()).collect();
match Mnemonic::parse_normalized(words.join(" ").as_str()) {
Ok(mnemonic) => {
self.seed_phrase = Some(mnemonic);
self.error = None;
}
Err(e) => {
self.seed_phrase = None;
self.error = Some(e.to_string());
}
}
}

/// Set the wallet alias (for testing).
pub fn set_alias(&mut self, alias: &str) {
self.alias_input = alias.to_string();
}

/// Trigger wallet import — stores to DB and adds to AppContext (for testing).
pub fn trigger_save(&mut self) -> Result<AppAction, String> {
self.save_wallet()
}
}

impl ScreenLike for ImportMnemonicScreen {
fn ui(&mut self, ctx: &Context) -> AppAction {
let mut action = add_top_panel(
Expand Down Expand Up @@ -630,7 +660,7 @@ impl ScreenLike for ImportMnemonicScreen {

ui.horizontal(|ui| {
ui.label("Name:");
ui.text_edit_singleline(&mut self.alias_input);
ui.add(egui::TextEdit::singleline(&mut self.alias_input).hint_text("Wallet name"));
});

step += 1;
Expand Down
36 changes: 0 additions & 36 deletions tests/e2e/helpers.rs

This file was deleted.

49 changes: 49 additions & 0 deletions tests/e2e/helpers/context.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
use dash_evo_tool::model::wallet::WalletSeedHash;
use dash_sdk::platform::Identifier;

/// Shared test state persisted across phases within a single test run.
/// Replaces the react-native test-context.ts JSON file approach.
pub struct TestContext {
pub wallet_seed_hash: Option<WalletSeedHash>,
pub receive_address: Option<String>,
pub balance_duffs: u64,
pub spv_synced: bool,
pub network: String,
pub wallet_reused: bool,
/// Identity ID created in Phase 5
pub identity_id: Option<Identifier>,
/// DPNS name registered in Phase 6
pub dpns_name: Option<String>,
/// SPV header height at setup completion (needed for tx lock time)
pub header_height: u32,
}

impl TestContext {
/// Returns the wallet seed hash, panicking if not yet set.
pub fn seed_hash(&self) -> &WalletSeedHash {
self.wallet_seed_hash
.as_ref()
.expect("wallet_seed_hash must be set (did Phase 0 complete?)")
}
}

impl Default for TestContext {
fn default() -> Self {
Self {
wallet_seed_hash: None,
receive_address: None,
balance_duffs: 0,
spv_synced: false,
network: "testnet".to_string(),
wallet_reused: false,
identity_id: None,
dpns_name: None,
header_height: 0,
}
}
}

/// Format first 4 bytes of a seed hash as a hex prefix string.
pub fn seed_hash_prefix(hash: &WalletSeedHash) -> String {
hash[..4].iter().map(|b| format!("{:02x}", b)).collect()
}
Loading
Loading