From cacbad38ccf44fdd4c465bc823fe1a748740d8a6 Mon Sep 17 00:00:00 2001 From: Felipe Knorr Kuhn <100320+knorrium@users.noreply.github.com> Date: Sat, 19 Mar 2022 22:11:46 -0700 Subject: [PATCH 1/5] Change table-vx-* from id to class --- .../transactions-list/transactions-list.component.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/components/transactions-list/transactions-list.component.html b/frontend/src/app/components/transactions-list/transactions-list.component.html index 790f38cfc..37903beae 100644 --- a/frontend/src/app/components/transactions-list/transactions-list.component.html +++ b/frontend/src/app/components/transactions-list/transactions-list.component.html @@ -18,7 +18,7 @@
{{ errorUnblinded }}
- +
-
+
-
+
{{ errorUnblinded }}
From 827760cae5652e36179b3954d7b8b1f985a9491b Mon Sep 17 00:00:00 2001 From: Felipe Knorr Kuhn <100320+knorrium@users.noreply.github.com> Date: Sat, 19 Mar 2022 22:16:22 -0700 Subject: [PATCH 5/5] Add tests for the address highlighting feature --- .../integration/mainnet/mainnet.spec.ts | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/frontend/cypress/integration/mainnet/mainnet.spec.ts b/frontend/cypress/integration/mainnet/mainnet.spec.ts index 4d89a3268..c3d5d803c 100644 --- a/frontend/cypress/integration/mainnet/mainnet.spec.ts +++ b/frontend/cypress/integration/mainnet/mainnet.spec.ts @@ -171,6 +171,50 @@ describe('Mainnet', () => { }); + describe('address highlighting', () => { + it('highlights single input addresses', () => { + const address = '1wiz32gbHZwMzJCRHMGehJuBgsMTPdaCa'; + cy.visit(`/address/${address}`); + cy.waitForSkeletonGone(); + cy.get('[data-cy="tx-0"] .table-tx-vin .highlight').should('exist'); + cy.get('[data-cy="tx-0"] .table-tx-vin .highlight').invoke('text').should('contain', `${address}`); + }); + + it('highlights multiple input addresses', () => { + const address = '1wiz1rtKFBA58qjb582WF5KAFg9mWCuZV'; + cy.visit(`/address/${address}`); + cy.waitForSkeletonGone(); + cy.get('[data-cy="tx-2"] .table-tx-vin .highlight').should('exist'); + cy.get('[data-cy="tx-2"] .table-tx-vin .highlight').its('length').should('equal', 2); + cy.get('[data-cy="tx-2"] .table-tx-vin .highlight').invoke('text').should('contain', `${address}`); + }); + + it.only('highlights both input and output addresses in the same transaction', () => { + const address = 'bc1q03u63r6hm7a3v6em58zdqtp446w2pw30nm63mv'; + cy.visit(`/address/${address}`); + cy.waitForSkeletonGone(); + cy.get('[data-cy="tx-1"] .table-tx-vin .highlight').should('exist'); + cy.get('[data-cy="tx-1"] .table-tx-vout .highlight').should('exist'); + }); + + it('highlights single output addresses', () => { + const address = '1wiz32gbHZwMzJCRHMGehJuBgsMTPdaCa'; + cy.visit(`/address/${address}`); + cy.waitForSkeletonGone(); + cy.get('[data-cy="tx-1"] .table-tx-vout .highlight').should('exist'); + cy.get('[data-cy="tx-1"] .table-tx-vout .highlight').invoke('text').should('contain', `${address}`); + }); + + it('highlights multiple output addresses', () => { + const address = '1F3Q3sQmiGsWSqK5K6T9tYnX8yqzYRgQbe'; + cy.visit(`/address/${address}`); + cy.waitForSkeletonGone(); + cy.get('[data-cy="tx-1"] .table-tx-vout .highlight').should('exist'); + cy.get('[data-cy="tx-1"] .table-tx-vout .highlight').its('length').should('equal', 2); + cy.get('[data-cy="tx-1"] .table-tx-vout .highlight').invoke('text').should('contain', `${address}`); + }); + }); + describe('blocks navigation', () => { describe('keyboard events', () => {