Skip to content

Add new regression tests for React SDK#1556

Open
luans-qa wants to merge 48 commits intomainfrom
tests/e2e-regression-tests-react-sdk
Open

Add new regression tests for React SDK#1556
luans-qa wants to merge 48 commits intomainfrom
tests/e2e-regression-tests-react-sdk

Conversation

@luans-qa
Copy link
Contributor

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

Description

  • Add new test scenarios for the e2e spec file.

PS: This PR has all the changes from the smoke tests branch #1549

Test plan

All tests should work

Package updates

… approach to check through the UI instead of API call.
@luans-qa luans-qa marked this pull request as ready for review January 23, 2026 15:56
Copy link
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.

Additional Comments (1)

  1. apps/wallets/quickstart-devkit/e2e/e2e.spec.ts, line 64-72 (link)

    logic: Recipient address logic is incomplete - missing handling for Stellar chain

6 files reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

Copy link
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.

Additional Comments (1)

  1. apps/wallets/quickstart-devkit/e2e/e2e.spec.ts, line 66-74 (link)

    logic: Redundant logic in else block - walletAddress.startsWith("0x") checked twice, and Stellar chain not handled

    The else block (lines 71-73) repeats the walletAddress.startsWith("0x") check that already happened at line 66. This means Stellar wallets will fall through to the else block and be handled inconsistently.

6 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Copy link
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.

Additional Comments (1)

  1. apps/wallets/quickstart-devkit/components/transfer.tsx, line 64-73 (link)

    logic: Label displays "USDC" but radio value is "usdxm" - confusing for non-Stellar chains

    For EVM chains, the UI should show and send USDC, not USDXM. Only Stellar uses USDXM.

8 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Copy link
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.

6 files reviewed, 6 comments

Edit Code Review Agent Settings | Greptile

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 27, 2026

Additional Comments (5)

apps/wallets/quickstart-devkit/components/transfer.tsx
Label shows "USDC" but token value is "usdxm" - mismatch between UI and actual token

                            <label className="flex items-center gap-2 cursor-pointer">
                                <input
                                    type="radio"
                                    name="usdc"
                                    className="h-4 w-4"
                                    checked={token === "usdxm"}
                                    onChange={() => setToken("usdxm")}
                                />
                                <span>USDXM</span>
                            </label>
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/wallets/quickstart-devkit/components/transfer.tsx
Line: 64:72

Comment:
Label shows "USDC" but token value is "usdxm" - mismatch between UI and actual token

```suggestion
                            <label className="flex items-center gap-2 cursor-pointer">
                                <input
                                    type="radio"
                                    name="usdc"
                                    className="h-4 w-4"
                                    checked={token === "usdxm"}
                                    onChange={() => setToken("usdxm")}
                                />
                                <span>USDXM</span>
                            </label>
```

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

apps/wallets/quickstart-devkit/components/transfer.tsx
Same issue - label shows "USDC" but token value is "usdxm"

                            <label className="flex items-center gap-2 cursor-pointer">
                                <input
                                    type="radio"
                                    name="token"
                                    className="h-4 w-4"
                                    checked={token === "usdxm"}
                                    onChange={() => setToken("usdxm")}
                                />
                                <span>USDXM</span>
                            </label>
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/wallets/quickstart-devkit/components/transfer.tsx
Line: 182:190

Comment:
Same issue - label shows "USDC" but token value is "usdxm"

```suggestion
                            <label className="flex items-center gap-2 cursor-pointer">
                                <input
                                    type="radio"
                                    name="token"
                                    className="h-4 w-4"
                                    checked={token === "usdxm"}
                                    onChange={() => setToken("usdxm")}
                                />
                                <span>USDXM</span>
                            </label>
```

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

apps/wallets/quickstart-devkit/e2e/helpers/auth.ts
Indentation broken - this line is inside try block but not indented

        try {
            const url = new URL(page.url());
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/wallets/quickstart-devkit/e2e/helpers/auth.ts
Line: 500:501

Comment:
Indentation broken - this line is inside try block but not indented

```suggestion
        try {
            const url = new URL(page.url());
```

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

apps/wallets/quickstart-devkit/e2e/config/constants.ts
Nullish coalescing fallback can generate different suffixes - if randomSuffixCache.get(signerType) returns undefined, a new random number is generated but not guaranteed to be set before this function is called again. Consider simplifying:

export function getStellarAlias(signerType: SignerType): string {
    let randomSuffix = randomSuffixCache.get(signerType);
    if (randomSuffix === undefined) {
        randomSuffix = Math.floor(Math.random() * 1000000);
        randomSuffixCache.set(signerType, randomSuffix);
    }
    return `stellartestingwallet${randomSuffix}`;
}
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/wallets/quickstart-devkit/e2e/config/constants.ts
Line: 285:295

Comment:
Nullish coalescing fallback can generate different suffixes - if `randomSuffixCache.get(signerType)` returns undefined, a new random number is generated but not guaranteed to be set before this function is called again. Consider simplifying:

```typescript
export function getStellarAlias(signerType: SignerType): string {
    let randomSuffix = randomSuffixCache.get(signerType);
    if (randomSuffix === undefined) {
        randomSuffix = Math.floor(Math.random() * 1000000);
        randomSuffixCache.set(signerType, randomSuffix);
    }
    return `stellartestingwallet${randomSuffix}`;
}
```

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

apps/wallets/quickstart-devkit/e2e/e2e.spec.ts
Regex only allows 1-2 decimal places, but transfers use 0.0001 (4 decimals) - assertion will fail

                expectAuth(balances.nativeToken.amount).toMatch(/^\d+(\.\d+)?$/);
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/wallets/quickstart-devkit/e2e/e2e.spec.ts
Line: 483:483

Comment:
Regex only allows 1-2 decimal places, but transfers use 0.0001 (4 decimals) - assertion will fail

```suggestion
                expectAuth(balances.nativeToken.amount).toMatch(/^\d+(\.\d+)?$/);
```

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

Copy link
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.

5 files reviewed, 5 comments

Edit Code Review Agent Settings | Greptile

Copy link
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.

No files reviewed, no comments

Edit Code Review Agent Settings | Greptile

Copy link
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.

5 files reviewed, 5 comments

Edit Code Review Agent Settings | Greptile

Copy link
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


// Generate a unique alias for Stellar wallets based on the email's random suffix
// This ensures consistency - same email = same alias
export function getStellarAlias(signerType: SignerType): string {
Copy link
Collaborator

Choose a reason for hiding this comment

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

why do we only generate alias for stellar?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Stellar requires unique aliases when using random emails to avoid wallet conflicts. Other chains (EVM, Solana) don't require aliases for tests. While working on that, I got some random failures, which is why I added this logic.

Copy link
Collaborator

Choose a reason for hiding this comment

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

can you explain further? it should be the same for all chains

Copy link
Contributor Author

Choose a reason for hiding this comment

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

While testing, I observed that randomly, the stellar test cases were failing with the error.

image

And when I was looking for the root cause of that, I changed the stellar address, and it worked, so after implementing this logic for stellar addresses, it worked every time.

To reproduce locally, you can:

  1. Run the application
  2. Then open the following link Stellar Wallet
  3. It will redirect you to the login page from the Stellar address
  4. Login using the mailosaur address, which can be anything@gljzc5s9.mailosaur.net
  5. Then open another incognito tab from a new session.
  6. Open the same link and try to log in again
  7. Observe now that the error is displayed.

It only happened with the Stellar address. Is this a bug?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@alberto-crossmint do aliases behave differently in stellar?

Copy link
Contributor

Choose a reason for hiding this comment

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

They don't. Let me check

Copy link
Contributor

Choose a reason for hiding this comment

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

Answered in slack!

Copy link
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.

2 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

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

}

const baseAlias = SIGNER_EMAIL_BASE[signerType];
// Generate a random number between 0 and 999999 to create unique email addresses
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: we are creating random aliases not random email addresses, no?

// This ensures consistency - same email = same alias
export function getStellarAlias(signerType: SignerType): string {
// Get the random suffix that was used for the email
const randomSuffix = randomSuffixCache.get(signerType) ?? Math.floor(Math.random() * 1000000);
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't get this, so we'll be using the same alias for the same signer type? What's the motivation?

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