mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 09:57:02 +01:00
mock contract interaction signature in e2e tests (#15297)
This commit is contained in:
parent
45cecf385d
commit
6233ed414d
@ -25,6 +25,28 @@ async function setupMocking(server, testSpecificMock) {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
await server
|
||||||
|
.forGet('https://www.4byte.directory/api/v1/signatures/')
|
||||||
|
.thenCallback(() => {
|
||||||
|
return {
|
||||||
|
statusCode: 200,
|
||||||
|
json: {
|
||||||
|
count: 1,
|
||||||
|
next: null,
|
||||||
|
previous: null,
|
||||||
|
results: [
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
created_at: null,
|
||||||
|
text_signature: 'deposit()',
|
||||||
|
hex_signature: null,
|
||||||
|
bytes_signature: null,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
await server
|
await server
|
||||||
.forGet('https://gas-api.metaswap.codefi.network/networks/1/gasPrices')
|
.forGet('https://gas-api.metaswap.codefi.network/networks/1/gasPrices')
|
||||||
.thenCallback(() => {
|
.thenCallback(() => {
|
||||||
|
@ -103,7 +103,7 @@ describe('Deploy contract and call contract methods', function () {
|
|||||||
);
|
);
|
||||||
await driver.waitForSelector({
|
await driver.waitForSelector({
|
||||||
css: '.confirm-page-container-summary__action__name',
|
css: '.confirm-page-container-summary__action__name',
|
||||||
text: 'Withdraw',
|
text: 'Deposit',
|
||||||
});
|
});
|
||||||
await driver.clickElement({ text: 'Confirm', tag: 'button' });
|
await driver.clickElement({ text: 'Confirm', tag: 'button' });
|
||||||
await driver.waitUntilXWindowHandles(2);
|
await driver.waitUntilXWindowHandles(2);
|
||||||
|
Loading…
Reference in New Issue
Block a user