-
Notifications
You must be signed in to change notification settings - Fork 476
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
431 additions
and
305 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
import 'cypress-file-upload' | ||
import * as constants from '../../support/constants.js' | ||
import * as addressBook from '../pages/address_book.page.js' | ||
import * as main from '../pages/main.page.js' | ||
import * as ls from '../../support/localstorage_data.js' | ||
import { getSafes, CATEGORIES } from '../../support/safes/safesHandler.js' | ||
import * as wallet from '../../support/utils/wallet.js' | ||
|
||
let staticSafes = [] | ||
|
||
const NAME = 'Owner1' | ||
const NAME_2 = 'Owner2' | ||
const EDITED_NAME = 'Edited Owner1' | ||
const duplicateEntry = 'test-sepolia-90' | ||
const owner1 = 'Automation owner' | ||
const walletCredentials = JSON.parse(Cypress.env('CYPRESS_WALLET_CREDENTIALS')) | ||
const signer = walletCredentials.OWNER_4_PRIVATE_KEY | ||
const recipientData = [owner1, constants.DEFAULT_OWNER_ADDRESS] | ||
|
||
describe('Address book tests - 3', () => { | ||
before(async () => { | ||
staticSafes = await getSafes(CATEGORIES.static) | ||
}) | ||
|
||
beforeEach(() => { | ||
cy.visit(constants.addressBookUrl + staticSafes.SEP_STATIC_SAFE_4) | ||
}) | ||
|
||
it('Verify entry can be added', () => { | ||
addressBook.clickOnCreateEntryBtn() | ||
addressBook.addEntry(NAME, constants.RECIPIENT_ADDRESS) | ||
}) | ||
|
||
it('Verify entry can be deleted', () => { | ||
cy.wrap(null) | ||
.then(() => | ||
main.addToLocalStorage(constants.localStorageKeys.SAFE_v2__addressBook, ls.addressBookData.sepoliaAddress1), | ||
) | ||
.then(() => | ||
main.isItemInLocalstorage(constants.localStorageKeys.SAFE_v2__addressBook, ls.addressBookData.sepoliaAddress1), | ||
) | ||
.then(() => { | ||
cy.reload() | ||
addressBook.clickDeleteEntryButton() | ||
addressBook.clickDeleteEntryModalDeleteButton() | ||
addressBook.verifyEditedNameNotExists(EDITED_NAME) | ||
}) | ||
}) | ||
|
||
it('Verify csv file can be imported', () => { | ||
addressBook.clickOnImportFileBtn() | ||
addressBook.importCSVFile(addressBook.validCSVFile) | ||
addressBook.verifyImportBtnStatus(constants.enabledStates.enabled) | ||
addressBook.clickOnImportBtn() | ||
addressBook.verifyDataImported(addressBook.entries) | ||
addressBook.verifyNumberOfRows(4) | ||
}) | ||
|
||
it('Import a csv file with an empty address/name/network in one row', () => { | ||
addressBook.clickOnImportFileBtn() | ||
addressBook.importCSVFile(addressBook.emptyCSVFile) | ||
addressBook.verifyImportBtnStatus(constants.enabledStates.disabled) | ||
addressBook.verifyUploadExportMessage([addressBook.uploadErrorMessages.emptyFile]) | ||
}) | ||
|
||
it('Import a non-csv file', () => { | ||
addressBook.clickOnImportFileBtn() | ||
addressBook.importCSVFile(addressBook.nonCSVFile) | ||
addressBook.verifyImportBtnStatus(constants.enabledStates.disabled) | ||
addressBook.verifyUploadExportMessage([addressBook.uploadErrorMessages.fileType]) | ||
}) | ||
|
||
it('Import a csv file with a repeated address and same network', () => { | ||
addressBook.clickOnImportFileBtn() | ||
addressBook.importCSVFile(addressBook.duplicatedCSVFile) | ||
addressBook.verifyImportBtnStatus(constants.enabledStates.enabled) | ||
addressBook.clickOnImportBtn() | ||
addressBook.verifyDataImported([duplicateEntry]) | ||
addressBook.verifyNumberOfRows(1) | ||
}) | ||
|
||
it('Verify modal shows the amount of entries and networks detected', () => { | ||
addressBook.clickOnImportFileBtn() | ||
addressBook.importCSVFile(addressBook.networksCSVFile) | ||
addressBook.verifyImportBtnStatus(constants.enabledStates.enabled) | ||
addressBook.verifyModalSummaryMessage(4, 3) | ||
}) | ||
|
||
it('Verify an entry can be added by ENS name', () => { | ||
addressBook.clickOnCreateEntryBtn() | ||
addressBook.addEntryByENS(NAME_2, constants.ENS_TEST_SEPOLIA) | ||
}) | ||
|
||
it('Verify clicking on Send button autofills the recipient filed with correct value', () => { | ||
main.addToLocalStorage(constants.localStorageKeys.SAFE_v2__addressBook, ls.addressBookData.sepoliaAddress2) | ||
cy.wait(1000) | ||
cy.reload() | ||
wallet.connectSigner(signer) | ||
addressBook.clickOnSendBtn() | ||
addressBook.verifyRecipientData(recipientData) | ||
}) | ||
}) |
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,48 @@ | ||
import * as constants from '../../support/constants' | ||
import * as assets from '../pages/assets.pages' | ||
import { getSafes, CATEGORIES } from '../../support/safes/safesHandler.js' | ||
import * as wallet from '../../support/utils/wallet.js' | ||
import * as main from '../pages/main.page' | ||
|
||
let staticSafes = [] | ||
|
||
const walletCredentials = JSON.parse(Cypress.env('CYPRESS_WALLET_CREDENTIALS')) | ||
const signer = walletCredentials.OWNER_4_PRIVATE_KEY | ||
|
||
describe('Assets tests', () => { | ||
before(async () => { | ||
staticSafes = await getSafes(CATEGORIES.static) | ||
}) | ||
|
||
beforeEach(() => { | ||
cy.visit(constants.BALANCE_URL + staticSafes.SEP_STATIC_SAFE_2) | ||
}) | ||
|
||
it('Verify that "Hide token" button is present and opens the "Hide tokens menu"', () => { | ||
assets.selectTokenList(assets.tokenListOptions.allTokens) | ||
assets.openHideTokenMenu() | ||
assets.verifyEachRowHasCheckbox() | ||
}) | ||
|
||
it('Verify that clicking the button with an owner opens the Send funds form', () => { | ||
wallet.connectSigner(signer) | ||
assets.selectTokenList(assets.tokenListOptions.allTokens) | ||
assets.clickOnSendBtn(0) | ||
}) | ||
|
||
it('[SMOKE] Verify that Token list dropdown down options show/hide spam tokens', () => { | ||
let spamTokens = [ | ||
assets.currencyAave, | ||
assets.currencyTestTokenA, | ||
assets.currencyTestTokenB, | ||
assets.currencyUSDC, | ||
assets.currencyLink, | ||
assets.currencyDaiCap, | ||
] | ||
|
||
main.verifyValuesDoNotExist(assets.tokenListTable, spamTokens) | ||
assets.selectTokenList(assets.tokenListOptions.allTokens) | ||
spamTokens.push(constants.tokenNames.sepoliaEther) | ||
main.verifyValuesExist(assets.tokenListTable, spamTokens) | ||
}) | ||
}) |
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,39 @@ | ||
import * as constants from '../../support/constants' | ||
import * as dashboard from '../pages/dashboard.pages' | ||
import * as safeapps from '../pages/safeapps.pages' | ||
import * as createTx from '../pages/create_tx.pages' | ||
import { getSafes, CATEGORIES } from '../../support/safes/safesHandler.js' | ||
|
||
let staticSafes = [] | ||
|
||
const txData = ['14', 'Send', '-0.00002 ETH', '1 out of 1'] | ||
|
||
describe('Dashboard tests', { defaultCommandTimeout: 20000 }, () => { | ||
before(async () => { | ||
staticSafes = await getSafes(CATEGORIES.static) | ||
}) | ||
|
||
beforeEach(() => { | ||
cy.visit(constants.homeUrl + staticSafes.SEP_STATIC_SAFE_2) | ||
}) | ||
|
||
it('Verify that pinned in dashboard, an app keeps its status on apps page', () => { | ||
dashboard.pinAppByIndex(0).then((pinnedApp) => { | ||
cy.visit(constants.appsUrlGeneral + staticSafes.SEP_STATIC_SAFE_2) | ||
safeapps.verifyPinnedApp(pinnedApp) | ||
cy.visit(constants.homeUrl + staticSafes.SEP_STATIC_SAFE_2) | ||
dashboard.clickOnPinBtnByName(pinnedApp) | ||
dashboard.verifyPinnedAppsCount(0) | ||
}) | ||
}) | ||
|
||
it('Verify clicking on View All button directs to list of all queued txs', () => { | ||
dashboard.clickOnViewAllBtn() | ||
createTx.verifyNumberOfTransactions(2) | ||
}) | ||
|
||
it('Verify clicking on any tx takes the user to Transactions > Queue tab', () => { | ||
dashboard.clickOnTxByIndex(0) | ||
dashboard.verifySingleTxItem(txData) | ||
}) | ||
}) |
Oops, something went wrong.