diff --git a/packages/suite-web/e2e/tests/wallet/pending-transactions.test.ts b/packages/suite-web/e2e/tests/wallet/pending-transactions.test.ts index 4c304e4d73d..21cec27feba 100644 --- a/packages/suite-web/e2e/tests/wallet/pending-transactions.test.ts +++ b/packages/suite-web/e2e/tests/wallet/pending-transactions.test.ts @@ -53,16 +53,16 @@ describe('Use regtest to test pending transactions', () => { cy.task('pressYes'); cy.getTestElement('@modal/send').click(); - cy.getTestElement('@wallet/accounts/transaction-list/group/0').within(() => { + cy.getTestElement('@wallet/accounts/transaction-list/pending/group/0').within(() => { // pre-pending is immediately created and placed in "pending transactions group" cy.getTestElement('@transaction-item/0/prepending/heading'); // however, after a while it is replaced by a standard pending transaction cy.getTestElement(`@transaction-item/0/heading`).click({ scrollBehavior: 'bottom', }); - // count has not changed - cy.getTestElement('@transaction-group/pending/count').contains(index + 1); }); + // count has not changed + cy.getTestElement('@transaction-group/pending/count').contains(index + 1); cy.getTestElement('@tx-detail/txid-value').then($el => { cy.task('set', { key: address, value: $el.attr('id') }); }); @@ -71,20 +71,20 @@ describe('Use regtest to test pending transactions', () => { }); // account 1 has 2 pending transactions (self and sent) - cy.getTestElement('@wallet/accounts/transaction-list/group/0').within(() => { + cy.getTestElement('@wallet/accounts/transaction-list/pending/group/0').within(() => { cy.getTestElement('@transaction-item/0/heading').contains('Sending REGTEST'); cy.getTestElement('@transaction-item/1/heading').contains('Sending REGTEST to myself'); }); // account 2 has 1 pending transaction (receive) cy.getTestElement('@account-menu/regtest/normal/1').click(); - cy.getTestElement('@wallet/accounts/transaction-list/group/0').within(() => { + cy.getTestElement('@wallet/accounts/transaction-list/pending/group/0').within(() => { cy.getTestElement('@transaction-item/0/heading').contains('Receiving REGTEST'); }); // while observing account 1, sent transaction is mined cy.getTestElement('@account-menu/regtest/normal/0').click(); - cy.getTestElement('@wallet/accounts/transaction-list/group/0').within(() => { + cy.getTestElement('@wallet/accounts/transaction-list/pending/group/0').within(() => { cy.getTestElement('@transaction-item/0/heading').contains('Sending REGTEST'); cy.getTestElement('@transaction-item/1/heading').contains('Sending REGTEST to myself'); }); @@ -96,7 +96,7 @@ describe('Use regtest to test pending transactions', () => { }); cy.wait(2000); // wait for potential notification about mined txs // nothing has changed - cy.getTestElement('@wallet/accounts/transaction-list/group/0').within(() => { + cy.getTestElement('@wallet/accounts/transaction-list/pending/group/0').within(() => { cy.getTestElement('@transaction-item/0/heading').contains('Sending REGTEST'); cy.getTestElement('@transaction-item/1/heading').contains('Sending REGTEST to myself'); }); @@ -112,18 +112,18 @@ describe('Use regtest to test pending transactions', () => { }); }); // which causes sent transaction to disappear, self transaction stays - cy.getTestElement('@wallet/accounts/transaction-list/group/0').within(() => { + cy.getTestElement('@wallet/accounts/transaction-list/pending/group/0').within(() => { cy.getTestElement('@transaction-item/0/heading').contains('Sending REGTEST to myself'); - cy.getTestElement('@transaction-group/pending/count').contains(1); }); + cy.getTestElement('@transaction-group/pending/count').contains(1); // and new group of transactions appears with the previously pending transaction now confirmed - cy.getTestElement('@wallet/accounts/transaction-list/group/1').within(() => { + cy.getTestElement('@wallet/accounts/transaction-list/confirmed/group/0').within(() => { cy.getTestElement('@transaction-item/0/heading').contains('Sent REGTEST'); }); // receive pending transaction on account2 is now mined as well cy.getTestElement('@account-menu/regtest/normal/1').click(); - cy.getTestElement('@wallet/accounts/transaction-list/group/0').within(() => { + cy.getTestElement('@wallet/accounts/transaction-list/confirmed/group/0').within(() => { cy.getTestElement(`@transaction-item/0/heading`).contains('Received REGTEST'); }); }); diff --git a/packages/suite-web/e2e/tests/wallet/send-form-regtest.test.ts b/packages/suite-web/e2e/tests/wallet/send-form-regtest.test.ts index 41b28a7d885..1024752e0b1 100644 --- a/packages/suite-web/e2e/tests/wallet/send-form-regtest.test.ts +++ b/packages/suite-web/e2e/tests/wallet/send-form-regtest.test.ts @@ -94,7 +94,7 @@ describe('Send form for bitcoin', () => { cy.task('pressYes'); cy.getTestElement('@modal/send').click(); - cy.getTestElement('@wallet/accounts/transaction-list/group/0').should( + cy.getTestElement('@wallet/accounts/transaction-list/pending/group/0').should( 'contain', 'OP_RETURN (meow)', ); diff --git a/packages/suite/src/views/wallet/transactions/TransactionList/TransactionGroupedList.tsx b/packages/suite/src/views/wallet/transactions/TransactionList/TransactionGroupedList.tsx index 6a43c822761..8f9091e9f32 100644 --- a/packages/suite/src/views/wallet/transactions/TransactionList/TransactionGroupedList.tsx +++ b/packages/suite/src/views/wallet/transactions/TransactionList/TransactionGroupedList.tsx @@ -35,6 +35,7 @@ export const TransactionGroupedList = ({ symbol={symbol} transactions={value} localCurrency={localCurrency} + isPending={isPending} index={groupIndex} > {groupJointTransactions(value).map((item, index) => diff --git a/packages/suite/src/views/wallet/transactions/TransactionList/TransactionsGroup/TransactionsGroup.tsx b/packages/suite/src/views/wallet/transactions/TransactionList/TransactionsGroup/TransactionsGroup.tsx index 287629090ab..a1d921e9ff1 100644 --- a/packages/suite/src/views/wallet/transactions/TransactionList/TransactionsGroup/TransactionsGroup.tsx +++ b/packages/suite/src/views/wallet/transactions/TransactionList/TransactionsGroup/TransactionsGroup.tsx @@ -35,6 +35,7 @@ interface TransactionsGroupProps { symbol: Network['symbol']; localCurrency: FiatCurrencyCode; index: number; + isPending: boolean; } export const TransactionsGroup = ({ @@ -42,6 +43,7 @@ export const TransactionsGroup = ({ symbol, transactions, localCurrency, + isPending, children, index, ...rest @@ -88,7 +90,7 @@ export const TransactionsGroup = ({ setIsHovered(true)} - data-test={`@wallet/accounts/transaction-list/group/${index}`} + data-test={`@wallet/accounts/transaction-list/${isPending ? 'pending' : 'confirmed'}/group/${index}`} onMouseLeave={() => setIsHovered(false)} {...rest} >