Skip to content

Add new regression tests for React SDK#1556

Merged
luans-qa merged 50 commits intomainfrom
tests/e2e-regression-tests-react-sdk
Feb 17, 2026
Merged

Add new regression tests for React SDK#1556
luans-qa merged 50 commits intomainfrom
tests/e2e-regression-tests-react-sdk

Conversation

@luans-qa
Copy link
Copy Markdown
Contributor

@luans-qa luans-qa commented Jan 22, 2026

Description

  • Add new test scenarios for the e2e spec file.

Chains / chain architectures tested

EVM	Base Sepolia (base-sepolia)	Email + Phone signer
Solana Devnet (solana) Email + Phone signer
Stellar Testnet (stellar) Email signer only

Flows covered

  1. Wallet creation/authentication
  • E2E: Same flow for every TEST_CONFIGURATION (EVM email/phone, Solana email/phone, Stellar email). Asserts:
  • UI shows “Wallets Quickstart”.
  • Wallet address is returned and visible (EVM 0x42, Solana 32–44 chars, Stellar G/C 56 chars).
  1. Balance API
  • Smoke: Fetch balances via SDK — native token (ETH), USDXM, and tokens array; amounts/symbols and numeric format.
  • E2E: “Display wallet balances correctly” for each config:
  • Native token (ETH / SOL / XLM) and USDXM visible in UI.
  • getWalletBalances() returns nativeToken and usdxm with amount/symbol; native symbol matches chain.
  1. Sending transactions (transfer)
  • E2E: Same flow for all configs:
  • Fund wallet (faucet).
  • Transfer to chain-specific recipient (EVM / Solana / Stellar).
  • Handle signer confirmation (e.g. email OTP) when required.
  1. Prepared transaction (create + approve)
  • E2E: Same for all configs:
  • Fund wallet.
  • Create prepared transaction (recipient = chain-specific test address, amount 10, token usdxm).
  • Approve by ID (with signer confirmation if needed).
  • Assert approval result and that result text mentions “transaction”.

Test plan

All tests should work

Package updates


Open with Devin

… approach to check through the UI instead of API call.
greptile-apps[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Collaborator

@albertoelias-crossmint albertoelias-crossmint left a comment

Choose a reason for hiding this comment

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

looks good, left some comments

Comment thread apps/wallets/quickstart-devkit/e2e/config/constants.ts
Comment thread apps/wallets/quickstart-devkit/e2e/helpers/wallet.ts Outdated
Comment thread apps/wallets/quickstart-devkit/e2e/helpers/wallet.ts Outdated
Comment thread apps/wallets/quickstart-devkit/e2e/helpers/wallet.ts Outdated
Comment thread apps/wallets/quickstart-devkit/e2e/helpers/wallet.ts Outdated
Comment thread apps/wallets/quickstart-devkit/e2e/e2e.spec.ts Outdated
greptile-apps[bot]

This comment was marked as resolved.

luans-qa and others added 2 commits January 27, 2026 17:20
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Jan 27, 2026

Additional Comments (1)

apps/wallets/quickstart-devkit/e2e/helpers/wallet.ts
Console log message says "Failed" but uses success emoji ✅ - should use ❌ or ⚠️

        console.log("⚠️ Failed to get wallet balance, retrying...");
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/wallets/quickstart-devkit/e2e/helpers/wallet.ts
Line: 76:76

Comment:
Console log message says "Failed" but uses success emoji ✅ - should use ❌ or ⚠️

```suggestion
        console.log("⚠️ Failed to get wallet balance, retrying...");
```

How can I resolve this? If you propose a fix, please make it concise.

Comment thread apps/wallets/quickstart-devkit/e2e/config/constants.ts Outdated
Comment thread apps/wallets/quickstart-devkit/e2e/config/constants.ts Outdated
Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

11 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Comment thread apps/wallets/quickstart-devkit/e2e/e2e.spec.ts
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Feb 17, 2026

Additional Comments (1)

apps/wallets/quickstart-devkit/components/balance.tsx
Redundant ternary — both branches are identical
After the refactor from USDC to USDXM, the Stellar and non-Stellar branches (lines 66-92) now render exactly the same JSX. The wallet?.chain === "stellar" ternary can be collapsed into a single block:

            <div className="flex justify-between items-center">
                <div className="flex items-center gap-2">
                    <Image src="/usdc.svg" alt="USDXM" width={24} height={24} />
                    <p className="font-medium">USDXM</p>
                </div>
                <div className="text-gray-700 font-medium" data-testid="usdxm-balance">
                    ${" "}
                    {formatBalance(
                        balances?.tokens?.find((t) => t.symbol?.toLowerCase() === "usdxm")?.amount ?? "0"
                    )}
                </div>
            </div>
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/wallets/quickstart-devkit/components/balance.tsx
Line: 66:92

Comment:
**Redundant ternary — both branches are identical**
After the refactor from USDC to USDXM, the Stellar and non-Stellar branches (lines 66-92) now render exactly the same JSX. The `wallet?.chain === "stellar"` ternary can be collapsed into a single block:

```suggestion
            <div className="flex justify-between items-center">
                <div className="flex items-center gap-2">
                    <Image src="/usdc.svg" alt="USDXM" width={24} height={24} />
                    <p className="font-medium">USDXM</p>
                </div>
                <div className="text-gray-700 font-medium" data-testid="usdxm-balance">
                    ${" "}
                    {formatBalance(
                        balances?.tokens?.find((t) => t.symbol?.toLowerCase() === "usdxm")?.amount ?? "0"
                    )}
                </div>
            </div>
```

How can I resolve this? If you propose a fix, please make it concise.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 3 potential issues.

View 6 additional findings in Devin Review.

Open in Devin Review

Comment thread apps/wallets/quickstart-devkit/e2e/e2e.spec.ts Outdated
Comment thread apps/wallets/quickstart-devkit/e2e/smoke-tests/smoke.spec.ts
Comment thread apps/wallets/quickstart-devkit/components/transfer.tsx
Comment thread apps/wallets/quickstart-devkit/components/balance.tsx
Comment thread apps/wallets/quickstart-devkit/components/balance.tsx
Comment thread apps/wallets/quickstart-devkit/e2e/smoke-tests/smoke.spec.ts
Comment thread apps/wallets/quickstart-devkit/e2e/e2e.spec.ts
Comment thread apps/wallets/quickstart-devkit/e2e/e2e.spec.ts
@alberto-crossmint
Copy link
Copy Markdown
Contributor

Can you specify in the PR description what are we adding tests for and which chains? 🙏

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

11 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Feb 17, 2026

Additional Comments (2)

apps/wallets/quickstart-devkit/components/approval-test.tsx
Stellar wallets misclassified as EVM

Now that Stellar is included in TEST_CONFIGURATIONS, these boolean checks cause problems for Stellar wallets. When wallet?.chain === "stellar", isEVMWallet is true and isSolanaWallet is false. This means:

  1. The token select defaults to "eth" (line 16) instead of a Stellar-appropriate token
  2. The recipient placeholder shows "0x..." (line 233) instead of a Stellar address format
  3. isValidAddress (line 35) uses EVM's isAddress(), which rejects valid Stellar addresses like CANKOZR2...

The e2e test "should create and approve a prepared transaction" now runs against Stellar configs and passes a Stellar recipient address. When the component calls handleCreatePreparedTransaction, isValidAddress will return false, causing the transaction to fail with "Invalid recipient address."

Consider adding a Stellar check:

const isEVMWallet = wallet?.chain !== "solana" && wallet?.chain !== "stellar";
const isSolanaWallet = wallet?.chain === "solana";
const isStellarWallet = wallet?.chain === "stellar";
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/wallets/quickstart-devkit/components/approval-test.tsx
Line: 11:12

Comment:
**Stellar wallets misclassified as EVM**

Now that Stellar is included in `TEST_CONFIGURATIONS`, these boolean checks cause problems for Stellar wallets. When `wallet?.chain === "stellar"`, `isEVMWallet` is `true` and `isSolanaWallet` is `false`. This means:

1. The token select defaults to `"eth"` (line 16) instead of a Stellar-appropriate token
2. The recipient placeholder shows `"0x..."` (line 233) instead of a Stellar address format
3. `isValidAddress` (line 35) uses EVM's `isAddress()`, which rejects valid Stellar addresses like `CANKOZR2...`

The e2e test `"should create and approve a prepared transaction"` now runs against Stellar configs and passes a Stellar recipient address. When the component calls `handleCreatePreparedTransaction`, `isValidAddress` will return `false`, causing the transaction to fail with "Invalid recipient address."

Consider adding a Stellar check:
```
const isEVMWallet = wallet?.chain !== "solana" && wallet?.chain !== "stellar";
const isSolanaWallet = wallet?.chain === "solana";
const isStellarWallet = wallet?.chain === "stellar";
```

How can I resolve this? If you propose a fix, please make it concise.

apps/wallets/quickstart-devkit/components/balance.tsx
Stellar/non-Stellar branches are now identical

After the changes, both the wallet?.chain === "stellar" branch (lines 67-78) and the else branch (lines 79-91) render the exact same JSX — same alt text, same label, same data-testid, and same balance lookup logic. The ternary is unnecessary and can be simplified to a single block.

                <div className="flex justify-between items-center">
                    <div className="flex items-center gap-2">
                        <Image src="/usdc.svg" alt="USDXM" width={24} height={24} />
                        <p className="font-medium">USDXM</p>
                    </div>
                    <div className="text-gray-700 font-medium" data-testid="usdxm-balance">
                        ${" "}
                        {formatBalance(
                            balances?.tokens?.find((t) => t.symbol?.toLowerCase() === "usdxm")?.amount ?? "0"
                        )}
                    </div>
                </div>
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/wallets/quickstart-devkit/components/balance.tsx
Line: 66:92

Comment:
**Stellar/non-Stellar branches are now identical**

After the changes, both the `wallet?.chain === "stellar"` branch (lines 67-78) and the `else` branch (lines 79-91) render the exact same JSX — same alt text, same label, same `data-testid`, and same balance lookup logic. The ternary is unnecessary and can be simplified to a single block.

```suggestion
                <div className="flex justify-between items-center">
                    <div className="flex items-center gap-2">
                        <Image src="/usdc.svg" alt="USDXM" width={24} height={24} />
                        <p className="font-medium">USDXM</p>
                    </div>
                    <div className="text-gray-700 font-medium" data-testid="usdxm-balance">
                        ${" "}
                        {formatBalance(
                            balances?.tokens?.find((t) => t.symbol?.toLowerCase() === "usdxm")?.amount ?? "0"
                        )}
                    </div>
                </div>
```

How can I resolve this? If you propose a fix, please make it concise.

@alberto-crossmint
Copy link
Copy Markdown
Contributor

From the PR description:

Solana Mainnet (solana) Email + Phone signer
Stellar Mainnet (stellar) Email signer only

I guess it's

Solana Devnet (solana) Email + Phone signer
Stellar Testnet (stellar) Email signer only

??

@luans-qa
Copy link
Copy Markdown
Contributor Author

luans-qa commented Feb 17, 2026

From the PR description:

Solana Mainnet (solana) Email + Phone signer
Stellar Mainnet (stellar) Email signer only

I guess it's

Solana Devnet (solana) Email + Phone signer
Stellar Testnet (stellar) Email signer only

??

Yes, you are correct, just typo, I fixed it

@luans-qa luans-qa merged commit b7e9d06 into main Feb 17, 2026
3 checks passed
@luans-qa luans-qa deleted the tests/e2e-regression-tests-react-sdk branch February 17, 2026 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants