-
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
Changes from 1 commit
23032bf
2b11616
1c2a243
1f53512
92ab6b4
abe72eb
7864234
b7f122d
d08545d
22cb3b6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,26 +42,35 @@ | |
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', () => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I need some help here. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. I wrote the wrong name of the constant. Fixed. Thanks |
||
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() | ||
|
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