Skip to content

Conversation

@vinistevam
Copy link
Contributor

@vinistevam vinistevam commented Dec 18, 2025

Description

This Pr aims to fix the flakiness for e2e/specs/confirmations-redesigned/transactions/gas-fee-tokens-eip-7702.spec.ts.

Changelog

CHANGELOG entry: null

Related issues

Fixes: #24139

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Adds visibility checks and refactors token selection retrieval to stabilize the Gas Fee Token EIP-7702 e2e test, then re-enables it.

  • E2E:
    • e2e/pages/Confirmation/GasFeeTokenModal.ts
      • Add visibility assertion for GAS_FEE_TOKEN_AMOUNT_FIAT before text check.
    • e2e/specs/confirmations-redesigned/transactions/gas-fee-tokens-eip-7702.spec.ts
      • Re-enable spec (remove skip).
      • Add getGasFeeTokenSelected() helper and use it to verify selected token label.
      • Assert modal header Select a token is visible before validations.
      • Minor refactor to reduce flakiness around element attribute reads.

Written by Cursor Bugbot for commit 1c2bb39. This will update automatically on new commits. Configure here.

@vinistevam vinistevam added the team-confirmations Push issues to confirmations team label Dec 18, 2025
@github-actions
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@vinistevam vinistevam added the no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed label Dec 18, 2025
@vinistevam vinistevam marked this pull request as ready for review December 18, 2025 15:35
@vinistevam vinistevam requested a review from a team as a code owner December 18, 2025 15:35
@github-actions
Copy link
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeConfirmationsRedesigned
  • Risk Level: low
  • AI Confidence: 95%
click to see 🤖 AI reasoning details

The changes are purely E2E test infrastructure modifications:

  1. GasFeeTokenModal.ts: Added a visibility assertion in the checkAmountFiat method to ensure the element is visible before getting its attributes. This is a defensive improvement to prevent flaky tests.

  2. gas-fee-tokens-eip-7702.spec.ts:

    • Re-enabled a previously skipped test (changed describe.skip to describe)
    • Added a helper function getGasFeeTokenSelected() for code reuse
    • Added an assertion to verify the "Select a token" modal is visible
    • The test is explicitly tagged with SmokeConfirmationsRedesigned

Since no application code is changed, only E2E test code, the risk is low. However, since a previously skipped test is being re-enabled (it was skipped due to "app crashes on CI"), we should run the SmokeConfirmationsRedesigned tag to validate that the test now works correctly with the improvements made.

View GitHub Actions results

(symbolElementAttributes as { text?: string; label?: string })?.label ??
'';
return symbolElementLabel;
};
Copy link

Choose a reason for hiding this comment

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

Bug: Helper function violates Page Object Model pattern (Bugbot Rules)

The getGasFeeTokenSelected() helper function performs element attribute access and parsing logic directly in the spec file. According to the E2E testing guidelines which state "Move all element selectors to Page Objects or dedicated selector files" and "Access UI elements through Page Object methods, not directly in test specs," this logic accessing RowComponents.NetworkFeeGasFeeTokenSymbol and calling getAttributes() should be encapsulated in a Page Object method (like RowComponents or a related page class) rather than defined in the test spec file.

Fix in Cursor Fix in Web

@sonarqubecloud
Copy link

@jpuri jpuri enabled auto-merge December 19, 2025 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed size-S team-confirmations Push issues to confirmations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable Send native asset Gas Station using EIP-7702

3 participants