mirror of
https://github.com/luxfi/safe-wallet.git
synced 2026-10-30 15:19:21 +00:00
* tests(e2e): update hidden tokens tests * tests(e2e): default tokens set up for nested safes tests * tests(e2e): update swap tokens tests * tests(e2e): update notifications and proposers tests * tests(e2e): new main function and small fixes * tests(e2e): add ls set up for nested safe creation tests * tests(e2e): fixComments * tests(e2e): fix for smoke test with image * tests(e2e): remove logo check * tests(e2e): fixe for the image * tests(e2e): update verifySummaryByName function * tests(e2e): update verifyTokenSymbol function to more general solution * tests(e2e): remove Perl from new endpoints test * tests(e2e): removed unused test and update hidentoken function * tests(e2e): update create tx functions and fix create_tx_2 test * tests(e2e): update selector for the logos * tests(e2e): update number of button and list of pages
76 lines
3.0 KiB
JavaScript
76 lines
3.0 KiB
JavaScript
import * as constants from '../../support/constants.js'
|
|
import * as owner from '../pages/owners.pages.js'
|
|
import { getSafes, CATEGORIES } from '../../support/safes/safesHandler.js'
|
|
import * as wallet from '../../support/utils/wallet.js'
|
|
import * as proposer from '../pages/proposers.pages.js'
|
|
import * as createtx from '../pages/create_tx.pages.js'
|
|
import * as tx from '../pages/transactions.page.js'
|
|
import * as assets from '../pages/assets.pages.js'
|
|
import { getMockAddress } from '../../support/utils/ethers.js'
|
|
|
|
let staticSafes = []
|
|
const walletCredentials = JSON.parse(Cypress.env('CYPRESS_WALLET_CREDENTIALS'))
|
|
const signer = walletCredentials.OWNER_4_PRIVATE_KEY
|
|
const signer2 = walletCredentials.OWNER_1_PRIVATE_KEY
|
|
const signer3 = walletCredentials.OWNER_3_PRIVATE_KEY
|
|
const proposerAddress = '0x8eeC...2a3b'
|
|
const proposerAddress_2 = '0x0972...9f35'
|
|
const sendValue = 0.000001
|
|
|
|
describe('Proposers 2 tests', () => {
|
|
before(async () => {
|
|
staticSafes = await getSafes(CATEGORIES.static)
|
|
})
|
|
|
|
it('Verify a proposers is capable of propose transactions', () => {
|
|
cy.visit(constants.BALANCE_URL + staticSafes.SEP_STATIC_SAFE_33)
|
|
assets.toggleHideDust(false)
|
|
wallet.connectSigner(signer2)
|
|
createtx.clickOnNewtransactionBtn()
|
|
createtx.clickOnSendTokensBtn()
|
|
createtx.typeRecipientAddress(getMockAddress())
|
|
createtx.setSendValue(sendValue)
|
|
createtx.clickOnNextBtn()
|
|
createtx.verifySubmitBtnIsEnabled()
|
|
})
|
|
|
|
it('Verify a proposers cannot confirm a transaction', () => {
|
|
cy.visit(constants.transactionQueueUrl + staticSafes.SEP_STATIC_SAFE_31)
|
|
wallet.connectSigner(signer2)
|
|
tx.verifyTxConfirmBtnDisabled()
|
|
})
|
|
|
|
it('Verify a proposer cannot edit himself', () => {
|
|
cy.visit(constants.setupUrl + staticSafes.SEP_STATIC_SAFE_31)
|
|
wallet.connectSigner(signer2)
|
|
proposer.verifyEditProposerBtnDisabled(proposerAddress)
|
|
})
|
|
|
|
it('Verify a proposer cannot edit or remove other proposers', () => {
|
|
cy.visit(constants.setupUrl + staticSafes.SEP_STATIC_SAFE_33)
|
|
wallet.connectSigner(signer2)
|
|
proposer.verifyEditProposerBtnDisabled(proposerAddress_2)
|
|
proposer.verifyDeleteProposerBtnIsDisabled(proposerAddress_2)
|
|
})
|
|
|
|
it('Verify that deleting a proposer is only possible by creator', () => {
|
|
cy.visit(constants.setupUrl + staticSafes.SEP_STATIC_SAFE_33)
|
|
wallet.connectSigner(signer3)
|
|
proposer.verifyEditProposerBtnDisabled(proposerAddress_2)
|
|
proposer.verifyDeleteProposerBtnIsDisabled(proposerAddress_2)
|
|
proposer.verifyEditProposerBtnDisabled(proposerAddress)
|
|
proposer.verifyDeleteProposerBtnIsDisabled(proposerAddress)
|
|
})
|
|
|
|
//TODO: Unskip when tenderly visibilty bug is solved
|
|
it.skip('Verify a Tenderly simulation can be performed while proposing a tx', () => {
|
|
cy.visit(constants.setupUrl + staticSafes.SEP_STATIC_SAFE_33)
|
|
wallet.connectSigner(signer2)
|
|
owner.openAddOwnerWindow()
|
|
owner.typeOwnerAddress(constants.SEPOLIA_OWNER_2)
|
|
owner.clickOnNextBtn()
|
|
createtx.clickOnSimulateTxBtn()
|
|
createtx.verifySuccessfulSimulation()
|
|
})
|
|
})
|