Skip to content

Commit 69c170b

Browse files
committed
fix tests
1 parent eeae06f commit 69c170b

File tree

4 files changed

+16
-7
lines changed

4 files changed

+16
-7
lines changed

packages/ui/cypress/support/e2e.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,9 @@ import './commands'
1818

1919
// Alternatively you can use CommonJS syntax:
2020
// require('./commands')
21+
22+
Cypress.on('uncaught:exception', (e, runnable) => {
23+
console.log('Error:', e)
24+
console.log('Test', runnable)
25+
if (e.name.includes('RpcError') && e.message.includes('Method not found')) return false
26+
})

packages/ui/cypress/tests/address-bar.cy.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,10 @@ describe('Account address in the address bar', () => {
278278
})
279279

280280
// check that there is an address in the address bar
281-
cy.url().should('include', address)
281+
cy.url({ timeout: 3000 }).should('include', address)
282+
283+
// react-router takes some time to get the search params inside the links
284+
cy.wait(500)
282285

283286
topMenuItems.homeButton().click()
284287
cy.url().should('include', address)

packages/ui/src/constants.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,12 +281,12 @@ export const networkList: Record<string, NetworkInfo> = {
281281
explorerNetworkName: 'westend',
282282
pplChainRpcUrls: westendPplChains,
283283
rpcUrls: [
284+
'wss://westend-rpc.polkadot.io',
284285
'wss://westend-rpc.dwellir.com',
285286
'wss://westend-rpc-tn.dwellir.com',
286287
'wss://rpc.ibp.network/westend',
287288
'wss://westend.dotters.network',
288289
'wss://westend.api.onfinality.io/public-ws',
289-
'wss://westend-rpc.polkadot.io',
290290
'wss://westend.public.curie.radiumblock.co/ws'
291291
],
292292
httpGraphqlUrl: HTTP_GRAPHQL_URL,
@@ -296,11 +296,11 @@ export const networkList: Record<string, NetworkInfo> = {
296296
chainId: 'paseo',
297297
explorerNetworkName: 'paseo',
298298
rpcUrls: [
299-
'wss://paseo.rpc.amforc.com',
299+
'wss://pas-rpc.stakeworld.io',
300300
'wss://paseo-rpc.dwellir.com',
301+
'wss://paseo.rpc.amforc.com',
301302
'wss://rpc.ibp.network/paseo',
302-
'wss://paseo.dotters.network',
303-
'wss://pas-rpc.stakeworld.io'
303+
'wss://paseo.dotters.network'
304304
],
305305
httpGraphqlUrl: HTTP_GRAPHQL_URL,
306306
pplChainRpcUrls: ['wss://people-paseo.rpc.amforc.com', 'wss://people-paseo.dotters.network'],

packages/ui/src/hooks/useDisplayError.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const useDisplayError = () => {
1616
const { ownAccountList, isAllowedToConnectToExtension } = useAccounts()
1717
const { watchedAddresses } = useWatchedAddresses()
1818
const { error: multisigQueryError, refetch, canFindMultiProxyFromUrl } = useMultiProxy()
19-
const [, setSearchParams] = useSearchParams()
19+
const [searchParams, setSearchParams] = useSearchParams({ address: '' })
2020
const { selectedNetwork } = useNetwork()
2121

2222
if (
@@ -71,7 +71,7 @@ export const useDisplayError = () => {
7171
)
7272
}
7373

74-
if (!canFindMultiProxyFromUrl) {
74+
if (!canFindMultiProxyFromUrl && !!searchParams.get('address')) {
7575
return (
7676
<CenterStyled>
7777
<ErrorMessageStyled>

0 commit comments

Comments
 (0)