diff --git a/cypress/e2e/pages/main.page.js b/cypress/e2e/pages/main.page.js index 18c4a546aa..0288673d58 100644 --- a/cypress/e2e/pages/main.page.js +++ b/cypress/e2e/pages/main.page.js @@ -19,7 +19,7 @@ export function clickOnSideMenuItem(item) { export function waitForHistoryCallToComplete() { cy.intercept('GET', constants.transactionHistoryEndpoint).as('History') - cy.wait('@History') + cy.wait('@History', { timeout: 20000 }) } export const fetchSafeData = (safeAddress) => { diff --git a/cypress/e2e/prodhealthcheck/add_owner.cy.js b/cypress/e2e/prodhealthcheck/add_owner.cy.js index 636ba0ed65..539ecc8ce6 100644 --- a/cypress/e2e/prodhealthcheck/add_owner.cy.js +++ b/cypress/e2e/prodhealthcheck/add_owner.cy.js @@ -15,8 +15,6 @@ describe('[PROD] Add Owners tests', () => { beforeEach(() => { cy.visit(constants.prodbaseUrl + constants.setupUrl + staticSafes.SEP_STATIC_SAFE_4) - cy.clearLocalStorage() - main.acceptCookies() cy.contains(owner.safeAccountNonceStr, { timeout: 10000 }) }) diff --git a/cypress/e2e/prodhealthcheck/create_tx.cy.js b/cypress/e2e/prodhealthcheck/create_tx.cy.js index d28755c251..9f3df5161b 100644 --- a/cypress/e2e/prodhealthcheck/create_tx.cy.js +++ b/cypress/e2e/prodhealthcheck/create_tx.cy.js @@ -24,9 +24,7 @@ describe.skip('[PROD] Create transactions tests', () => { }) beforeEach(() => { - cy.clearLocalStorage() cy.visit(constants.prodbaseUrl + constants.BALANCE_URL + staticSafes.SEP_STATIC_SAFE_6) - main.acceptCookies() wallet.connectSigner(signer) createtx.clickOnNewtransactionBtn() createtx.clickOnSendTokensBtn() diff --git a/cypress/e2e/prodhealthcheck/load_safe.cy.js b/cypress/e2e/prodhealthcheck/load_safe.cy.js index a04a88c235..8d1e630c36 100644 --- a/cypress/e2e/prodhealthcheck/load_safe.cy.js +++ b/cypress/e2e/prodhealthcheck/load_safe.cy.js @@ -27,9 +27,7 @@ describe('[PROD] Load Safe tests', () => { }) beforeEach(() => { - cy.clearLocalStorage() cy.visit(constants.prodbaseUrl + constants.loadNewSafeSepoliaUrl) - main.acceptCookies() cy.wait(2000) }) diff --git a/cypress/e2e/prodhealthcheck/messages_onchain.cy.js b/cypress/e2e/prodhealthcheck/messages_onchain.cy.js index 221036d5b5..5b4f0928cd 100644 --- a/cypress/e2e/prodhealthcheck/messages_onchain.cy.js +++ b/cypress/e2e/prodhealthcheck/messages_onchain.cy.js @@ -14,9 +14,7 @@ describe('[PROD] Onchain Messages tests', () => { }) beforeEach(() => { - cy.clearLocalStorage() cy.visit(constants.prodbaseUrl + constants.transactionsHistoryUrl + staticSafes.SEP_STATIC_SAFE_10) - main.acceptCookies() }) // TODO: Added to prod diff --git a/cypress/e2e/prodhealthcheck/nfts.cy.js b/cypress/e2e/prodhealthcheck/nfts.cy.js index da80bca2ae..dcc484f396 100644 --- a/cypress/e2e/prodhealthcheck/nfts.cy.js +++ b/cypress/e2e/prodhealthcheck/nfts.cy.js @@ -29,9 +29,7 @@ describe.skip('[PROD] NFTs tests', () => { }) beforeEach(() => { - cy.clearLocalStorage() cy.visit(constants.prodbaseUrl + constants.balanceNftsUrl + staticSafes.SEP_STATIC_SAFE_2) - main.acceptCookies() wallet.connectSigner(signer) nfts.waitForNftItems(2) }) diff --git a/cypress/e2e/prodhealthcheck/remove_owner.cy.js b/cypress/e2e/prodhealthcheck/remove_owner.cy.js index 4c888a993b..755f320db1 100644 --- a/cypress/e2e/prodhealthcheck/remove_owner.cy.js +++ b/cypress/e2e/prodhealthcheck/remove_owner.cy.js @@ -18,8 +18,6 @@ describe('[PROD] Remove Owners tests', () => { beforeEach(() => { cy.visit(constants.prodbaseUrl + constants.setupUrl + staticSafes.SEP_STATIC_SAFE_13) main.waitForHistoryCallToComplete() - cy.clearLocalStorage() - main.acceptCookies() cy.contains(owner.safeAccountNonceStr, { timeout: 10000 }) }) diff --git a/cypress/e2e/prodhealthcheck/sidebar.cy.js b/cypress/e2e/prodhealthcheck/sidebar.cy.js index 9eafb95451..edb534286f 100644 --- a/cypress/e2e/prodhealthcheck/sidebar.cy.js +++ b/cypress/e2e/prodhealthcheck/sidebar.cy.js @@ -16,8 +16,6 @@ describe('[PROD] Sidebar tests', () => { beforeEach(() => { cy.visit(constants.prodbaseUrl + constants.homeUrl + staticSafes.SEP_STATIC_SAFE_9) - cy.clearLocalStorage() - main.acceptCookies() }) // TODO: Added to prod diff --git a/cypress/e2e/prodhealthcheck/sidebar_3.cy.js b/cypress/e2e/prodhealthcheck/sidebar_3.cy.js index f5af8a1d01..218d5f747d 100644 --- a/cypress/e2e/prodhealthcheck/sidebar_3.cy.js +++ b/cypress/e2e/prodhealthcheck/sidebar_3.cy.js @@ -17,14 +17,9 @@ describe.skip('[PROD] Sidebar tests 3', () => { staticSafes = await getSafes(CATEGORIES.static) }) - beforeEach(() => { - cy.clearLocalStorage() - }) - // TODO: Added to prod it('Verify the "My accounts" counter at the top is counting all safes the user owns', () => { cy.visit(constants.prodbaseUrl + constants.BALANCE_URL + staticSafes.SEP_STATIC_SAFE_9) - main.acceptCookies() cy.intercept('GET', constants.safeListEndpoint, { 11155111: [sideBar.sideBarSafes.safe1, sideBar.sideBarSafes.safe2], }) @@ -36,16 +31,13 @@ describe.skip('[PROD] Sidebar tests 3', () => { // TODO: Added to prod it('Verify pending signature is displayed in sidebar for unsigned tx', () => { cy.visit(constants.prodbaseUrl + constants.BALANCE_URL + staticSafes.SEP_STATIC_SAFE_7) - main.acceptCookies() wallet.connectSigner(signer) cy.intercept('GET', constants.safeListEndpoint, { 11155111: [sideBar.sideBarSafesPendingActions.safe1], }) sideBar.openSidebar() sideBar.verifyTxToConfirmDoesNotExist() - cy.get('body').click() - owner.clickOnWalletExpandMoreIcon() navigation.clickOnDisconnectBtn() cy.intercept('GET', constants.safeListEndpoint, { @@ -60,7 +52,6 @@ describe.skip('[PROD] Sidebar tests 3', () => { // TODO: Added to prod it('Verify balance exists in a tx in sidebar', () => { cy.visit(constants.prodbaseUrl + constants.BALANCE_URL + staticSafes.SEP_STATIC_SAFE_7) - main.acceptCookies() wallet.connectSigner(signer) owner.clickOnWalletExpandMoreIcon() navigation.clickOnDisconnectBtn() diff --git a/cypress/e2e/prodhealthcheck/spending_limits.cy.js b/cypress/e2e/prodhealthcheck/spending_limits.cy.js index 5c25c2386f..e1f663f6db 100644 --- a/cypress/e2e/prodhealthcheck/spending_limits.cy.js +++ b/cypress/e2e/prodhealthcheck/spending_limits.cy.js @@ -22,8 +22,6 @@ describe('[PROD] Spending limits tests', () => { beforeEach(() => { cy.visit(constants.prodbaseUrl + constants.setupUrl + staticSafes.SEP_STATIC_SAFE_8) - cy.clearLocalStorage() - main.acceptCookies() cy.get(spendinglimit.spendingLimitsSection).should('be.visible') }) diff --git a/cypress/e2e/prodhealthcheck/swaps_history_2.cy.js b/cypress/e2e/prodhealthcheck/swaps_history_2.cy.js index aef8ec2253..96f76e9f42 100644 --- a/cypress/e2e/prodhealthcheck/swaps_history_2.cy.js +++ b/cypress/e2e/prodhealthcheck/swaps_history_2.cy.js @@ -14,17 +14,11 @@ describe('[PROD] Swaps history tests 2', () => { staticSafes = await getSafes(CATEGORIES.static) }) - beforeEach(() => { - cy.clearLocalStorage() - }) - // TODO: Added to prod it('Verify swap buy operation with 2 actions: approve & swap', { defaultCommandTimeout: 30000 }, () => { cy.visit( constants.prodbaseUrl + constants.transactionUrl + staticSafes.SEP_STATIC_SAFE_1 + swaps.swapTxs.buy2actions, ) - main.acceptCookies() - const eq = swaps.createRegex(swapsHistory.oneGNOFull, 'COW') const atMost = swaps.createRegex(swapsHistory.forAtMostCow, 'COW') @@ -52,7 +46,6 @@ describe('[PROD] Swaps history tests 2', () => { staticSafes.SEP_STATIC_SAFE_1 + swaps.swapTxs.safeAppSwapOrder, ) - main.acceptCookies() main.verifyValuesDoNotExist('div', [ swapsHistory.actionApproveG, swapsHistory.actionDepositG, diff --git a/cypress/e2e/prodhealthcheck/swaps_tokens.cy.js b/cypress/e2e/prodhealthcheck/swaps_tokens.cy.js index 3762501087..acc2f9a5fa 100644 --- a/cypress/e2e/prodhealthcheck/swaps_tokens.cy.js +++ b/cypress/e2e/prodhealthcheck/swaps_tokens.cy.js @@ -17,9 +17,7 @@ describe('[PROD] Swaps token tests', () => { }) beforeEach(() => { - cy.clearLocalStorage() cy.visit(constants.prodbaseUrl + constants.BALANCE_URL + staticSafes.SEP_STATIC_SAFE_1) - main.acceptCookies() }) // TODO: Added to prod diff --git a/cypress/e2e/prodhealthcheck/tokens.cy.js b/cypress/e2e/prodhealthcheck/tokens.cy.js index ed585c51ed..14b18ab68d 100644 --- a/cypress/e2e/prodhealthcheck/tokens.cy.js +++ b/cypress/e2e/prodhealthcheck/tokens.cy.js @@ -17,8 +17,6 @@ describe('[PROD] Prod tokens tests', () => { }) beforeEach(() => { cy.visit(constants.prodbaseUrl + constants.BALANCE_URL + staticSafes.SEP_STATIC_SAFE_2) - cy.clearLocalStorage() - main.acceptCookies() }) // TODO: Added to prod diff --git a/cypress/e2e/prodhealthcheck/tx_history.cy.js b/cypress/e2e/prodhealthcheck/tx_history.cy.js index 2f22b4bd6d..25bef3d1c3 100644 --- a/cypress/e2e/prodhealthcheck/tx_history.cy.js +++ b/cypress/e2e/prodhealthcheck/tx_history.cy.js @@ -20,7 +20,6 @@ describe('[PROD] Tx history tests 1', () => { }) beforeEach(() => { - cy.clearLocalStorage() cy.intercept( 'GET', `**${constants.stagingCGWChains}${constants.networkKeys.sepolia}/${ @@ -34,7 +33,6 @@ describe('[PROD] Tx history tests 1', () => { cy.visit(constants.prodbaseUrl + constants.transactionsHistoryUrl + staticSafes.SEP_STATIC_SAFE_7) cy.wait('@allTransactions') - main.acceptCookies() }) // TODO: Added to prod diff --git a/cypress/e2e/prodhealthcheck/tx_history_2.cy.js b/cypress/e2e/prodhealthcheck/tx_history_2.cy.js index 691fc91324..2532190e3f 100644 --- a/cypress/e2e/prodhealthcheck/tx_history_2.cy.js +++ b/cypress/e2e/prodhealthcheck/tx_history_2.cy.js @@ -23,7 +23,6 @@ describe('[PROD] Tx history tests 2', () => { }) beforeEach(() => { - cy.clearLocalStorage() cy.intercept( 'GET', `**${constants.stagingCGWChains}${constants.networkKeys.sepolia}/${ @@ -36,7 +35,6 @@ describe('[PROD] Tx history tests 2', () => { ).as('allTransactions') cy.visit(constants.prodbaseUrl + constants.transactionsHistoryUrl + staticSafes.SEP_STATIC_SAFE_7) - main.acceptCookies() }) it('Verify number of transactions is correct', () => { diff --git a/cypress/e2e/regression/add_owner.cy.js b/cypress/e2e/regression/add_owner.cy.js index be042cf6d3..3bd525cfcf 100644 --- a/cypress/e2e/regression/add_owner.cy.js +++ b/cypress/e2e/regression/add_owner.cy.js @@ -20,8 +20,6 @@ describe('Add Owners tests', () => { beforeEach(() => { cy.visit(constants.setupUrl + staticSafes.SEP_STATIC_SAFE_4) - cy.clearLocalStorage() - main.acceptCookies() cy.contains(owner.safeAccountNonceStr, { timeout: 10000 }) }) diff --git a/cypress/e2e/regression/address_book.cy.js b/cypress/e2e/regression/address_book.cy.js index a7b9e4df6f..16d37bcb33 100644 --- a/cypress/e2e/regression/address_book.cy.js +++ b/cypress/e2e/regression/address_book.cy.js @@ -24,8 +24,6 @@ describe('Address book tests', () => { beforeEach(() => { cy.visit(constants.addressBookUrl + staticSafes.SEP_STATIC_SAFE_4) - cy.clearLocalStorage() - main.acceptCookies() }) it('Verify owners name can be edited', () => { diff --git a/cypress/e2e/regression/address_book_2.cy.js b/cypress/e2e/regression/address_book_2.cy.js index 2ebfff4ad2..39859b85f1 100644 --- a/cypress/e2e/regression/address_book_2.cy.js +++ b/cypress/e2e/regression/address_book_2.cy.js @@ -21,9 +21,6 @@ describe('Address book tests - 2', () => { beforeEach(() => { cy.visit(constants.addressBookUrl + staticSafes.SEP_STATIC_SAFE_4) - cy.clearLocalStorage() - cy.wait(1000) - main.acceptCookies() }) it('Verify Name and Address columns sorting works', () => { diff --git a/cypress/e2e/regression/balances_pagination.cy.js b/cypress/e2e/regression/balances_pagination.cy.js index b110310b9c..8b81050e73 100644 --- a/cypress/e2e/regression/balances_pagination.cy.js +++ b/cypress/e2e/regression/balances_pagination.cy.js @@ -6,9 +6,7 @@ const ASSETS_LENGTH = 8 describe('Balance pagination tests', () => { before(() => { - cy.clearLocalStorage() cy.visit(constants.BALANCE_URL + constants.SEPOLIA_TEST_SAFE_6) - main.acceptCookies() assets.selectTokenList(assets.tokenListOptions.allTokens) }) diff --git a/cypress/e2e/regression/batch_tx.cy.js b/cypress/e2e/regression/batch_tx.cy.js index 4b9e68ca70..b8f1c5d3f8 100644 --- a/cypress/e2e/regression/batch_tx.cy.js +++ b/cypress/e2e/regression/batch_tx.cy.js @@ -22,11 +22,9 @@ describe('Batch transaction tests', () => { }) beforeEach(() => { - cy.clearLocalStorage() cy.visit(constants.BALANCE_URL + staticSafes.SEP_STATIC_SAFE_2) wallet.connectSigner(signer) owner.waitForConnectionStatus() - main.acceptCookies() }) it('Verify the Add batch button is present in a transaction form', () => { diff --git a/cypress/e2e/regression/bulk_execution.cy.js b/cypress/e2e/regression/bulk_execution.cy.js index 272f4dd3de..c48467aab5 100644 --- a/cypress/e2e/regression/bulk_execution.cy.js +++ b/cypress/e2e/regression/bulk_execution.cy.js @@ -24,10 +24,6 @@ describe('Bulk execution', () => { }) }) - beforeEach(() => { - cy.clearLocalStorage() - }) - it('Verify that Bulk Execution is available for a few fully signed txs located one by one', () => { cy.visit(constants.transactionQueueUrl + fundsSafes.SEP_FUNDS_SAFE_14) main.acceptCookies() diff --git a/cypress/e2e/regression/create_safe_cf.cy.js b/cypress/e2e/regression/create_safe_cf.cy.js index 0ab54755d1..b05bff5474 100644 --- a/cypress/e2e/regression/create_safe_cf.cy.js +++ b/cypress/e2e/regression/create_safe_cf.cy.js @@ -28,9 +28,7 @@ describe('CF Safe regression tests', () => { }) beforeEach(() => { - cy.clearLocalStorage() cy.visit(constants.homeUrl + staticSafes.SEP_STATIC_SAFE_0) - main.acceptCookies() }) it('Verify Add native assets and Create tx modals can be opened', () => { diff --git a/cypress/e2e/regression/create_safe_simple.cy.js b/cypress/e2e/regression/create_safe_simple.cy.js index 2156f218e7..620ad6e313 100644 --- a/cypress/e2e/regression/create_safe_simple.cy.js +++ b/cypress/e2e/regression/create_safe_simple.cy.js @@ -11,8 +11,6 @@ const signer = walletCredentials.OWNER_4_PRIVATE_KEY describe('Safe creation tests', () => { beforeEach(() => { cy.visit(constants.welcomeUrl + '?chain=sep') - cy.clearLocalStorage() - main.acceptCookies() wallet.connectSigner(signer) owner.waitForConnectionStatus() }) diff --git a/cypress/e2e/regression/create_safe_simple_2.cy.js b/cypress/e2e/regression/create_safe_simple_2.cy.js index f0ad5bf2bd..0a10dda33a 100644 --- a/cypress/e2e/regression/create_safe_simple_2.cy.js +++ b/cypress/e2e/regression/create_safe_simple_2.cy.js @@ -15,8 +15,6 @@ const signer = walletCredentials.OWNER_4_PRIVATE_KEY describe('Safe creation tests 2', () => { beforeEach(() => { cy.visit(constants.welcomeUrl + '?chain=sep') - cy.clearLocalStorage() - main.acceptCookies() }) it('Cancel button cancels safe creation', () => { diff --git a/cypress/e2e/regression/create_tx.cy.js b/cypress/e2e/regression/create_tx.cy.js index ed5ef64c34..f7dfd03f71 100644 --- a/cypress/e2e/regression/create_tx.cy.js +++ b/cypress/e2e/regression/create_tx.cy.js @@ -24,9 +24,7 @@ describe('Create transactions tests', () => { }) beforeEach(() => { - cy.clearLocalStorage() cy.visit(constants.BALANCE_URL + staticSafes.SEP_STATIC_SAFE_6) - main.acceptCookies() wallet.connectSigner(signer) createtx.clickOnNewtransactionBtn() createtx.clickOnSendTokensBtn() diff --git a/cypress/e2e/regression/load_safe.cy.js b/cypress/e2e/regression/load_safe.cy.js index b58db3f77b..83f3f80d05 100644 --- a/cypress/e2e/regression/load_safe.cy.js +++ b/cypress/e2e/regression/load_safe.cy.js @@ -27,9 +27,7 @@ describe('Load Safe tests', () => { }) beforeEach(() => { - cy.clearLocalStorage() cy.visit(constants.loadNewSafeSepoliaUrl) - main.acceptCookies() cy.wait(2000) }) diff --git a/cypress/e2e/regression/load_safe_2.cy.js b/cypress/e2e/regression/load_safe_2.cy.js index 0cd807c43b..e5750ec3d6 100644 --- a/cypress/e2e/regression/load_safe_2.cy.js +++ b/cypress/e2e/regression/load_safe_2.cy.js @@ -26,9 +26,7 @@ describe('Load Safe tests 2', () => { }) beforeEach(() => { - cy.clearLocalStorage() cy.visit(constants.loadNewSafeSepoliaUrl) - main.acceptCookies() cy.wait(2000) }) diff --git a/cypress/e2e/regression/messages_onchain.cy.js b/cypress/e2e/regression/messages_onchain.cy.js index cadcbb04f1..88039368f7 100644 --- a/cypress/e2e/regression/messages_onchain.cy.js +++ b/cypress/e2e/regression/messages_onchain.cy.js @@ -14,9 +14,7 @@ describe('Onchain Messages tests', () => { }) beforeEach(() => { - cy.clearLocalStorage() cy.visit(constants.transactionsHistoryUrl + staticSafes.SEP_STATIC_SAFE_10) - main.acceptCookies() }) it('Verify exapanded details for signed on-chain message', () => { diff --git a/cypress/e2e/regression/messages_popup.cy.js b/cypress/e2e/regression/messages_popup.cy.js index 441debb121..e25f403eba 100644 --- a/cypress/e2e/regression/messages_popup.cy.js +++ b/cypress/e2e/regression/messages_popup.cy.js @@ -18,9 +18,7 @@ describe('Messages popup window tests', () => { }) beforeEach(() => { - cy.clearLocalStorage() cy.visit(constants.appsCustomUrl + staticSafes.SEP_STATIC_SAFE_10) - main.acceptCookies() iframeSelector = `iframe[id="iframe-${constants.safeTestAppurl}"]` }) diff --git a/cypress/e2e/regression/nfts.cy.js b/cypress/e2e/regression/nfts.cy.js index a52b34423d..429ae3a236 100644 --- a/cypress/e2e/regression/nfts.cy.js +++ b/cypress/e2e/regression/nfts.cy.js @@ -30,9 +30,7 @@ describe('NFTs tests', () => { }) beforeEach(() => { - cy.clearLocalStorage() cy.visit(constants.balanceNftsUrl + staticSafes.SEP_STATIC_SAFE_2) - main.acceptCookies() wallet.connectSigner(signer) nfts.waitForNftItems(2) }) diff --git a/cypress/e2e/regression/remove_owner.cy.js b/cypress/e2e/regression/remove_owner.cy.js index df68bafa5d..41e0b7371b 100644 --- a/cypress/e2e/regression/remove_owner.cy.js +++ b/cypress/e2e/regression/remove_owner.cy.js @@ -18,8 +18,6 @@ describe('Remove Owners tests', () => { beforeEach(() => { cy.visit(constants.setupUrl + staticSafes.SEP_STATIC_SAFE_13) main.waitForHistoryCallToComplete() - cy.clearLocalStorage() - main.acceptCookies() cy.contains(owner.safeAccountNonceStr, { timeout: 10000 }) }) diff --git a/cypress/e2e/regression/replace_owner.cy.js b/cypress/e2e/regression/replace_owner.cy.js index 3e48c78bb2..4f7db44a74 100644 --- a/cypress/e2e/regression/replace_owner.cy.js +++ b/cypress/e2e/regression/replace_owner.cy.js @@ -21,8 +21,6 @@ describe('Replace Owners tests', () => { beforeEach(() => { cy.visit(constants.setupUrl + staticSafes.SEP_STATIC_SAFE_4) - cy.clearLocalStorage() - main.acceptCookies() cy.contains(owner.safeAccountNonceStr, { timeout: 10000 }) }) diff --git a/cypress/e2e/regression/sidebar.cy.js b/cypress/e2e/regression/sidebar.cy.js index 408ece39cb..668c9ed88a 100644 --- a/cypress/e2e/regression/sidebar.cy.js +++ b/cypress/e2e/regression/sidebar.cy.js @@ -16,8 +16,6 @@ describe('Sidebar tests', () => { beforeEach(() => { cy.visit(constants.homeUrl + staticSafes.SEP_STATIC_SAFE_9) - cy.clearLocalStorage() - main.acceptCookies() }) it('Verify Current network is displayed at the top', () => { diff --git a/cypress/e2e/regression/sidebar_2.cy.js b/cypress/e2e/regression/sidebar_2.cy.js index 6f59fac4ec..b0e56b43bd 100644 --- a/cypress/e2e/regression/sidebar_2.cy.js +++ b/cypress/e2e/regression/sidebar_2.cy.js @@ -19,8 +19,6 @@ describe('Sidebar added sidebar tests', () => { beforeEach(() => { cy.visit(constants.BALANCE_URL + staticSafes.SEP_STATIC_SAFE_9) cy.wait(2000) - cy.clearLocalStorage() - main.acceptCookies() main.addToLocalStorage(constants.localStorageKeys.SAFE_v2__addedSafes, ls.addedSafes.set2) main.addToLocalStorage(constants.localStorageKeys.SAFE_v2__addressBook, ls.addressBookData.addedSafes) }) diff --git a/cypress/e2e/regression/sidebar_3.cy.js b/cypress/e2e/regression/sidebar_3.cy.js index a761130c3d..a760e5ba0f 100644 --- a/cypress/e2e/regression/sidebar_3.cy.js +++ b/cypress/e2e/regression/sidebar_3.cy.js @@ -19,10 +19,6 @@ describe('Sidebar tests 3', () => { staticSafes = await getSafes(CATEGORIES.static) }) - beforeEach(() => { - cy.clearLocalStorage() - }) - it('Verify that users with no accounts see the empty state in "My accounts" block', () => { cy.visit(constants.BALANCE_URL + staticSafes.SEP_STATIC_SAFE_9) main.acceptCookies() diff --git a/cypress/e2e/regression/sidebar_nonowner.cy.js b/cypress/e2e/regression/sidebar_nonowner.cy.js index 629bbbea48..3104c1174f 100644 --- a/cypress/e2e/regression/sidebar_nonowner.cy.js +++ b/cypress/e2e/regression/sidebar_nonowner.cy.js @@ -21,8 +21,6 @@ describe('Sidebar non-owner tests', () => { beforeEach(() => { cy.visit(constants.homeUrl + staticSafes.SEP_STATIC_SAFE_11) cy.wait(2000) - cy.clearLocalStorage() - main.acceptCookies() main.addToLocalStorage(constants.localStorageKeys.SAFE_v2__addedSafes, ls.addedSafes.set3) main.addToLocalStorage(constants.localStorageKeys.SAFE_v2__addressBook, ls.addressBookData.addedSafes) }) diff --git a/cypress/e2e/regression/spending_limits.cy.js b/cypress/e2e/regression/spending_limits.cy.js index 3b15be885f..527a836045 100644 --- a/cypress/e2e/regression/spending_limits.cy.js +++ b/cypress/e2e/regression/spending_limits.cy.js @@ -23,8 +23,6 @@ describe('Spending limits tests', () => { beforeEach(() => { cy.visit(constants.setupUrl + staticSafes.SEP_STATIC_SAFE_8) - cy.clearLocalStorage() - main.acceptCookies() cy.get(spendinglimit.spendingLimitsSection).should('be.visible') }) diff --git a/cypress/e2e/regression/spending_limits_nonowner.cy.js b/cypress/e2e/regression/spending_limits_nonowner.cy.js index e64bda33fb..d6fe2ede2d 100644 --- a/cypress/e2e/regression/spending_limits_nonowner.cy.js +++ b/cypress/e2e/regression/spending_limits_nonowner.cy.js @@ -12,8 +12,6 @@ describe('Spending limits non-owner tests', () => { beforeEach(() => { cy.visit(constants.setupUrl + staticSafes.SEP_STATIC_SAFE_3) - cy.clearLocalStorage() - main.acceptCookies() cy.get(spendinglimit.spendingLimitsSection).should('be.visible') }) diff --git a/cypress/e2e/regression/swaps.cy.js b/cypress/e2e/regression/swaps.cy.js index d0c426402c..e2251c7c9f 100644 --- a/cypress/e2e/regression/swaps.cy.js +++ b/cypress/e2e/regression/swaps.cy.js @@ -27,11 +27,9 @@ describe('Swaps tests', () => { }) beforeEach(() => { - cy.clearLocalStorage() cy.visit(constants.swapUrl + staticSafes.SEP_STATIC_SAFE_1) main.waitForHistoryCallToComplete() wallet.connectSigner(signer) - main.acceptCookies() iframeSelector = `iframe[src*="${constants.swapWidget}"]` }) diff --git a/cypress/e2e/regression/swaps_history.cy.js b/cypress/e2e/regression/swaps_history.cy.js index 95d4ffb527..9d743e2546 100644 --- a/cypress/e2e/regression/swaps_history.cy.js +++ b/cypress/e2e/regression/swaps_history.cy.js @@ -17,9 +17,7 @@ describe('Swaps history tests', () => { }) beforeEach(() => { - cy.clearLocalStorage() cy.visit(constants.transactionsHistoryUrl + staticSafes.SEP_STATIC_SAFE_1) - main.acceptCookies() }) it('Verify swap selling operation with one action', { defaultCommandTimeout: 30000 }, () => { diff --git a/cypress/e2e/regression/swaps_history_2.cy.js b/cypress/e2e/regression/swaps_history_2.cy.js index ca71f2d32c..4239df2120 100644 --- a/cypress/e2e/regression/swaps_history_2.cy.js +++ b/cypress/e2e/regression/swaps_history_2.cy.js @@ -14,10 +14,6 @@ describe('Swaps history tests 2', () => { staticSafes = await getSafes(CATEGORIES.static) }) - beforeEach(() => { - cy.clearLocalStorage() - }) - it('Verify swap sell order with one action', { defaultCommandTimeout: 30000 }, () => { cy.visit(constants.transactionUrl + staticSafes.SEP_STATIC_SAFE_1 + swaps.swapTxs.sell1Action) main.acceptCookies() diff --git a/cypress/e2e/regression/swaps_tokens.cy.js b/cypress/e2e/regression/swaps_tokens.cy.js index ff766dc20e..effe894ea8 100644 --- a/cypress/e2e/regression/swaps_tokens.cy.js +++ b/cypress/e2e/regression/swaps_tokens.cy.js @@ -17,9 +17,7 @@ describe('[SMOKE] Swaps token tests', () => { }) beforeEach(() => { - cy.clearLocalStorage() cy.visit(constants.BALANCE_URL + staticSafes.SEP_STATIC_SAFE_1) - main.acceptCookies() }) // TODO: Added to prod diff --git a/cypress/e2e/regression/tokens.cy.js b/cypress/e2e/regression/tokens.cy.js index 44580c8c2e..3f696c1d13 100644 --- a/cypress/e2e/regression/tokens.cy.js +++ b/cypress/e2e/regression/tokens.cy.js @@ -17,14 +17,11 @@ describe('Tokens tests', () => { staticSafes = await getSafes(CATEGORIES.static) }) beforeEach(() => { + main.addToLocalStorage( + constants.localStorageKeys.SAFE_v2__tokenlist_onboarding, + ls.cookies.acceptedTokenListOnboarding, + ) cy.visit(constants.BALANCE_URL + staticSafes.SEP_STATIC_SAFE_2) - cy.clearLocalStorage().then(() => { - main.addToLocalStorage(constants.localStorageKeys.SAFE_v2_cookies, ls.cookies.acceptedCookies) - main.addToLocalStorage( - constants.localStorageKeys.SAFE_v2__tokenlist_onboarding, - ls.cookies.acceptedTokenListOnboarding, - ) - }) }) // TODO: Added to prod diff --git a/cypress/e2e/regression/tx_decoding.cy.js b/cypress/e2e/regression/tx_decoding.cy.js index 777ad015b8..9bf12f199e 100644 --- a/cypress/e2e/regression/tx_decoding.cy.js +++ b/cypress/e2e/regression/tx_decoding.cy.js @@ -9,9 +9,7 @@ const decodedTx = //TODO: Check file error describe('Tx decoding tests', () => { it.skip('Check visual tx', () => { - cy.clearLocalStorage() cy.visit(constants.transactionUrl + safe + decodedTx) - main.acceptCookies() createTx.clickOnExpandAllActionsBtn() cy.wait(1000) cy.compareSnapshot('tx_decoding', { errorThreshold: 0, failSilently: false }) diff --git a/cypress/e2e/regression/tx_history.cy.js b/cypress/e2e/regression/tx_history.cy.js index d528a9a925..f5e39f5d4f 100644 --- a/cypress/e2e/regression/tx_history.cy.js +++ b/cypress/e2e/regression/tx_history.cy.js @@ -20,7 +20,6 @@ describe('Tx history tests 1', () => { }) beforeEach(() => { - cy.clearLocalStorage() cy.intercept( 'GET', `**${constants.stagingCGWChains}${constants.networkKeys.sepolia}/${ @@ -34,7 +33,6 @@ describe('Tx history tests 1', () => { cy.visit(constants.transactionsHistoryUrl + staticSafes.SEP_STATIC_SAFE_7) cy.wait('@allTransactions') - main.acceptCookies() }) // TODO: Added to prod diff --git a/cypress/e2e/regression/tx_history_2.cy.js b/cypress/e2e/regression/tx_history_2.cy.js index 4d36ce8c02..5b4be913b0 100644 --- a/cypress/e2e/regression/tx_history_2.cy.js +++ b/cypress/e2e/regression/tx_history_2.cy.js @@ -23,7 +23,6 @@ describe('Tx history tests 2', () => { }) beforeEach(() => { - cy.clearLocalStorage() cy.intercept( 'GET', `**${constants.stagingCGWChains}${constants.networkKeys.sepolia}/${ @@ -36,7 +35,6 @@ describe('Tx history tests 2', () => { ).as('allTransactions') cy.visit(constants.transactionsHistoryUrl + staticSafes.SEP_STATIC_SAFE_7) - main.acceptCookies() }) it('Verify number of transactions is correct', () => { diff --git a/cypress/e2e/safe-apps/apps_list.cy.js b/cypress/e2e/safe-apps/apps_list.cy.js index 46e3e44a9b..cf9682c42d 100644 --- a/cypress/e2e/safe-apps/apps_list.cy.js +++ b/cypress/e2e/safe-apps/apps_list.cy.js @@ -15,9 +15,6 @@ describe('Safe Apps list tests', () => { }) beforeEach(() => { - cy.clearLocalStorage().then(() => { - main.addToLocalStorage(constants.localStorageKeys.SAFE_v2_cookies, ls.cookies.acceptedCookies) - }) cy.visit(`${constants.appsUrl}?safe=${staticSafes.SEP_STATIC_SAFE_1}`, { failOnStatusCode: false, }) diff --git a/cypress/e2e/safe-apps/browser_permissions.cy.js b/cypress/e2e/safe-apps/browser_permissions.cy.js index fc08642fda..f42f30af64 100644 --- a/cypress/e2e/safe-apps/browser_permissions.cy.js +++ b/cypress/e2e/safe-apps/browser_permissions.cy.js @@ -4,7 +4,6 @@ import * as safeapps from '../pages/safeapps.pages' describe('Browser permissions tests', () => { beforeEach(() => { - cy.clearLocalStorage() cy.fixture('safe-app').then((html) => { cy.intercept('GET', `${constants.testAppUrl}/*`, html) cy.intercept('GET', `*/manifest.json`, { @@ -15,7 +14,6 @@ describe('Browser permissions tests', () => { }) }) cy.visitSafeApp(`${constants.testAppUrl}/app`) - main.acceptCookies() }) // @TODO: unknown apps don't have permissions diff --git a/cypress/e2e/safe-apps/drain_account.spec.cy.js b/cypress/e2e/safe-apps/drain_account.spec.cy.js index 22b951cac0..a5a01c84eb 100644 --- a/cypress/e2e/safe-apps/drain_account.spec.cy.js +++ b/cypress/e2e/safe-apps/drain_account.spec.cy.js @@ -16,24 +16,15 @@ const signer = walletCredentials.OWNER_4_PRIVATE_KEY describe('Drain Account tests', () => { before(async () => { safeAppSafes = await getSafes(CATEGORIES.safeapps) - cy.clearLocalStorage().then(() => { - main.addToLocalStorage(constants.localStorageKeys.SAFE_v2_cookies, ls.cookies.acceptedCookies) - main.addToLocalStorage( - constants.localStorageKeys.SAFE_v2__SafeApps__infoModal, - ls.appPermissions(constants.safeTestAppurl).infoModalAccepted, - ) - }) }) beforeEach(() => { const appUrl = constants.drainAccount_url iframeSelector = `iframe[id="iframe-${appUrl}"]` const visitUrl = `/apps/open?safe=${safeAppSafes.SEP_SAFEAPP_SAFE_1}&appUrl=${encodeURIComponent(appUrl)}` - cy.intercept(`**//v1/chains/11155111/safes/${safeAppSafes.SEP_SAFEAPP_SAFE_1.substring(4)}/balances/**`, { fixture: 'balances.json', }) - cy.visit(visitUrl) }) diff --git a/cypress/e2e/safe-apps/info_modal.cy.js b/cypress/e2e/safe-apps/info_modal.cy.js index a052bb3ba8..c295092ab4 100644 --- a/cypress/e2e/safe-apps/info_modal.cy.js +++ b/cypress/e2e/safe-apps/info_modal.cy.js @@ -11,11 +11,9 @@ describe('Info modal tests', () => { }) beforeEach(() => { - cy.clearLocalStorage() cy.visit(`${constants.appsUrl}?safe=${staticSafes.SEP_STATIC_SAFE_2}`, { failOnStatusCode: false, }) - main.acceptCookies() }) it('Verify the disclaimer is displayed when a Safe App is opened', () => { diff --git a/cypress/e2e/safe-apps/permissions_settings.cy.js b/cypress/e2e/safe-apps/permissions_settings.cy.js index 53df8b6ce4..ee1d65e32b 100644 --- a/cypress/e2e/safe-apps/permissions_settings.cy.js +++ b/cypress/e2e/safe-apps/permissions_settings.cy.js @@ -13,7 +13,6 @@ describe.skip('Permissions settings tests', () => { before(() => { getSafes(CATEGORIES.static).then((statics) => { staticSafes = statics - cy.clearLocalStorage() cy.on('window:before:load', (window) => { window.localStorage.setItem( constants.BROWSER_PERMISSIONS_KEY, @@ -52,7 +51,6 @@ describe.skip('Permissions settings tests', () => { cy.visit(`${constants.appSettingsUrl}?safe=${staticSafes.SEP_STATIC_SAFE_2}`, { failOnStatusCode: false, }) - main.acceptCookies() }) }) diff --git a/cypress/e2e/safe-apps/preview_drawer.cy.js b/cypress/e2e/safe-apps/preview_drawer.cy.js index debbe9b314..d20ee5fca9 100644 --- a/cypress/e2e/safe-apps/preview_drawer.cy.js +++ b/cypress/e2e/safe-apps/preview_drawer.cy.js @@ -9,9 +9,6 @@ let staticSafes = [] describe('Preview drawer tests', () => { before(async () => { staticSafes = await getSafes(CATEGORIES.static) - cy.clearLocalStorage().then(() => { - main.addToLocalStorage(constants.localStorageKeys.SAFE_v2_cookies, ls.cookies.acceptedCookies) - }) }) beforeEach(() => { diff --git a/cypress/e2e/safe-apps/safe_permissions.cy.js b/cypress/e2e/safe-apps/safe_permissions.cy.js index 8aa4cd31b3..d91082cbf1 100644 --- a/cypress/e2e/safe-apps/safe_permissions.cy.js +++ b/cypress/e2e/safe-apps/safe_permissions.cy.js @@ -4,12 +4,6 @@ import * as main from '../pages/main.page' import * as ls from '../../support/localstorage_data.js' describe('Safe permissions system tests', () => { - before(async () => { - cy.clearLocalStorage().then(() => { - main.addToLocalStorage(constants.localStorageKeys.SAFE_v2_cookies, ls.cookies.acceptedCookies) - }) - }) - beforeEach(() => { cy.fixture('safe-app').then((html) => { cy.intercept('GET', `${constants.testAppUrl}/*`, html) diff --git a/cypress/e2e/safe-apps/tx-builder.2spec.cy.js b/cypress/e2e/safe-apps/tx-builder.2spec.cy.js index eef3f2db3f..7f059a65ad 100644 --- a/cypress/e2e/safe-apps/tx-builder.2spec.cy.js +++ b/cypress/e2e/safe-apps/tx-builder.2spec.cy.js @@ -22,16 +22,6 @@ describe('Transaction Builder 2 tests', { defaultCommandTimeout: 20000 }, () => }) beforeEach(() => { - cy.clearLocalStorage() - cy.clearCookies() - cy.window().then((win) => { - win.localStorage.setItem(constants.localStorageKeys.SAFE_v2_cookies, ls.cookies.acceptedCookies) - win.localStorage.setItem( - constants.localStorageKeys.SAFE_v2__SafeApps__infoModal, - ls.appPermissions(constants.safeTestAppurl).infoModalAccepted, - ) - }) - const appUrl = constants.TX_Builder_url iframeSelector = `iframe[id="iframe-${appUrl}"]` const visitUrl = `/apps/open?safe=${safeAppSafes.SEP_SAFEAPP_SAFE_1}&appUrl=${encodeURIComponent(appUrl)}` diff --git a/cypress/e2e/safe-apps/tx-builder.spec.cy.js b/cypress/e2e/safe-apps/tx-builder.spec.cy.js index 7bed947ee5..8bf6f67ce6 100644 --- a/cypress/e2e/safe-apps/tx-builder.spec.cy.js +++ b/cypress/e2e/safe-apps/tx-builder.spec.cy.js @@ -22,16 +22,6 @@ describe('Transaction Builder tests', { defaultCommandTimeout: 20000 }, () => { }) beforeEach(() => { - cy.clearLocalStorage() - cy.clearCookies() - cy.window().then((win) => { - win.localStorage.setItem(constants.localStorageKeys.SAFE_v2_cookies, ls.cookies.acceptedCookies) - win.localStorage.setItem( - constants.localStorageKeys.SAFE_v2__SafeApps__infoModal, - ls.appPermissions(constants.safeTestAppurl).infoModalAccepted, - ) - }) - const appUrl = constants.TX_Builder_url iframeSelector = `iframe[id="iframe-${appUrl}"]` const visitUrl = `/apps/open?safe=${safeAppSafes.SEP_SAFEAPP_SAFE_1}&appUrl=${encodeURIComponent(appUrl)}` diff --git a/cypress/e2e/safe-apps/tx_modal.cy.js b/cypress/e2e/safe-apps/tx_modal.cy.js index 003e147a38..3b33dc219f 100644 --- a/cypress/e2e/safe-apps/tx_modal.cy.js +++ b/cypress/e2e/safe-apps/tx_modal.cy.js @@ -8,16 +8,6 @@ const unknownApp = 'unknown' const confirmTx = 'Confirm transaction' describe('Transaction modal tests', () => { - before(async () => { - cy.clearLocalStorage().then(() => { - main.addToLocalStorage(constants.localStorageKeys.SAFE_v2_cookies, ls.cookies.acceptedCookies) - main.addToLocalStorage( - constants.localStorageKeys.SAFE_v2__SafeApps__infoModal, - ls.appPermissions(constants.safeTestAppurl).infoModalAccepted, - ) - }) - }) - beforeEach(() => { cy.fixture('safe-app').then((html) => { cy.intercept('GET', `${constants.testAppUrl}/*`, html) diff --git a/cypress/e2e/smoke/add_owner.cy.js b/cypress/e2e/smoke/add_owner.cy.js index 4539f4cb49..0d54292989 100644 --- a/cypress/e2e/smoke/add_owner.cy.js +++ b/cypress/e2e/smoke/add_owner.cy.js @@ -16,9 +16,7 @@ describe('[SMOKE] Add Owners tests', () => { beforeEach(() => { cy.visit(constants.setupUrl + staticSafes.SEP_STATIC_SAFE_4) - cy.clearLocalStorage() main.waitForHistoryCallToComplete() - main.acceptCookies() main.verifyElementsExist([navigation.setupSection]) }) diff --git a/cypress/e2e/smoke/address_book.cy.js b/cypress/e2e/smoke/address_book.cy.js index 842369c382..326a33ea91 100644 --- a/cypress/e2e/smoke/address_book.cy.js +++ b/cypress/e2e/smoke/address_book.cy.js @@ -25,9 +25,7 @@ describe('[SMOKE] Address book tests', () => { beforeEach(() => { cy.visit(constants.addressBookUrl + staticSafes.SEP_STATIC_SAFE_4) - cy.clearLocalStorage() main.waitForHistoryCallToComplete() - main.acceptCookies() }) it('[SMOKE] Verify entry can be added', () => { diff --git a/cypress/e2e/smoke/assets.cy.js b/cypress/e2e/smoke/assets.cy.js index 368b266f36..c81721bc29 100644 --- a/cypress/e2e/smoke/assets.cy.js +++ b/cypress/e2e/smoke/assets.cy.js @@ -18,8 +18,6 @@ describe('[SMOKE] Assets tests', () => { beforeEach(() => { cy.visit(constants.BALANCE_URL + staticSafes.SEP_STATIC_SAFE_2) - cy.clearLocalStorage() - main.acceptCookies() }) it('[SMOKE] Verify that the native token is visible', () => { diff --git a/cypress/e2e/smoke/batch_tx.cy.js b/cypress/e2e/smoke/batch_tx.cy.js index 7d832af999..c0432a0429 100644 --- a/cypress/e2e/smoke/batch_tx.cy.js +++ b/cypress/e2e/smoke/batch_tx.cy.js @@ -20,9 +20,7 @@ describe('[SMOKE] Batch transaction tests', () => { }) beforeEach(() => { - cy.clearLocalStorage() cy.visit(constants.BALANCE_URL + staticSafes.SEP_STATIC_SAFE_2) - main.acceptCookies() }) it('[SMOKE] Verify empty batch list can be opened', () => { diff --git a/cypress/e2e/smoke/create_safe_cf.cy.js b/cypress/e2e/smoke/create_safe_cf.cy.js index 346d3ca5d0..928a607243 100644 --- a/cypress/e2e/smoke/create_safe_cf.cy.js +++ b/cypress/e2e/smoke/create_safe_cf.cy.js @@ -12,8 +12,6 @@ const signer = walletCredentials.OWNER_2_PRIVATE_KEY describe('[SMOKE] CF Safe creation tests', () => { beforeEach(() => { cy.visit(constants.welcomeUrl + '?chain=sep') - cy.clearLocalStorage() - main.acceptCookies() getEvents() }) diff --git a/cypress/e2e/smoke/create_safe_simple.cy.js b/cypress/e2e/smoke/create_safe_simple.cy.js index 3b749b1e88..2ba907a99c 100644 --- a/cypress/e2e/smoke/create_safe_simple.cy.js +++ b/cypress/e2e/smoke/create_safe_simple.cy.js @@ -10,8 +10,6 @@ const signer = walletCredentials.OWNER_4_PRIVATE_KEY describe('[SMOKE] Safe creation tests', () => { beforeEach(() => { cy.visit(constants.welcomeUrl + '?chain=sep') - cy.clearLocalStorage() - main.acceptCookies() }) it('[SMOKE] Verify a Wallet can be connected', () => { wallet.connectSigner(signer) diff --git a/cypress/e2e/smoke/create_tx.cy.js b/cypress/e2e/smoke/create_tx.cy.js index 0a7dd1c6f7..af0b9ba055 100644 --- a/cypress/e2e/smoke/create_tx.cy.js +++ b/cypress/e2e/smoke/create_tx.cy.js @@ -17,9 +17,7 @@ describe('[SMOKE] Create transactions tests', () => { }) beforeEach(() => { - cy.clearLocalStorage() cy.visit(constants.BALANCE_URL + staticSafes.SEP_STATIC_SAFE_10) - main.acceptCookies() wallet.connectSigner(signer) createtx.clickOnNewtransactionBtn() createtx.clickOnSendTokensBtn() diff --git a/cypress/e2e/smoke/create_tx_2.cy.js b/cypress/e2e/smoke/create_tx_2.cy.js index 7030235f60..330cabe92e 100644 --- a/cypress/e2e/smoke/create_tx_2.cy.js +++ b/cypress/e2e/smoke/create_tx_2.cy.js @@ -24,9 +24,7 @@ describe('[SMOKE] Create transactions tests 2', () => { }) beforeEach(() => { - cy.clearLocalStorage() cy.visit(constants.BALANCE_URL + staticSafes.SEP_STATIC_SAFE_6) - main.acceptCookies() wallet.connectSigner(signer) createtx.clickOnNewtransactionBtn() createtx.clickOnSendTokensBtn() diff --git a/cypress/e2e/smoke/dashboard.cy.js b/cypress/e2e/smoke/dashboard.cy.js index 9ef1739b41..cfdb9b9c12 100644 --- a/cypress/e2e/smoke/dashboard.cy.js +++ b/cypress/e2e/smoke/dashboard.cy.js @@ -18,9 +18,7 @@ describe('[SMOKE] Dashboard tests', { defaultCommandTimeout: 20000 }, () => { }) beforeEach(() => { - cy.clearLocalStorage() cy.visit(constants.homeUrl + staticSafes.SEP_STATIC_SAFE_2) - main.acceptCookies() }) it('[SMOKE] Verify the overview widget is displayed', () => { diff --git a/cypress/e2e/smoke/import_export_data.cy.js b/cypress/e2e/smoke/import_export_data.cy.js index 6ecc9d6dd9..b862c91ad5 100644 --- a/cypress/e2e/smoke/import_export_data.cy.js +++ b/cypress/e2e/smoke/import_export_data.cy.js @@ -15,9 +15,7 @@ describe('[SMOKE] Import Export Data tests', () => { }) beforeEach(() => { - cy.clearLocalStorage() cy.visit(constants.dataSettingsUrl).then(() => { - main.acceptCookies() createwallet.selectNetwork(constants.networks.sepolia) }) }) diff --git a/cypress/e2e/smoke/import_export_data_2.cy.js b/cypress/e2e/smoke/import_export_data_2.cy.js index 7aa5ee3dca..7d52747f61 100644 --- a/cypress/e2e/smoke/import_export_data_2.cy.js +++ b/cypress/e2e/smoke/import_export_data_2.cy.js @@ -25,8 +25,6 @@ describe('[SMOKE] Import Export Data tests 2', () => { beforeEach(() => { cy.visit(constants.BALANCE_URL + staticSafes.SEP_STATIC_SAFE_13) - cy.clearLocalStorage() - main.acceptCookies() }) it('[SMOKE] Verify that the Sidebar Import button opens an import modal', () => { diff --git a/cypress/e2e/smoke/landing.cy.js b/cypress/e2e/smoke/landing.cy.js index f56883364a..fe61ffea78 100644 --- a/cypress/e2e/smoke/landing.cy.js +++ b/cypress/e2e/smoke/landing.cy.js @@ -1,7 +1,6 @@ import * as constants from '../../support/constants' describe('[SMOKE] Landing page tests', () => { it('[SMOKE] Verify a user will be redirected to welcome page', () => { - cy.clearLocalStorage() cy.visit('/') cy.url().should('include', constants.welcomeUrl) }) diff --git a/cypress/e2e/smoke/load_safe.cy.js b/cypress/e2e/smoke/load_safe.cy.js index 1b7c7d5695..ff05d98de6 100644 --- a/cypress/e2e/smoke/load_safe.cy.js +++ b/cypress/e2e/smoke/load_safe.cy.js @@ -16,9 +16,7 @@ describe('[SMOKE] Load Safe tests', () => { }) beforeEach(() => { - cy.clearLocalStorage() cy.visit(constants.loadNewSafeSepoliaUrl) - main.acceptCookies() cy.wait(2000) }) diff --git a/cypress/e2e/smoke/messages_offchain.cy.js b/cypress/e2e/smoke/messages_offchain.cy.js index f99796563e..408d66f460 100644 --- a/cypress/e2e/smoke/messages_offchain.cy.js +++ b/cypress/e2e/smoke/messages_offchain.cy.js @@ -23,9 +23,7 @@ describe('[SMOKE] Offchain Messages tests', () => { }) beforeEach(() => { - cy.clearLocalStorage() cy.visit(constants.transactionsMessagesUrl + staticSafes.SEP_STATIC_SAFE_10) - main.acceptCookies() }) // TODO: Clarify changes diff --git a/cypress/e2e/smoke/nfts.cy.js b/cypress/e2e/smoke/nfts.cy.js index 30fa5c8d58..1ad6a72e80 100644 --- a/cypress/e2e/smoke/nfts.cy.js +++ b/cypress/e2e/smoke/nfts.cy.js @@ -15,9 +15,7 @@ describe('[SMOKE] NFTs tests', () => { }) beforeEach(() => { - cy.clearLocalStorage() cy.visit(constants.balanceNftsUrl + staticSafes.SEP_STATIC_SAFE_2) - main.acceptCookies() nfts.waitForNftItems(2) }) diff --git a/cypress/e2e/smoke/replace_owner.cy.js b/cypress/e2e/smoke/replace_owner.cy.js index b52be981a5..b05e400da5 100644 --- a/cypress/e2e/smoke/replace_owner.cy.js +++ b/cypress/e2e/smoke/replace_owner.cy.js @@ -15,8 +15,6 @@ describe('[SMOKE] Replace Owners tests', () => { beforeEach(() => { cy.visit(constants.setupUrl + staticSafes.SEP_STATIC_SAFE_4) - cy.clearLocalStorage() - main.acceptCookies() cy.contains(owner.safeAccountNonceStr, { timeout: 10000 }) }) diff --git a/cypress/e2e/smoke/spending_limits.cy.js b/cypress/e2e/smoke/spending_limits.cy.js index 63451967e1..ac080d65d4 100644 --- a/cypress/e2e/smoke/spending_limits.cy.js +++ b/cypress/e2e/smoke/spending_limits.cy.js @@ -16,8 +16,6 @@ describe('[SMOKE] Spending limits tests', () => { beforeEach(() => { cy.visit(constants.setupUrl + staticSafes.SEP_STATIC_SAFE_8) - cy.clearLocalStorage() - main.acceptCookies() wallet.connectSigner(signer) owner.waitForConnectionStatus() cy.get(spendinglimit.spendingLimitsSection).should('be.visible') diff --git a/cypress/e2e/smoke/tx_history.cy.js b/cypress/e2e/smoke/tx_history.cy.js index 7559ed74a7..32911d7956 100644 --- a/cypress/e2e/smoke/tx_history.cy.js +++ b/cypress/e2e/smoke/tx_history.cy.js @@ -20,9 +20,7 @@ describe('[SMOKE] Tx history tests', () => { }) beforeEach(() => { - cy.clearLocalStorage() cy.visit(constants.transactionsHistoryUrl + staticSafes.SEP_STATIC_SAFE_7) - main.acceptCookies() }) // Token receipt diff --git a/cypress/support/e2e.js b/cypress/support/e2e.js index edf7fc4ce5..14693ec95c 100644 --- a/cypress/support/e2e.js +++ b/cypress/support/e2e.js @@ -17,6 +17,8 @@ import '@testing-library/cypress/add-commands' import './commands' import './safe-apps-commands' +import * as constants from './constants' +import * as ls from './localstorage_data' // Alternatively you can use CommonJS syntax: // require('./commands') @@ -51,11 +53,19 @@ before(() => { beforeEach(() => { cy.setupInterceptors() cy.clearAllSessionStorage() + cy.clearLocalStorage() + cy.clearCookies() cy.window().then((window) => { const getDate = () => new Date().toISOString() const beamerKey1 = `_BEAMER_FIRST_VISIT_${productID}` const beamerKey2 = `_BEAMER_BOOSTED_ANNOUNCEMENT_DATE_${productID}` + const cookiesKey = 'SAFE_v2__cookies_terms' window.localStorage.setItem(beamerKey1, getDate()) window.localStorage.setItem(beamerKey2, getDate()) + window.localStorage.setItem(cookiesKey, ls.cookies.acceptedCookies) + window.localStorage.setItem( + constants.localStorageKeys.SAFE_v2__SafeApps__infoModal, + ls.appPermissions(constants.safeTestAppurl).infoModalAccepted, + ) }) })