Skip to content

Conversation

@Ondra-Zik-SL
Copy link
Contributor

@Ondra-Zik-SL Ondra-Zik-SL commented Dec 4, 2025

Description

This PR adds end-to-end tests for sending transactions on the Base network (EVM chain).

  1. Custom fee transaction test: Tests the ability to set custom gas fees (gas limit, max fee per gas, and max priority fee per gas) and verifies all fee-related information displayed on the device emulator.

  2. Standard fee transaction test: Tests a complete send flow with standard fees, including transaction confirmation on the network and verification of the confirmed status in the transaction details modal.

Key changes:

  • New test file: Added send-base.test.ts with comprehensive tests for Base network transactions
  • Enhanced page object: Extended the Fees page object with:
    • getStandardFeeWorkaround(): Helper method to extract standard fee values by temporarily switching to custom mode
    • switchToStandard(): Method to switch back to standard fee mode
    • Improved calculateEthereumMaxFee() with configurable decimal precision
  • Added test IDs: Added data-testid attributes to transaction detail modal for better testability of confirmed/unconfirmed states

Test will be only in nightly desktop because on how it has a finite resources.
Nightly Desktop

🔍🖥️ Suite web test results: View in Currents

🔍🖥️ Suite desktop test results: View in Currents

Copy link

Copilot AI left a comment

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 comprehensive end-to-end tests for Base network (EVM chain) transactions, including both custom and standard fee scenarios, along with necessary test infrastructure improvements.

  • Adds two E2E tests: one for custom fee transactions and one for standard fee transactions with network confirmation
  • Enhances the Fees page object with helper methods to extract standard fee values and configurable decimal precision
  • Adds test IDs to transaction detail modal for better testability of confirmed/unconfirmed transaction states

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
packages/suite-desktop-core/e2e/tests/wallet/send-base.test.ts New test file implementing comprehensive Base network send transaction tests with custom and standard fee scenarios
packages/suite-desktop-core/e2e/support/pageObjects/trading/fees.ts Enhanced Fees page object with getStandardFeeWorkaround() method, switchToStandard() method, and configurable decimal precision for fee calculations
packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/BasicTxDetails.tsx Added data-testid attributes to confirmed/unconfirmed transaction status elements for E2E test targeting

tradingPage.fees.calculateEthereumMaxFee({
gasLimit,
maxFeePerGas,
numberOfDecimasls: 15,
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

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

Typo in parameter name: "numberOfDecimasls" should be "numberOfDecimals" when calling the method.

Suggested change
numberOfDecimasls: 15,
numberOfDecimals: 15,

Copilot uses AI. Check for mistakes.
const maxFeePerGasRounded = new BigNumber(maxFeePerGas)
.decimalPlaces(4, BigNumber.ROUND_UP)
.toFixed(4);
new BigNumber(maxFeePerGas).decimalPlaces(4, BigNumber.ROUND_UP);
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

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

This line appears to be dead code - it creates a new BigNumber but doesn't assign it to anything or use the result. The calculation is already performed on the previous lines and assigned to maxFeePerGasRounded.

Suggested change
new BigNumber(maxFeePerGas).decimalPlaces(4, BigNumber.ROUND_UP);

Copilot uses AI. Check for mistakes.
calculateEthereumMaxFee({
gasLimit,
maxFeePerGas,
numberOfDecimasls = 14,
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

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

Typo in parameter name: "numberOfDecimasls" should be "numberOfDecimals" (missing 'l', extra 's').

Copilot uses AI. Check for mistakes.
}: {
gasLimit: string;
maxFeePerGas: string;
numberOfDecimasls?: number;
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

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

Typo in parameter name: "numberOfDecimasls" should be "numberOfDecimals" (missing 'l', extra 's'). This typo appears in both the parameter definition and default value assignment.

Copilot uses AI. Check for mistakes.
authored: Ondra Zik
rebased: Martin Cihlar
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.

2 participants