-
Notifications
You must be signed in to change notification settings - Fork 435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[E2E] Add Safe - qr code + ENS name + name validation #2820
Conversation
Branch preview✅ Deploy successful! https://load_test_fixes--walletweb.review-wallet-web.5afe.dev |
safe.clickOnNextBtn() | ||
}) | ||
|
||
it('Verify a valid QR code is accepted', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need some help here.
If I leave it commented this way then the ScanQRCode function runs just fine. But for some reason if I uncomment all those lines, the function ScanQRCode is ignored, the VerifyAddressInputValue function (that checks if the address in the input is valid) kicks in first and of course fails since the QR code was not uploaded. I don't know why this happens
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason for it is that ETH_ENS_SAFE_ADDRESS_6 does not exist it throws the error as undefined. To fix it add ETH_ENS_SAFE_ADDRESS_6 to constants.js. After this fix everything should work as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wrote the wrong name of the constant. Fixed. Thanks
ESLint Summary View Full Report
[failure] prettier/prettier
Report generated by eslint-plus-action |
📦 Next.js Bundle Analysis for safe-wallet-webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 🎉 Global Bundle Size Decreased
DetailsThe global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster. Any third party scripts you have added directly to your app using the If you want further insight into what is behind the changes, give @next/bundle-analyzer a try! Two Pages Changed SizeThe following pages changed size from the code in this PR compared to its base branch:
DetailsOnly the gzipped size is provided here based on an expert tip. First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If Any third party scripts you have added directly to your app using the Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. |
Coverage report
Test suite run success1096 tests passing in 153 suites. Report generated by 🧪jest coverage report action from 22cb3b6 |
cypress/e2e/pages/load_safe.pages.js
Outdated
cy.get(nameInput).parent().prev('label').contains(invalidAddressNameLengthErrorMsg) | ||
} | ||
|
||
export function ScanQRCode(image) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move locators to top of the document to follow established practise and reuse them in the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved them at the top
ESLint Summary View Full Report
Report generated by eslint-plus-action |
What it solves
Resolves #
Adds name validation for negative case
Adds ENS name validation
Adds QR code with valid and invalid file upload
How this PR fixes it
Name validation: inputs a name with 51 characters and checks the error
ENS name: Enters an ENS name and checks that it is translated to a valid safe address
QR code: Uploads a valid QR code with a sepolia safe and checks it is translated correctly
QR code invalid file: It uploads a blank square PNG and checks the error "The QR could not be read"
Notes
I had to add a data test id for the QR code button, but I wasn't able to find how to do it only in the add safe form, so it is in all address inputs accross the site. If it is a way to make it so only is in the Add safe form I'd like a suggestion on how to do it.
Checklist