test(trading): withdrawal details for extra security e2e tests (#3977)
This commit is contained in:
parent
702ea0c6b4
commit
0a8439d125
@ -41,6 +41,7 @@ const submitTransferBtn = '[type="submit"]';
|
||||
const transferForm = 'transfer-form';
|
||||
const depositSubmit = 'deposit-submit';
|
||||
const approveSubmit = 'approve-submit';
|
||||
const dialogContent = 'dialog-content';
|
||||
|
||||
// Because the tests are run on a live network to optimize time, the tests are interdependent and must be run in the given order.
|
||||
describe('capsule - without MultiSign', { tags: '@slow' }, () => {
|
||||
@ -342,6 +343,7 @@ describe('capsule', { tags: '@slow', testIsolation: true }, () => {
|
||||
// 1002-WITH-019
|
||||
// 1002-WITH-020
|
||||
// 1002-WITH-021
|
||||
const ethWalletAddress = Cypress.env('ETHEREUM_WALLET_ADDRESS');
|
||||
|
||||
cy.visit('/#/portfolio');
|
||||
cy.get('main[data-testid="/portfolio"]').should('exist');
|
||||
@ -380,6 +382,31 @@ describe('capsule', { tags: '@slow', testIsolation: true }, () => {
|
||||
'View in block explorerYou can save your withdrawal details for extra security.'
|
||||
)
|
||||
.and('contain.text', 'Withdraw 1.00 tBTCComplete withdrawal');
|
||||
cy.getByTestId('toast-withdrawal-details').click();
|
||||
cy.getByTestId(dialogContent)
|
||||
.last()
|
||||
.within(() => {
|
||||
cy.getByTestId('dialog-title').should(
|
||||
'contain.text',
|
||||
'Save withdrawal details'
|
||||
);
|
||||
cy.getByTestId('copy-button').should('be.visible');
|
||||
cy.getByTestId('assetSource_value').should(
|
||||
'have.text',
|
||||
'0xb63D135B0a6854EEb765d69ca36210cC70BECAE0'
|
||||
);
|
||||
cy.getByTestId('amount_value').should('have.text', '100000');
|
||||
cy.getByTestId('nonce_value').invoke('text').should('not.be.empty');
|
||||
cy.getByTestId('signatures_value')
|
||||
.invoke('text')
|
||||
.should('not.be.empty');
|
||||
cy.getByTestId('targetAddress_value').should(
|
||||
'have.text',
|
||||
ethWalletAddress
|
||||
);
|
||||
cy.getByTestId('creation_value').invoke('text').should('not.be.empty');
|
||||
});
|
||||
cy.getByTestId('close-withdrawal-approval-dialog').click();
|
||||
|
||||
cy.get('.ag-center-cols-container')
|
||||
.find('[col-id="status"]')
|
||||
|
@ -114,7 +114,7 @@ const WithdrawalApprovalDialogContent = ({
|
||||
} else {
|
||||
return (
|
||||
<div className="py-4 flex flex-col">
|
||||
<div className="self-end mb-1">
|
||||
<div className="self-end mb-1" data-testid="copy-button">
|
||||
<CopyWithTooltip text={JSON.stringify(details, undefined, 2)}>
|
||||
<Button
|
||||
className="flex gap-1 items-center no-underline"
|
||||
|
Loading…
Reference in New Issue
Block a user