-
Notifications
You must be signed in to change notification settings - Fork 465
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more tx history tests
- Loading branch information
Showing
8 changed files
with
285 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,168 @@ | ||
import * as constants from '../../support/constants' | ||
import * as main from '../pages/main.page' | ||
import * as createTx from '../pages/create_tx.pages' | ||
import * as data from '../../fixtures/txhistory_data_data.json' | ||
|
||
const batchTx = 13 | ||
const thresholdTx = 0 | ||
|
||
const typeOnchainRejection = data.type.onchainRejection | ||
const typeBatch = data.type.batchNativeTransfer | ||
const typeAddOwner = data.type.addOwner | ||
const typeChangeOwner = data.type.swapOwner | ||
const typeRemoveOwner = data.type.removeOwner | ||
const typeDisableOwner = data.type.disableModule | ||
const typeChangeThreshold = data.type.changeThreshold | ||
const typeSideActions = data.type.sideActions | ||
const typeGeneral = data.type.general | ||
|
||
describe('Tx history tests 2', () => { | ||
beforeEach(() => { | ||
cy.clearLocalStorage() | ||
cy.visit(constants.transactionsHistoryUrl + constants.SEPOLIA_TEST_SAFE_8) | ||
main.acceptCookies() | ||
}) | ||
|
||
it('Verify number of transactions is correct', () => { | ||
createTx.verifyNumberOfTransactions(20) | ||
}) | ||
|
||
// On-chain rejection | ||
it('Verify summary for on-chain rejection', () => { | ||
createTx.verifySummaryByName(typeOnchainRejection.title, [typeGeneral.statusOk], typeOnchainRejection.altImage) | ||
}) | ||
|
||
it('Verify exapanded details for on-chain rejection', () => { | ||
createTx.clickOnTransactionItemByName(typeOnchainRejection.title) | ||
createTx.verifyExpandedDetails([ | ||
typeOnchainRejection.description, | ||
typeOnchainRejection.transactionHash, | ||
typeOnchainRejection.safeTxHash, | ||
]) | ||
createTx.verifyActionListExists([ | ||
typeSideActions.rejectionCreated, | ||
typeSideActions.confirmations, | ||
typeSideActions.executedBy, | ||
]) | ||
}) | ||
|
||
// Batch transaction | ||
it('Verify summary for batch', () => { | ||
createTx.verifySummaryByIndex( | ||
batchTx, | ||
[typeBatch.title, typeBatch.summaryTxInfo, typeGeneral.statusOk], | ||
typeBatch.altImage, | ||
typeBatch.altToken, | ||
) | ||
}) | ||
|
||
it('Verify exapanded details for batch', () => { | ||
createTx.clickOnTransactionItemByIndex(batchTx) | ||
createTx.verifyExpandedDetails( | ||
[ | ||
typeBatch.description, | ||
typeBatch.contractTitle, | ||
typeBatch.contractAddress, | ||
typeBatch.transactionHash, | ||
typeBatch.safeTxHash, | ||
], | ||
createTx.delegateCallWarning, | ||
) | ||
createTx.verifyActions([typeBatch.nativeTransfer.title]) | ||
}) | ||
|
||
// Add owner | ||
it('Verify summary for adding owner', () => { | ||
createTx.verifySummaryByName(typeAddOwner.title, [typeGeneral.statusOk], typeAddOwner.altImage) | ||
}) | ||
|
||
it('Verify exapanded details for adding owner', () => { | ||
createTx.clickOnTransactionItemByName(typeAddOwner.title) | ||
createTx.verifyExpandedDetails( | ||
[ | ||
typeAddOwner.description, | ||
typeAddOwner.requiredConfirmationsTitle, | ||
typeAddOwner.ownerAddress, | ||
typeAddOwner.transactionHash, | ||
typeAddOwner.safeTxHash, | ||
], | ||
createTx.policyChangeWarning, | ||
) | ||
}) | ||
|
||
// Change owner | ||
it('Verify summary for changing owner', () => { | ||
createTx.verifySummaryByName(typeChangeOwner.title, [typeGeneral.statusOk], typeChangeOwner.altImage) | ||
}) | ||
|
||
it('Verify exapanded details for changing owner', () => { | ||
createTx.clickOnTransactionItemByName(typeChangeOwner.title) | ||
createTx.verifyExpandedDetails([ | ||
typeChangeOwner.description, | ||
typeChangeOwner.newOwner.actionTitile, | ||
typeChangeOwner.newOwner.ownerAddress, | ||
typeChangeOwner.oldOwner.actionTitile, | ||
typeChangeOwner.oldOwner.ownerAddress, | ||
|
||
typeChangeOwner.transactionHash, | ||
typeChangeOwner.safeTxHash, | ||
]) | ||
}) | ||
|
||
// Remove owner | ||
it('Verify summary for removing owner', () => { | ||
createTx.verifySummaryByName(typeRemoveOwner.title, [typeGeneral.statusOk], typeRemoveOwner.altImage) | ||
}) | ||
|
||
it('Verify exapanded details for removing owner', () => { | ||
createTx.clickOnTransactionItemByName(typeRemoveOwner.title) | ||
createTx.verifyExpandedDetails( | ||
[ | ||
typeRemoveOwner.description, | ||
typeRemoveOwner.requiredConfirmationsTitle, | ||
typeRemoveOwner.ownerAddress, | ||
typeRemoveOwner.transactionHash, | ||
typeRemoveOwner.safeTxHash, | ||
], | ||
createTx.policyChangeWarning, | ||
) | ||
createTx.checkRequiredThreshold(1) | ||
}) | ||
|
||
// Disbale module | ||
it('Verify summary for disable module', () => { | ||
createTx.verifySummaryByName(typeDisableOwner.title, [typeGeneral.statusOk], typeDisableOwner.altImage) | ||
}) | ||
|
||
it('Verify exapanded details for disable module', () => { | ||
createTx.clickOnTransactionItemByName(typeDisableOwner.title) | ||
createTx.verifyExpandedDetails([ | ||
typeDisableOwner.description, | ||
typeDisableOwner.address, | ||
typeDisableOwner.transactionHash, | ||
typeDisableOwner.safeTxHash, | ||
]) | ||
}) | ||
|
||
// Change threshold | ||
it('Verify summary for changing threshold', () => { | ||
createTx.verifySummaryByIndex( | ||
thresholdTx, | ||
[typeChangeThreshold.title, typeGeneral.statusOk], | ||
typeChangeThreshold.altImage, | ||
) | ||
}) | ||
|
||
it('Verify exapanded details for changing threshold', () => { | ||
createTx.clickOnTransactionItemByIndex(thresholdTx) | ||
createTx.verifyExpandedDetails( | ||
[ | ||
typeChangeThreshold.requiredConfirmationsTitle, | ||
typeChangeThreshold.transactionHash, | ||
typeChangeThreshold.safeTxHash, | ||
], | ||
createTx.policyChangeWarning, | ||
) | ||
createTx.checkRequiredThreshold(2) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.