Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mike10ca committed Oct 8, 2024
1 parent dddba33 commit fad8a69
Show file tree
Hide file tree
Showing 75 changed files with 15 additions and 207 deletions.
2 changes: 1 addition & 1 deletion cypress/e2e/pages/main.page.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/prodhealthcheck/add_owner.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
})

Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/prodhealthcheck/create_tx.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/prodhealthcheck/load_safe.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ describe('[PROD] Load Safe tests', () => {
})

beforeEach(() => {
cy.clearLocalStorage()
cy.visit(constants.prodbaseUrl + constants.loadNewSafeSepoliaUrl)
main.acceptCookies()
cy.wait(2000)
})

Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/prodhealthcheck/messages_onchain.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/prodhealthcheck/nfts.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/prodhealthcheck/remove_owner.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
})

Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/prodhealthcheck/sidebar.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 0 additions & 9 deletions cypress/e2e/prodhealthcheck/sidebar_3.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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],
})
Expand All @@ -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, {
Expand All @@ -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()
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/prodhealthcheck/spending_limits.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
})

Expand Down
7 changes: 0 additions & 7 deletions cypress/e2e/prodhealthcheck/swaps_history_2.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down Expand Up @@ -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,
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/prodhealthcheck/swaps_tokens.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/prodhealthcheck/tokens.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/prodhealthcheck/tx_history.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ describe('[PROD] Tx history tests 1', () => {
})

beforeEach(() => {
cy.clearLocalStorage()
cy.intercept(
'GET',
`**${constants.stagingCGWChains}${constants.networkKeys.sepolia}/${
Expand All @@ -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
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/prodhealthcheck/tx_history_2.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ describe('[PROD] Tx history tests 2', () => {
})

beforeEach(() => {
cy.clearLocalStorage()
cy.intercept(
'GET',
`**${constants.stagingCGWChains}${constants.networkKeys.sepolia}/${
Expand All @@ -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', () => {
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/regression/add_owner.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
})

Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/regression/address_book.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
3 changes: 0 additions & 3 deletions cypress/e2e/regression/address_book_2.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/regression/balances_pagination.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})

Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/regression/batch_tx.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
4 changes: 0 additions & 4 deletions cypress/e2e/regression/bulk_execution.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/regression/create_safe_cf.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/regression/create_safe_simple.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
})
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/regression/create_safe_simple_2.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/regression/create_tx.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/regression/load_safe.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ describe('Load Safe tests', () => {
})

beforeEach(() => {
cy.clearLocalStorage()
cy.visit(constants.loadNewSafeSepoliaUrl)
main.acceptCookies()
cy.wait(2000)
})

Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/regression/load_safe_2.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ describe('Load Safe tests 2', () => {
})

beforeEach(() => {
cy.clearLocalStorage()
cy.visit(constants.loadNewSafeSepoliaUrl)
main.acceptCookies()
cy.wait(2000)
})

Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/regression/messages_onchain.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/regression/messages_popup.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}"]`
})

Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/regression/nfts.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/regression/remove_owner.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
})

Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/regression/replace_owner.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
})

Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/regression/sidebar.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/regression/sidebar_2.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
Expand Down
4 changes: 0 additions & 4 deletions cypress/e2e/regression/sidebar_3.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Loading

0 comments on commit fad8a69

Please sign in to comment.