From 23032bf583549093a0413fbc061ff5f4e4925481 Mon Sep 17 00:00:00 2001 From: Franco Venica Date: Sun, 19 Nov 2023 22:34:36 -0300 Subject: [PATCH] qr code + ENS name + name validation --- cypress/e2e/pages/load_safe.pages.js | 25 ++++++++-- cypress/e2e/smoke/load_safe.cy.js | 43 +++++++++++------- cypress/fixtures/goerli_safe_QR.png | Bin 11927 -> 0 bytes cypress/fixtures/invalid_image_QR_test.png | Bin 0 -> 824 bytes cypress/fixtures/sepolia_test_safe_QR.png | Bin 0 -> 4333 bytes cypress/support/constants.js | 8 ++++ .../common/ScanQRModal/ScanQRButton.tsx | 2 +- .../load/steps/SetAddressStep/index.tsx | 8 +++- 8 files changed, 63 insertions(+), 23 deletions(-) delete mode 100644 cypress/fixtures/goerli_safe_QR.png create mode 100644 cypress/fixtures/invalid_image_QR_test.png create mode 100644 cypress/fixtures/sepolia_test_safe_QR.png diff --git a/cypress/e2e/pages/load_safe.pages.js b/cypress/e2e/pages/load_safe.pages.js index 488b343bc6..55992282e8 100644 --- a/cypress/e2e/pages/load_safe.pages.js +++ b/cypress/e2e/pages/load_safe.pages.js @@ -3,12 +3,15 @@ import * as constants from '../../support/constants' const addExistingAccountBtnStr = 'Add existing one' const contactStr = 'Name, address & network' const invalidAddressFormatErrorMsg = 'Invalid address format' +const invalidAddressNameLengthErrorMsg = 'Maximum 50 symbols' const safeDataForm = '[data-testid=load-safe-form]' const nameInput = 'input[name="name"]' const addressInput = 'input[name="address"]' -const sideBarIcon = '[data-testid=ChevronRightIcon]' -const sidebarCheckIcon = '[data-testid=CheckIcon]' +const sideBarIcon = '[data-testid="ChevronRightIcon"]' +const sidebarCheckIcon = '[data-testid="CheckIcon"]' +const addressStepNextBtn = '[data-testid="load-safe-next-btn"]' +const qrCodeBtn = '[data-testid="address-qr-scan"]' const nextBtnStr = 'Next' const addBtnStr = 'Add' const settingsBtnStr = 'Settings' @@ -52,13 +55,23 @@ export function verifyIncorrectAddressErrorMessage() { cy.get(addressInput).parent().prev('label').contains(invalidAddressFormatErrorMsg) } +export function verifyNameLengthErrorMessage() { + cy.get(nameInput).parent().prev('label').contains(invalidAddressNameLengthErrorMsg) +} + +export function ScanQRCode(image) { + cy.get('[data-testid="address-qr-scan"]').click() + cy.contains('Upload an image').click() + cy.get('[type="file"]').attachFile(image) +} + export function inputAddress(address) { cy.get(addressInput).clear().type(address) } -export function verifyAddressInputValue() { +export function verifyAddressInputValue(safeAddress) { // The address field should be filled with the "bare" QR code's address - const [, address] = constants.SEPOLIA_TEST_SAFE_1.split(':') + const [, address] = safeAddress.split(':') cy.get('input[name="address"]').should('have.value', address) } @@ -119,3 +132,7 @@ export function verifyTransactionSectionIsVisible() { export function verifyNumberOfTransactions(startNumber, endNumber) { cy.get(`span:contains("${startNumber} out of ${endNumber}")`).should('have.length', 1) } + +export function verifyNextButtonStatus(param) { + cy.get(addressStepNextBtn).should(param) +} diff --git a/cypress/e2e/smoke/load_safe.cy.js b/cypress/e2e/smoke/load_safe.cy.js index edce4b7f8b..f209abffea 100644 --- a/cypress/e2e/smoke/load_safe.cy.js +++ b/cypress/e2e/smoke/load_safe.cy.js @@ -42,26 +42,35 @@ describe('Load Safe tests', () => { safe.verifyIncorrectAddressErrorMessage() safe.inputNameAndAddress(testSafeName, constants.SEPOLIA_TEST_SAFE_1) - // Type an invalid address - // cy.get('input[name="address"]').clear().type(EOA_ADDRESS) - // cy.get('@addressLabel').contains(INVALID_ADDRESS_ERROR_MSG) - - // Type a ENS name - // TODO: register a goerli ENS name for the test Safe - // cy.get('input[name="address"]').clear().type(SAFE_ENS_NAME) - // giving time to the ENS name to be translated - // cy.get('input[name="address"]', { timeout: 10000 }).should('have.value', `rin:${SAFE_ENS_NAME_TRANSLATED}`) - - // Uploading a QR code - // TODO: fix this - // cy.findByTestId('QrCodeIcon').click() - // cy.contains('Upload an image').click() - // cy.get('[type="file"]').attachFile('../fixtures/goerli_safe_QR.png') - - safe.verifyAddressInputValue() + safe.verifyAddressInputValue(constants.SEPOLIA_TEST_SAFE_1) + safe.verifyNextButtonStatus('be.enabled') safe.clickOnNextBtn() }) + it('Verify names cannot have more than 50 chars', () => { + safe.inputName(main.generateRandomString(51)) + safe.verifyNameLengthErrorMessage() + }) + + it('Verify ENS name is translated to a valid address', () => { + safe.inputAddress(constants.ENS_TEST_ETH) + safe.verifyAddressInputValue(constants.ETH_ENS_SAFE_ADDRESS_7) + safe.verifyNextButtonStatus('be.enabled') + safe.clickOnNextBtn() + }) + + it('Verify a valid QR code is accepted', () => { + safe.ScanQRCode(constants.VALID_QR_CODE_PATH) + // safe.verifyAddressInputValue(constants.ETH_ENS_SAFE_ADDRESS_6) + // safe.verifyNextButtonStatus('be.enabled') + // safe.clickOnNextBtn() + }) + + it.only('Verify a non QR code is not accepted', () => { + safe.ScanQRCode(constants.INVALID_QR_CODE_PATH) + cy.contains('The QR could not be read') + }) + it('Verify custom name in the first owner an be set', () => { safe.inputNameAndAddress(testSafeName, constants.SEPOLIA_TEST_SAFE_1) safe.clickOnNextBtn() diff --git a/cypress/fixtures/goerli_safe_QR.png b/cypress/fixtures/goerli_safe_QR.png deleted file mode 100644 index 8db09e5771355334f5a9c432b9914eb4d2f39929..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11927 zcmZX41yq~Q(s!`p?iSo7IKj1Oad#_LED)@?TMM+f1b4Th#l3i;&{Eu?KyfMhrT5`Y=c)fKTZC@=s30JgG{yf*w<1}`;eFW}$v@osSd07ku| zoSdezoE)vDhntFi6q}lks;jd|5;fg*Kv%#-OUv{rf?kOwBxOeKWKuy1F@nHa zR?qGkl=Q^`iZS_ztR#Pb%J>1M_{~O3pD5l7;EU$KZ;+Km1X%N5tR1gV z1JtI3Cz+d{9`B#usEBt*U;>E3Acz|MYKphWe8X+@?#zJl#~6#?x1|nAAcj}O3@G#u zkfh|&x6Vm~rDXBBaj|F@(uUXo@z?=;76fTN>4#68t^|d0=kh;fM+wpJ6(o_;FE6ox z{YvJR5rZ*!x!>%W1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Nk*Jdap`E1|%uun>v<_2Fov zU_>|79s^D!fo61u;617FcH3v12jSgG7ZH-b!52~il39o}mAX%MTD0(+?}zfDd$(=9 zVMLB{g!uLPzdO}Kgyh%{LT!dHy9j_h2gFBbeGH6CL02;6&s?+(hxUIZRpEJD8QO<> z-#*&rV7-0+oy+b~cEk>;6V*jfU84Kc70|#m}g-BFIR4mwKg6rGk z(8*T?$adZTZW~1o*T((THiz2?OGDs{T_V}_w3V)$MV_qk=gaGk^()dsk28r z51G)IT9Yx`ZoZmrnk#jS z%lD_T$9%LsAMWpcl^5Q##{3;@`wi4k%_XY;jFlAmx~d#zGDE!jAqf17LgkR}5qvd{ Gl>2}50k8r9 literal 0 HcmV?d00001 diff --git a/cypress/support/constants.js b/cypress/support/constants.js index e9dce33964..8c7b8cc05b 100644 --- a/cypress/support/constants.js +++ b/cypress/support/constants.js @@ -10,6 +10,7 @@ export const SEPOLIA_TEST_SAFE_3 = 'sep:0x6E834E9D04ad6b26e1525dE1a37BFd9b215f40 export const SEPOLIA_TEST_SAFE_4 = 'sep:0x03042B890b99552b60A073F808100517fb148F60' export const SEPOLIA_TEST_SAFE_5 = 'sep:0xBd69b0a9DC90eB6F9bAc3E4a5875f437348b6415' export const SEPOLIA_TEST_SAFE_6 = 'sep:0x6d0b6F96f665Bb4490f9ddb2e450Da2f7e546dC1' +export const ETH_ENS_SAFE_ADDRESS_7 = 'eth:0x8675B754342754A30A2AeF474D114d8460bca19b' export const GNO_TEST_SAFE = 'gno:0xB8d760a90a5ed54D3c2b3EFC231277e99188642A' export const PAGINATION_TEST_SAFE = 'gor:0x850493a15914aAC05a821A3FAb973b4598889A7b' export const TEST_SAFE = 'gor:0x04f8b1EA3cBB315b87ced0E32deb5a43cC151a91' @@ -25,6 +26,9 @@ export const SIDEBAR_ADDRESS = '0x04f8...1a91' export const ENS_TEST_SEPOLIA = 'testenssepolia.eth' export const ENS_TEST_GOERLI = 'goerli-safe-test.eth' export const ENS_TEST_SEPOLIA_INVALID = 'ivladitestenssepolia.eth' +export const ENS_TEST_ETH = 'mainnetsafe.eth' +export const VALID_QR_CODE_PATH = '../fixtures/sepolia_test_safe_QR.png' //converts to SEPOLIA_TEST_SAFE_6 address +export const INVALID_QR_CODE_PATH = '../fixtures/invalid_image_QR_test.png' //A blank square export const BROWSER_PERMISSIONS_KEY = `${LS_NAMESPACE}SafeApps__browserPermissions` export const SAFE_PERMISSIONS_KEY = `${LS_NAMESPACE}SafeApps__safePermissions` @@ -152,3 +156,7 @@ export const localStorageKeys = { export const connectWalletNames = { e2e: 'E2E Wallet', } + +export const longNames = { + safeName: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit', +} diff --git a/src/components/common/ScanQRModal/ScanQRButton.tsx b/src/components/common/ScanQRModal/ScanQRButton.tsx index e960ae5691..97101607c9 100644 --- a/src/components/common/ScanQRModal/ScanQRButton.tsx +++ b/src/components/common/ScanQRModal/ScanQRButton.tsx @@ -29,7 +29,7 @@ const ScanQRButton = ({ onScan }: Props): ReactElement => { return ( <> - + diff --git a/src/components/new-safe/load/steps/SetAddressStep/index.tsx b/src/components/new-safe/load/steps/SetAddressStep/index.tsx index 89bfb3b9b6..cb91c1aead 100644 --- a/src/components/new-safe/load/steps/SetAddressStep/index.tsx +++ b/src/components/new-safe/load/steps/SetAddressStep/index.tsx @@ -157,7 +157,13 @@ const SetAddressStep = ({ data, onSubmit, onBack }: StepRenderProps}> Back -