Commit 0017e2fc authored by Zach Pomerantz's avatar Zach Pomerantz Committed by GitHub

test: use goerli (#4826)

* test: use goerli

* test: skip rinkeby-specific tests

* revert: retain arbitrum rinkeby
parent 5c9c8b4c
...@@ -21,20 +21,20 @@ describe('Add Liquidity', () => { ...@@ -21,20 +21,20 @@ describe('Add Liquidity', () => {
cy.get('#add-liquidity-input-tokenb .token-symbol-container').should('not.contain.text', 'ETH') cy.get('#add-liquidity-input-tokenb .token-symbol-container').should('not.contain.text', 'ETH')
}) })
it('token not in storage is loaded', () => { it.skip('token not in storage is loaded', () => {
cy.visit('/add/0xb290b2f9f8f108d03ff2af3ac5c8de6de31cdf6d/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85') cy.visit('/add/0xb290b2f9f8f108d03ff2af3ac5c8de6de31cdf6d/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85')
cy.get('#add-liquidity-input-tokena .token-symbol-container').should('contain.text', 'SKL') cy.get('#add-liquidity-input-tokena .token-symbol-container').should('contain.text', 'SKL')
cy.get('#add-liquidity-input-tokenb .token-symbol-container').should('contain.text', 'MKR') cy.get('#add-liquidity-input-tokenb .token-symbol-container').should('contain.text', 'MKR')
}) })
it('single token can be selected', () => { it.skip('single token can be selected', () => {
cy.visit('/add/0xb290b2f9f8f108d03ff2af3ac5c8de6de31cdf6d') cy.visit('/add/0xb290b2f9f8f108d03ff2af3ac5c8de6de31cdf6d')
cy.get('#add-liquidity-input-tokena .token-symbol-container').should('contain.text', 'SKL') cy.get('#add-liquidity-input-tokena .token-symbol-container').should('contain.text', 'SKL')
cy.visit('/add/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85') cy.visit('/add/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85')
cy.get('#add-liquidity-input-tokena .token-symbol-container').should('contain.text', 'MKR') cy.get('#add-liquidity-input-tokena .token-symbol-container').should('contain.text', 'MKR')
}) })
it('loads fee tier distribution', () => { it.skip('loads fee tier distribution', () => {
cy.fixture('feeTierDistribution.json').then((feeTierDistribution) => { cy.fixture('feeTierDistribution.json').then((feeTierDistribution) => {
cy.intercept('POST', '/subgraphs/name/uniswap/uniswap-v3', (req: CyHttpMessages.IncomingHttpRequest) => { cy.intercept('POST', '/subgraphs/name/uniswap/uniswap-v3', (req: CyHttpMessages.IncomingHttpRequest) => {
if (hasQuery(req, 'FeeTierDistributionQuery')) { if (hasQuery(req, 'FeeTierDistributionQuery')) {
......
...@@ -23,7 +23,7 @@ describe('Remove Liquidity', () => { ...@@ -23,7 +23,7 @@ describe('Remove Liquidity', () => {
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'WETH') cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'WETH')
}) })
it('token not in storage is loaded', () => { it.skip('token not in storage is loaded', () => {
cy.visit('/remove/v2/0xb290b2f9f8f108d03ff2af3ac5c8de6de31cdf6d/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85') cy.visit('/remove/v2/0xb290b2f9f8f108d03ff2af3ac5c8de6de31cdf6d/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85')
cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'SKL') cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'SKL')
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'MKR') cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'MKR')
......
...@@ -34,7 +34,7 @@ Cypress.Commands.overwrite( ...@@ -34,7 +34,7 @@ Cypress.Commands.overwrite(
cy.intercept('/service-worker.js', options?.serviceWorker ? undefined : { statusCode: 404 }).then(() => { cy.intercept('/service-worker.js', options?.serviceWorker ? undefined : { statusCode: 404 }).then(() => {
original({ original({
...options, ...options,
url: (url.startsWith('/') && url.length > 2 && !url.startsWith('/#') ? `/#${url}` : url) + '?chain=rinkeby', url: (url.startsWith('/') && url.length > 2 && !url.startsWith('/#') ? `/#${url}` : url) + '?chain=goerli',
onBeforeLoad(win) { onBeforeLoad(win) {
options?.onBeforeLoad?.(win) options?.onBeforeLoad?.(win)
win.localStorage.clear() win.localStorage.clear()
......
...@@ -19,10 +19,10 @@ export const TEST_ADDRESS_NEVER_USE_SHORTENED = `${TEST_ADDRESS_NEVER_USE.substr ...@@ -19,10 +19,10 @@ export const TEST_ADDRESS_NEVER_USE_SHORTENED = `${TEST_ADDRESS_NEVER_USE.substr
6 6
)}...${TEST_ADDRESS_NEVER_USE.substr(-4, 4)}` )}...${TEST_ADDRESS_NEVER_USE.substr(-4, 4)}`
const provider = new JsonRpcProvider('https://rinkeby.infura.io/v3/4bf032f2d38a4ed6bb975b80d6340847', 4) const provider = new JsonRpcProvider('https://goerli.infura.io/v3/4bf032f2d38a4ed6bb975b80d6340847', 4)
const signer = new Wallet(TEST_PRIVATE_KEY, provider) const signer = new Wallet(TEST_PRIVATE_KEY, provider)
export const injected = new (class extends Eip1193Bridge { export const injected = new (class extends Eip1193Bridge {
chainId = 4 chainId = /* GOERLI= */ 5
async sendAsync(...args: any[]) { async sendAsync(...args: any[]) {
console.debug('sendAsync called', ...args) console.debug('sendAsync called', ...args)
......
...@@ -11,8 +11,8 @@ describe('#anonymizeLink', () => { ...@@ -11,8 +11,8 @@ describe('#anonymizeLink', () => {
expect(anonymizeLink('https://etherscan.io/address/0xabcd')).toEqual('https://etherscan.io/address/***') expect(anonymizeLink('https://etherscan.io/address/0xabcd')).toEqual('https://etherscan.io/address/***')
}) })
it('anonymizes any addresses in testnet etherscan urls', () => { it('anonymizes any addresses in testnet etherscan urls', () => {
expect(anonymizeLink('https://rinkeby.etherscan.io/address/0xabcd')).toEqual( expect(anonymizeLink('https://goerli.etherscan.io/address/0xabcd')).toEqual(
'https://rinkeby.etherscan.io/address/***' 'https://goerli.etherscan.io/address/***'
) )
}) })
it('anonymizes any addresses in testnet etherscan urls', () => { it('anonymizes any addresses in testnet etherscan urls', () => {
......
...@@ -22,10 +22,7 @@ describe('#getExplorerLink', () => { ...@@ -22,10 +22,7 @@ describe('#getExplorerLink', () => {
it('celo', () => { it('celo', () => {
expect(getExplorerLink(42220, 'abc', ExplorerDataType.ADDRESS)).toEqual('https://celoscan.io/address/abc') expect(getExplorerLink(42220, 'abc', ExplorerDataType.ADDRESS)).toEqual('https://celoscan.io/address/abc')
}) })
it('ropsten', () => { it('goerli', () => {
expect(getExplorerLink(3, 'abc', ExplorerDataType.ADDRESS)).toEqual('https://ropsten.etherscan.io/address/abc') expect(getExplorerLink(5, 'abc', ExplorerDataType.ADDRESS)).toEqual('https://goerli.etherscan.io/address/abc')
})
it('enum', () => {
expect(getExplorerLink(4, 'abc', ExplorerDataType.ADDRESS)).toEqual('https://rinkeby.etherscan.io/address/abc')
}) })
}) })
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment