From 24d4b643e50996bc7ad326952ffd20c66bc9ebbb Mon Sep 17 00:00:00 2001 From: Felipe Knorr Kuhn Date: Wed, 15 Dec 2021 00:02:21 -0800 Subject: [PATCH 1/2] Add failing test for Liquid unconfidential address layout issue --- frontend/cypress/integration/liquid/liquid.spec.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/frontend/cypress/integration/liquid/liquid.spec.ts b/frontend/cypress/integration/liquid/liquid.spec.ts index 0c9a71f85..89e579a50 100644 --- a/frontend/cypress/integration/liquid/liquid.spec.ts +++ b/frontend/cypress/integration/liquid/liquid.spec.ts @@ -62,6 +62,18 @@ describe('Liquid', () => { }); }); + it('renders unconfidential addresses correctly on mobile', () => { + cy.viewport('iphone-6'); + cy.visit(`${basePath}/address/ex1qqmmjdwrlg59c8q4l75sj6wedjx57tj5grt8pat`); + cy.waitForSkeletonGone(); + //TODO: Add proper IDs for these selectors + const firstRowSelector = '.container-xl > :nth-child(3) > div > :nth-child(1) > .table > tbody'; + const thirdRowSelector = '.container-xl > :nth-child(3) > div > :nth-child(3)'; + cy.get(firstRowSelector).invoke('css', 'width').then((firstRowWidth) => { + cy.get(thirdRowSelector).invoke('css', 'width').should('equal', firstRowWidth); + }); + }); + describe('peg in/peg out', () => { it('loads peg in addresses', () => { cy.visit(`${basePath}/tx/fe764f7bedfc2a37b29d9c8aef67d64a57d253a6b11c5a55555cfd5826483a58`); From bcbc60b456507d5cb122ea968dd7ab0a3e18300f Mon Sep 17 00:00:00 2001 From: Felipe Knorr Kuhn Date: Thu, 16 Dec 2021 09:31:02 -0800 Subject: [PATCH 2/2] Fix test assertion --- frontend/cypress/integration/liquid/liquid.spec.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/cypress/integration/liquid/liquid.spec.ts b/frontend/cypress/integration/liquid/liquid.spec.ts index 89e579a50..26885330b 100644 --- a/frontend/cypress/integration/liquid/liquid.spec.ts +++ b/frontend/cypress/integration/liquid/liquid.spec.ts @@ -69,8 +69,10 @@ describe('Liquid', () => { //TODO: Add proper IDs for these selectors const firstRowSelector = '.container-xl > :nth-child(3) > div > :nth-child(1) > .table > tbody'; const thirdRowSelector = '.container-xl > :nth-child(3) > div > :nth-child(3)'; - cy.get(firstRowSelector).invoke('css', 'width').then((firstRowWidth) => { - cy.get(thirdRowSelector).invoke('css', 'width').should('equal', firstRowWidth); + cy.get(firstRowSelector).invoke('css', 'width').then(firstRowWidth => { + cy.get(thirdRowSelector).invoke('css', 'width').then(thirdRowWidth => { + expect(parseInt(firstRowWidth)).to.be.lessThan(parseInt(thirdRowWidth)); + }); }); });