Skip to content

Commit

Permalink
tests: change network from gnosis to etherium
Browse files Browse the repository at this point in the history
  • Loading branch information
mike10ca committed Feb 9, 2024
1 parent 4ad02b6 commit baed465
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 40 deletions.
2 changes: 1 addition & 1 deletion cypress/e2e/pages/sidebar.pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const currencySection = '[data-testid="currency-section"]'
const missingSignatureInfo = '[data-testid="missing-signature-info"]'
const queuedTxInfo = '[data-testid="queued-tx-info"]'

export const addedSafesGnosis = ['0x17b3...98C8', '0x11A6...F1BB', '0xB8d7...642A']
export const addedSafesEth = ['0x8675...a19b']
export const addedSafesSepolia = ['0x6d0b...6dC1', '0x5912...fFdb', '0x0637...708e', '0xD157...DE9a']
export const sideBarListItems = ['Home', 'Assets', 'Transactions', 'Address book', 'Apps', 'Settings']
export const testSafeHeaderDetails = ['2/2', constants.SEPOLIA_TEST_SAFE_13_SHORT]
Expand Down
15 changes: 7 additions & 8 deletions cypress/e2e/regression/sidebar_2.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import * as ls from '../../support/localstorage_data.js'
import * as assets from '../pages/assets.pages.js'

const newSafeName = 'Added safe 3'
const oldSafeName = 'Added safe 900'
const staticSafe100 = 'Added safe 100'
const addedSafe900 = 'Added safe 900'
const staticSafe200 = 'Added safe 200'

describe('Sidebar added sidebar tests', () => {
Expand All @@ -21,31 +20,31 @@ describe('Sidebar added sidebar tests', () => {

it('Verify the safe added are listed in the sidebar', () => {
sideBar.openSidebar()
sideBar.verifyAddedSafesExist(sideBar.addedSafesGnosis, sideBar.addedSafesSepolia)
sideBar.verifyAddedSafesExist(sideBar.addedSafesSepolia)
})

it('Verify Safes are separated by networks', () => {
sideBar.openSidebar()
sideBar.verifySafesByNetwork(constants.networks.gnosis, sideBar.addedSafesGnosis)
sideBar.verifySafesByNetwork(constants.networks.ethereum, sideBar.addedSafesEth)
sideBar.verifySafesByNetwork(constants.networks.sepolia, sideBar.addedSafesSepolia)
})

it('Verify a safe can be renamed', () => {
sideBar.openSidebar()
sideBar.renameSafeItem(oldSafeName, newSafeName)
sideBar.renameSafeItem(addedSafe900, newSafeName)
sideBar.clickOnSaveBtn()
sideBar.verifySafeNameExists(newSafeName)
})

it('Verify a safe can be removed', () => {
sideBar.openSidebar()
sideBar.removeSafeItem(oldSafeName)
sideBar.verifySafeRemoved([oldSafeName])
sideBar.removeSafeItem(addedSafe900)
sideBar.verifySafeRemoved([addedSafe900])
})

it('Verify the "Read only" tag if the connected user is not an owner of a safe', () => {
sideBar.openSidebar()
sideBar.verifySafeReadOnlyState(staticSafe100)
sideBar.verifySafeReadOnlyState(addedSafe900)
})

it('Verify Fiat currency changes when edited in the assets tab', () => {
Expand Down
35 changes: 4 additions & 31 deletions cypress/support/localstorage_data.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,10 +317,8 @@ export const addressBookData = {
},
},
addedSafes: {
100: {
'0x17b34aEf1428A358bA2eA360a098b8A3BEb698C8': 'Added safe 1',
'0x11A6B41322C57Bd0e56cEe06abB11A1E5c1FF1BB': 'Added safe 900',
'0xB8d760a90a5ed54D3c2b3EFC231277e99188642A': 'Added safe 100',
1: {
'0x8675B754342754A30A2AeF474D114d8460bca19b': 'Added safe 900',
},
11155111: {
'0x0A0EEb6fBCc7c82259E548Fc4617175A357b3e71': 'Added safe 200',
Expand Down Expand Up @@ -529,22 +527,12 @@ export const addedSafes = {
ethBalance: '0',
},
},
100: {
'0x17b34aEf1428A358bA2eA360a098b8A3BEb698C8': {
1: {
'0x8675B754342754A30A2AeF474D114d8460bca19b': {
owners: [{ value: '0x11B1D54B66e5e226D6f89069c21A569A22D98cfd' }],
threshold: 1,
ethBalance: '0.001000002',
},
'0x11A6B41322C57Bd0e56cEe06abB11A1E5c1FF1BB': {
owners: [{ value: '0x7724b234c9099C205F03b458944942bcEBA13408' }],
threshold: 1,
ethBalance: '0',
},
'0xB8d760a90a5ed54D3c2b3EFC231277e99188642A': {
owners: [{ value: '0x11B1D54B66e5e226D6f89069c21A569A22D98cfd' }],
threshold: 1,
ethBalance: '0.92132507668989',
},
},
},
set3: {
Expand Down Expand Up @@ -573,21 +561,6 @@ export const addedSafes = {
},
},
},
set4: {
11155111: {
'0x6d0b6F96f665Bb4490f9ddb2e450Da2f7e546dC1': {
owners: [
{
value: '0xC16Db0251654C0a72E91B190d81eAD367d2C6fED',
name: null,
logoUri: null,
},
],
threshold: 1,
ethBalance: '0',
},
},
},
}

export const pinnedApps = {
Expand Down

0 comments on commit baed465

Please sign in to comment.