From 8bca74a9294fb9e3de73604c8c6805e3afc92a8d Mon Sep 17 00:00:00 2001 From: Antonio Morrone Date: Wed, 8 Mar 2023 10:42:47 +0100 Subject: [PATCH] PP-729: add id/class to html elements to simplify test automation (#61) * fix: add id/class to html elements to simplify test automation * fix: run prettier for ts/tsx staged files --- package.json | 2 +- src/modals/Deploy.tsx | 11 ++++++++++- src/modals/Execute.tsx | 20 +++++++++++++++++--- src/modals/Transfer.tsx | 16 ++++++++++++++-- src/modals/Validate.tsx | 9 ++++++++- 5 files changed, 50 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 07d830b..7da4074 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,7 @@ }, "lint-staged": { "*.{ts,tsx}": "eslint --cache --fix", - "*.{js,css,md}": "prettier --write", + "*.{ts,tsx, js,css,md}": "prettier --write", "package.json": "npx sort-package-json" }, "browserslist": { diff --git a/src/modals/Deploy.tsx b/src/modals/Deploy.tsx index ad7584e..c5f420b 100644 --- a/src/modals/Deploy.tsx +++ b/src/modals/Deploy.tsx @@ -169,6 +169,7 @@ function Deploy() { waves='green' onClick={handleDeploySmartWalletButtonClick} disabled={deployLoading} + className='deploy-btn-deploy' > Deploy @@ -179,11 +180,18 @@ function Deploy() { waves='green' onClick={handleEstimateDeploySmartWalletButtonClick} disabled={estimateLoading} + className='deploy-btn-estimate' > Estimate , - , ]; @@ -209,6 +217,7 @@ function Deploy() { onChange={(event) => { changeValue(event.target.value, 'fees'); }} + id='deploy-input-fee' /> diff --git a/src/modals/Execute.tsx b/src/modals/Execute.tsx index 46b0224..53c52f2 100644 --- a/src/modals/Execute.tsx +++ b/src/modals/Execute.tsx @@ -230,6 +230,7 @@ function Execute() { waves='green' onClick={handleExecuteSmartWalletButtonClick} disabled={executeLoading} + className='execute-btn-execute' > Execute @@ -240,11 +241,18 @@ function Execute() { waves='green' onClick={handleEstimateSmartWalletButtonClick} disabled={estimateLoading} + className='execute-btn-estimate' > Estimate , - , ]; @@ -268,13 +276,14 @@ function Execute() { onChange={(event) => { changeValue(event.currentTarget.value, 'address'); }} + id='execute-input-address' /> , - , ]; @@ -234,13 +242,14 @@ function Transfer() { onChange={(event) => { changeValue(event.currentTarget.value, 'address'); }} + id='transfer-input-to' /> , - , ];