Skip to content

Commit 3322779

Browse files
committed
feat(tests): add Localhost network configuration and enhance gas fee assertions
- Added a new network configuration for the Localhost (chainID: 1337) in `tx-sentinel-networks-map.ts` to support EIP-7702 relay and gasless confirmation tests. - Updated the gas fee assertions in `gas-fee-tokens-eip-7702-sponsored.spec.ts` to check for the visibility of the Gas Fees Details component and improved timeout settings for better test reliability.
1 parent d324fe6 commit 3322779

2 files changed

Lines changed: 31 additions & 3 deletions

File tree

tests/api-mocking/mock-responses/tx-sentinel-networks-map.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,28 @@ export const TX_SENTINEL_NETWORKS_MAP = {
7171
hidden: false,
7272
sendBundle: false,
7373
},
74+
/**
75+
* Local Anvil / fixture chain (0x539). Required for EIP-7702 relay + gasless
76+
* confirmation E2E (`gas-fee-tokens-eip-7702-sponsored.spec.ts`): `isRelaySupported`
77+
* reads Sentinel `/networks` via `getSentinelNetworkFlags`.
78+
*/
79+
'1337': {
80+
name: 'Localhost',
81+
group: 'ethereum',
82+
chainID: 1337,
83+
nativeCurrency: {
84+
name: 'ETH',
85+
symbol: 'ETH',
86+
decimals: 18,
87+
},
88+
network: 'localhost',
89+
explorer: 'http://localhost:8545/explorer',
90+
confirmations: true,
91+
smartTransactions: true,
92+
relayTransactions: true,
93+
hidden: false,
94+
sendBundle: false,
95+
},
7496
'137': {
7597
name: 'Polygon Mainnet',
7698
group: 'polygon',

tests/smoke/confirmations/transactions/gas-fee-tokens-eip-7702-sponsored.spec.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,15 @@ const performSendTransaction = async () => {
184184
await SendView.pressContinueButton();
185185
await SendView.inputRecipientAddress(RECIPIENT_ADDRESS_MOCK);
186186
await SendView.pressReviewButton();
187-
await Assertions.expectElementToBeVisible(
188-
RowComponents.NetworkFeePaidByMetaMask,
189-
);
187+
await Assertions.expectElementToBeVisible(RowComponents.GasFeesDetails, {
188+
description: 'gas fees row is present on review screen',
189+
timeout: 30000,
190+
});
191+
await Assertions.expectElementToBeVisible(RowComponents.NetworkFeePaidByMetaMask, {
192+
description:
193+
'network fee shows MetaMask-sponsored gas after relay + simulation settle',
194+
timeout: 60000,
195+
});
190196
await Utilities.waitForElementToBeVisible(FooterActions.confirmButton);
191197
await Utilities.waitForElementToStopMoving(FooterActions.confirmButton, {
192198
timeout: 5000,

0 commit comments

Comments
 (0)