Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Keep Sidebar drawer mounted #4595

Closed
wants to merge 50 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
0818e71
Refactor: upgrade to Next 15 (#4485)
compojoom Nov 19, 2024
67454b1
Fix: run prettier
katspaugh Nov 19, 2024
ee8d13b
Tests: Add proposer tests (#4536)
mike10ca Nov 19, 2024
38010be
Pull from main
katspaugh Nov 20, 2024
abdae72
Chore: update cgw sdk to stable version
katspaugh Nov 20, 2024
436f99e
Tests: Add proposers tests (#4542)
mike10ca Nov 20, 2024
01c1079
Tests: Add safe apps tests (#4544)
mike10ca Nov 21, 2024
7253f67
Fix: mui accordion background (#4543)
katspaugh Nov 21, 2024
e4776d1
Fix: section heading in terms (#4545)
katspaugh Nov 21, 2024
5f8fad0
Chore: update walletconnect packages
katspaugh Nov 22, 2024
6ff9e32
Fix: remove old app store button (#4546)
katspaugh Nov 22, 2024
03b34bf
Tests: Add staking history tests (#4549)
mike10ca Nov 22, 2024
cf98da0
Chore: replace @walletconnect packages with @reown/walletkit (#4548)
katspaugh Nov 22, 2024
a4862ad
Update import export tests (#4551)
mike10ca Nov 22, 2024
74a7e24
Fix: WC unit tests (#4553)
katspaugh Nov 22, 2024
43d158f
fix: fetch safe overviews including untrusted token fiatTotal (#4495)
schmanu Nov 22, 2024
96d6f20
Chore(deps): Bump ethers from 6.11.1 to 6.13.4 (#4557)
dependabot[bot] Nov 25, 2024
207dfd1
Epic: sidebar improvements (#4442)
jmealy Nov 25, 2024
5637ba7
fix: Disable transaction buttons until sdk is initialized (#4405)
usame-algan Nov 25, 2024
dec9e37
Merge branch 'main' of github.com:safe-global/safe-wallet-web into dev
katspaugh Nov 25, 2024
0eb9dc2
fix: only return "next" transactions as pending (#4568)
iamacook Nov 26, 2024
7642d4a
Tests: Fix sidebar and staking tests (#4566)
mike10ca Nov 26, 2024
9382f62
fix: remove unnecessary log (#4570)
iamacook Nov 26, 2024
1aa6626
fix: Init Safe SDK for replayed safes (#4567)
usame-algan Nov 27, 2024
2ed4765
Tests: Add safe pin tests (#4573)
mike10ca Nov 27, 2024
5098280
Refactor: rm unnecessary tx decoding (#4541)
katspaugh Nov 27, 2024
ed631fc
fix: Advanced safe creation address computation (#4564)
usame-algan Nov 27, 2024
cc5374c
Tests: Add regex to handle my accounts (#4574)
mike10ca Nov 28, 2024
6a16d5c
Docs: update .env.example
katspaugh Nov 28, 2024
9f5ab1e
Merge branch 'main' of github.com:safe-global/safe-wallet-web into dev
katspaugh Nov 28, 2024
047f45d
fix: Don't break array elements in tx details into multiple lines if …
usame-algan Nov 28, 2024
1814c26
fix: update `wallet_getCallsStatus` spec. (#4569)
iamacook Nov 28, 2024
d8ff281
Tests: Add sidebar tests (#4577)
mike10ca Nov 28, 2024
d595f12
Tests: Add timeout for drain account app (#4579)
mike10ca Nov 29, 2024
316b956
feat: add LI.FI widget (#4459)
iamacook Nov 29, 2024
7dcd953
feat: zkEmail fake door (#4578)
tmjssz Nov 29, 2024
b50340d
feat: allow signing with owned parent Safes (#4406)
schmanu Nov 29, 2024
a3cd8e4
Chore: fix lodash imports (#4580)
katspaugh Nov 29, 2024
d5517fe
Fix: replace "signer(s)" with "N signers" or "1 signer" (#4550)
katspaugh Nov 29, 2024
b4c7d99
Tests: Add using of mock safe address (#4581)
mike10ca Nov 29, 2024
c312078
Chore: extract terms version into a separate file for a smaller build…
katspaugh Dec 2, 2024
fb15873
fix: add event labels to opening and (un-)pinning of Safe Apps (#4582)
iamacook Dec 2, 2024
dc9327e
Tests: Fix tests (#4586)
mike10ca Dec 2, 2024
374f556
1.48.0
katspaugh Dec 2, 2024
b30a74b
Tests: Update twap tests (#4590)
mike10ca Dec 2, 2024
9e31418
tests: Update test steps (#4591)
mike10ca Dec 2, 2024
2bf0514
Chore: speed up dev build (#4592)
katspaugh Dec 3, 2024
7668262
fix: do not duplicate hex prefixes in `wallet_getCallsStatus` receipt…
iamacook Dec 3, 2024
26d95a3
fix: Keep Sidebar drawer mounted
usame-algan Dec 3, 2024
d87151e
Delay initial mount
katspaugh Dec 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
26 changes: 10 additions & 16 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@
NEXT_PUBLIC_INFURA_TOKEN=
NEXT_PUBLIC_SAFE_APPS_INFURA_TOKEN=

# WalletConnect
NEXT_PUBLIC_WC_PROJECT_ID=

## CGW
NEXT_PUBLIC_GATEWAY_URL_PRODUCTION=
NEXT_PUBLIC_GATEWAY_URL_STAGING=

# Blockaid
NEXT_PUBLIC_BLOCKAID_CLIENT_ID=

# Transaction simulation
NEXT_PUBLIC_TENDERLY_SIMULATE_ENDPOINT_URL=
NEXT_PUBLIC_TENDERLY_PROJECT_NAME=
Expand All @@ -17,15 +23,11 @@ NEXT_PUBLIC_IS_PRODUCTION=
# Latest supported safe version, used for upgrade prompts
NEXT_PUBLIC_SAFE_VERSION=

# Access keys
# Sentry
NEXT_PUBLIC_SENTRY_DSN=
NEXT_PUBLIC_BEAMER_ID=

# Wallet-specific variables
NEXT_PUBLIC_WC_PROJECT_ID=

# E2E tests
NEXT_PUBLIC_CYPRESS_MNEMONIC=
# Beamer
NEXT_PUBLIC_BEAMER_ID=

# Safe Gelato relay service
NEXT_PUBLIC_SAFE_GELATO_RELAY_SERVICE_URL_PRODUCTION=
Expand All @@ -34,19 +36,11 @@ NEXT_PUBLIC_SAFE_GELATO_RELAY_SERVICE_URL_STAGING=
# Firebase Cloud Messaging
NEXT_PUBLIC_FIREBASE_OPTIONS_PRODUCTION=
NEXT_PUBLIC_FIREBASE_VAPID_KEY_PRODUCTION=

NEXT_PUBLIC_FIREBASE_OPTIONS_STAGING=
NEXT_PUBLIC_FIREBASE_VAPID_KEY_STAGING=

# Blockaid
NEXT_PUBLIC_BLOCKAID_CLIENT_ID

# Social Login
NEXT_PUBLIC_SOCIAL_WALLET_OPTIONS_STAGING=
NEXT_PUBLIC_SOCIAL_WALLET_OPTIONS_PRODUCTION=

# Cypress wallet private keys
CYPRESS_WALLET_CREDENTIALS=

# [optional] Beamer keys for e2e tests
BEAMER_DATA_E2E=
BEAMER_DATA_E2E=
45 changes: 0 additions & 45 deletions .eslintrc.json

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/cypress/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ runs:
curl -O 'https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb'
sudo apt-get install ./google-chrome-stable_current_amd64.deb

- name: Install Cypress 13.13.1
- name: Install Cypress 13.15.2
shell: bash
run: npm install cypress@13.13.1 --legacy-peer-deps
run: yarn add -D cypress@13.15.2

- uses: ./.github/workflows/build
with:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ jobs:

- uses: ./.github/workflows/yarn

- uses: CatChen/eslint-suggestion-action@v2
- uses: CatChen/eslint-suggestion-action@v4.1.7
with:
request-changes: true # optional
fail-check: true # optional
github-token: ${{ secrets.GITHUB_TOKEN }} # optional
directory: './' # optional
targets: 'src' # optional
config-path: './eslint.config.mjs'
1 change: 1 addition & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export default defineConfig({
hideXHR: true,
defaultCommandTimeout: 10000,
pageLoadTimeout: 60000,
numTestsKeptInMemory: 20,
},

chromeWebSecurity: false,
Expand Down
6 changes: 0 additions & 6 deletions cypress/e2e/happypath/recovery_hp_1.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,7 @@ describe('Recovery happy path tests 1', () => {
recovery.clickOnNextBtn()
tx.executeFlow_1()
recovery.verifyRecovererAdded([constants.SEPOLIA_OWNER_2_SHORT])

recovery.clearRecoverers()

// recovery.removeRecoverer(0, constants.SEPOLIA_OWNER_2)
// recovery.clickOnNextBtn()
// tx.executeFlow_1()

recovery.getSetupRecoveryBtn()
})
})
51 changes: 51 additions & 0 deletions cypress/e2e/happypath_2/proposers.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import * as constants from '../../support/constants.js'
import * as owner from '../pages/owners.pages.js'
import { getSafes, CATEGORIES } from '../../support/safes/safesHandler.js'
import * as wallet from '../../support/utils/wallet.js'
import * as proposer from '../pages/proposers.pages.js'

let staticSafes = []
const walletCredentials = JSON.parse(Cypress.env('CYPRESS_WALLET_CREDENTIALS'))
const signer = walletCredentials.OWNER_4_PRIVATE_KEY
const signer3 = walletCredentials.OWNER_3_PRIVATE_KEY
const addedProposer = walletCredentials.OWNER_3_WALLET_ADDRESS
const proposerAddress = 'sep:0xC16D...6fED'
const proposerAddress2 = '0x8eeC...2a3b'
const proposerName2 = 'Proposer 2'
const proposerName = 'Proposer 1'
const changedProposerName = 'Changed proposer name'

describe('Happy path Proposers tests', () => {
before(async () => {
staticSafes = await getSafes(CATEGORIES.static)
})

//TODO: Flaky due to UI retrieval issue - wip
it.skip('Verify that editing a proposer is only possible for the proposer created by the creator', () => {
cy.visit(constants.setupUrl + staticSafes.SEP_STATIC_SAFE_31)
wallet.connectSigner(signer3)
cy.contains(owner.safeAccountNonceStr, { timeout: 10000 })
proposer.verifyEditProposerBtnDisabled(proposerAddress)

proposer.clickOnEditProposerBtn(proposerAddress2)
proposer.enterProposerName(changedProposerName)
proposer.clickOnSubmitProposerBtn()
proposer.checkProposerData([changedProposerName])

proposer.clickOnEditProposerBtn(proposerAddress2)
proposer.enterProposerName(proposerName2)
proposer.clickOnSubmitProposerBtn()
proposer.checkProposerData([proposerName2])
})

it('Verify a proposer can be added', () => {
cy.visit(constants.setupUrl + staticSafes.SEP_STATIC_SAFE_32)
wallet.connectSigner(signer)
cy.contains(owner.safeAccountNonceStr, { timeout: 10000 })
proposer.deleteAllProposers()
proposer.clickOnAddProposerBtn()
proposer.enterProposerData(addedProposer, proposerName)
proposer.clickOnSubmitProposerBtn()
proposer.verifyProposerSuccessMsgDisplayed()
})
})
14 changes: 13 additions & 1 deletion cypress/e2e/pages/create_tx.pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ const advancedDetails = '[data-testid="tx-advanced-details"]'
const baseGas = '[data-testid="tx-bas-gas"]'
const requiredConfirmation = '[data-testid="required-confirmations"]'
export const txDate = '[data-testid="tx-date"]'
export const proposalStatus = '[data-testid="proposal-status"]'
export const txSigner = '[data-testid="signer"]'
const spamTokenWarningIcon = '[data-testid="warning"]'
const untrustedTokenWarningModal = '[data-testid="untrusted-token-warning"]'
const sendTokensBtn = '[data-testid="send-tokens-btn"]'
Expand All @@ -40,11 +42,13 @@ const filterTokenInput = '[data-testid="token-input"]'
const filterNonceInput = '[data-testid="nonce-input"]'
const filterApplyBtn = '[data-testid="apply-btn"]'
const filterClearBtn = '[data-testid="clear-btn"]'
const addressItem = '[data-testid="address-item"]'
export const addressItem = '[data-testid="address-item"]'
const radioSelector = 'div[role="radiogroup"]'
const rejectTxBtn = '[data-testid="reject-btn"]'
const deleteTxModalBtn = '[data-testid="delete-tx-btn"]'
const toggleUntrustedBtn = '[data-testid="toggle-untrusted"]'
const simulateTxBtn = '[data-testid="simulate-btn"]'
const simulateSuccess = '[data-testid="simulation-success-msg"]'

const viewTransactionBtn = 'View transaction'
const transactionDetailsTitle = 'Transaction details'
Expand Down Expand Up @@ -627,3 +631,11 @@ export function verifyBulkExecuteBtnIsDisabled() {
export function toggleUntrustedTxs() {
cy.get(toggleUntrustedBtn).click()
}

export function clickOnSimulateTxBtn() {
cy.get(simulateTxBtn).click()
}

export function verifySuccessfulSimulation() {
cy.get(simulateSuccess).should('exist')
}
5 changes: 4 additions & 1 deletion cypress/e2e/pages/create_wallet.pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,12 @@ export function clickOnContinueWithWalletBtn() {
cy.get('button').contains(continueWithWalletBtn).click().wait(1000)
}

export function verifyConnectWalletBtnDisplayed() {
return cy.get(connectWalletBtn).should('be.visible')
}
export function clickOnConnectWalletBtn() {
cy.get(welcomeLoginScreen).within(() => {
cy.get(connectWalletBtn).should('be.visible').should('be.enabled').click().wait(1000)
verifyConnectWalletBtnDisplayed().should('be.enabled').click().wait(1000)
})
}

Expand Down
10 changes: 10 additions & 0 deletions cypress/e2e/pages/main.page.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,16 @@ export function acceptCookies(index = 0) {
})
}

export function acceptCookies2() {
cy.wait(2000)
cy.get('body').then(($body) => {
if ($body.find('button:contains(' + acceptSelection + ')').length > 0) {
cy.contains('button', acceptSelection).click()
cy.wait(500)
}
})
}

export function verifyOwnerConnected(prefix = 'sep:') {
cy.get(connectedOwnerBlock).should('contain', prefix)
}
Expand Down
3 changes: 1 addition & 2 deletions cypress/e2e/pages/nfts.pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@ const modalHeader = '[data-testid="modal-header"]'
const modalSelectedNFTs = '[data-testid="selected-nfts"]'
const nftItemList = '[data-testid="nft-item-list"]'
const nftItemNane = '[data-testid="nft-item-name"]'
const signBtn = '[data-testid="sign-btn"]'
const txDetailsSummary = '[data-testid="decoded-tx-summary"]'
const txAccordionDetails = '[data-testid="decoded-tx-details"]'
const accordionActionItem = '[data-testid="action-item"]'

const noneNFTSelected = '0 NFTs selected'
const noneNFTSelected = /0 NFT[s]? selected/
const sendNFTStr = 'Send NFTs'
const recipientAddressStr = 'Recipient address or ENS'
const selectedNFTStr = 'Selected NFTs'
Expand Down
6 changes: 4 additions & 2 deletions cypress/e2e/pages/owners.pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export function getThresholdOptions() {
}

export function verifyThresholdLimit(startValue, endValue) {
cy.get('p').contains(`out of ${endValue} signer(s)`)
cy.get('p').contains(`out of ${endValue} signer${endValue > 1 ? 's' : ''}`)
clickOnThresholdDropdown()
getThresholdOptions().eq(0).should('have.text', startValue).click()
}
Expand Down Expand Up @@ -248,7 +248,9 @@ export function verifyConfirmTransactionWindowDisplayed() {

export function verifyThreshold(startValue, endValue) {
main.verifyInputValue(thresholdInput, startValue)
cy.get('p').contains(`out of ${endValue} signer(s)`).should('be.visible')
cy.get('p')
.contains(`out of ${endValue} signer${endValue > 1 ? 's' : ''}`)
.should('be.visible')
cy.get(thresholdInput).parent().click()
cy.get(thresholdList).contains(endValue).should('be.visible')
cy.get(thresholdList).find('li').should('have.length', endValue)
Expand Down
Loading
Loading