diff --git a/test/e2e/tests/swap-send/swap-send-erc20.spec.ts b/test/e2e/tests/swap-send/swap-send-erc20.spec.ts index eb20ea18f42d..7b58ef728a5b 100644 --- a/test/e2e/tests/swap-send/swap-send-erc20.spec.ts +++ b/test/e2e/tests/swap-send/swap-send-erc20.spec.ts @@ -21,6 +21,7 @@ describe('Swap-Send ERC20', function () { getSwapSendFixtures( this.test?.fullTitle(), SWAP_SEND_QUOTES_RESPONSE_TST_ETH, + '?sourceAmount=100000&sourceToken=0x581c3C1A2A4EBDE2A0Df29B5cf4c116E42945947&destinationToken=0x0000000000000000000000000000000000000000&sender=0x5cfe73b6021e818b776b421b1c4db2474086a7e1&recipient=0xc427D562164062a23a5cFf596A4a3208e72Acd28&slippage=2', ), async ({ driver, diff --git a/test/e2e/tests/swap-send/swap-send-test-utils.ts b/test/e2e/tests/swap-send/swap-send-test-utils.ts index 94e4a8f0a0c9..a78cd2a27057 100644 --- a/test/e2e/tests/swap-send/swap-send-test-utils.ts +++ b/test/e2e/tests/swap-send/swap-send-test-utils.ts @@ -245,10 +245,11 @@ export class SwapSendPage { } export const mockSwapsApi = - (quotes = SWAP_SEND_QUOTES_RESPONSE_ETH_TST) => + (quotes: typeof SWAP_SEND_QUOTES_RESPONSE_ETH_TST, query: string) => async (mockServer: Mockttp) => { - return await mockServer + await mockServer .forGet(`${SWAPS_API_V2_BASE_URL}/v2/networks/1337/quotes`) + .withExactQuery(query) .always() .thenCallback(() => { return { @@ -261,6 +262,7 @@ export const mockSwapsApi = export const getSwapSendFixtures = ( title?: string, swapsQuotes = SWAP_SEND_QUOTES_RESPONSE_ETH_TST, + swapsQuery = '?sourceAmount=1000000000000000000&sourceToken=0x0000000000000000000000000000000000000000&destinationToken=0x581c3C1A2A4EBDE2A0Df29B5cf4c116E42945947&sender=0x5cfe73b6021e818b776b421b1c4db2474086a7e1&recipient=0xc427D562164062a23a5cFf596A4a3208e72Acd28&slippage=2', ) => { const ETH_CONVERSION_RATE_USD = 3010; return { @@ -296,7 +298,7 @@ export const getSwapSendFixtures = ( .build(), smartContract: SMART_CONTRACTS.HST, ethConversionInUsd: ETH_CONVERSION_RATE_USD, - testSpecificMock: mockSwapsApi(swapsQuotes), + testSpecificMock: mockSwapsApi(swapsQuotes, swapsQuery), ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), title, };