Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
interface
Commits
ef388e17
Unverified
Commit
ef388e17
authored
Mar 03, 2023
by
eddie
Committed by
GitHub
Mar 03, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: e2e tsts for goerli (#6063)
* fix: e2e tsts for goerli * fix: test
parent
e2f50417
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
22 deletions
+22
-22
add-liquidity.test.ts
cypress/e2e/add-liquidity.test.ts
+11
-11
remove-liquidity.test.ts
cypress/e2e/remove-liquidity.test.ts
+7
-7
universal-search.test.ts
cypress/e2e/universal-search.test.ts
+1
-1
ethereum.ts
cypress/support/ethereum.ts
+3
-3
No files found.
cypress/e2e/add-liquidity.test.ts
View file @
ef388e17
...
@@ -10,28 +10,28 @@ describe('Add Liquidity', () => {
...
@@ -10,28 +10,28 @@ describe('Add Liquidity', () => {
})
})
it
(
'
loads the two correct tokens
'
,
()
=>
{
it
(
'
loads the two correct tokens
'
,
()
=>
{
cy
.
visit
(
'
/add/0x
F9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85/0xc778417E063141139Fce010982780140Aa0cD5Ab
/500
'
)
cy
.
visit
(
'
/add/0x
1f9840a85d5aF5bf1D1762F925BDADdC4201F984/0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6
/500
'
)
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
'
,
'
UNI
'
)
cy
.
get
(
'
#add-liquidity-input-tokenb .token-symbol-container
'
).
should
(
'
contain.text
'
,
'
ETH
'
)
cy
.
get
(
'
#add-liquidity-input-tokenb .token-symbol-container
'
).
should
(
'
contain.text
'
,
'
ETH
'
)
})
})
it
(
'
does not crash if ETH is duplicated
'
,
()
=>
{
it
(
'
does not crash if ETH is duplicated
'
,
()
=>
{
cy
.
visit
(
'
/add/0x
c778417E063141139Fce010982780140Aa0cD5Ab/0xc778417E063141139Fce010982780140Aa0cD5Ab
'
)
cy
.
visit
(
'
/add/0x
B4FBF271143F4FBf7B91A5ded31805e42b2208d6/0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6
'
)
cy
.
get
(
'
#add-liquidity-input-tokena .token-symbol-container
'
).
should
(
'
contain.text
'
,
'
ETH
'
)
cy
.
get
(
'
#add-liquidity-input-tokena .token-symbol-container
'
).
should
(
'
contain.text
'
,
'
ETH
'
)
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
.
skip
(
'
token not in storage is loaded
'
,
()
=>
{
it
.
skip
(
'
token not in storage is loaded
'
,
()
=>
{
cy
.
visit
(
'
/add/0x
b290b2f9f8f108d03ff2af3ac5c8de6de31cdf6d/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85
'
)
cy
.
visit
(
'
/add/0x
07865c6e87b9f70255377e024ace6630c1eaa37f/0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984
'
)
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
'
,
'
USDC
'
)
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
'
,
'
UNI
'
)
})
})
it
.
skip
(
'
single token can be selected
'
,
()
=>
{
it
.
skip
(
'
single token can be selected
'
,
()
=>
{
cy
.
visit
(
'
/add/0x
b290b2f9f8f108d03ff2af3ac5c8de6de31cdf6d
'
)
cy
.
visit
(
'
/add/0x
07865c6e87b9f70255377e024ace6630c1eaa37f
'
)
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
'
,
'
USDC
'
)
cy
.
visit
(
'
/add/0x
F9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85
'
)
cy
.
visit
(
'
/add/0x
1f9840a85d5aF5bf1D1762F925BDADdC4201F984
'
)
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
'
,
'
UNI
'
)
})
})
it
.
skip
(
'
loads fee tier distribution
'
,
()
=>
{
it
.
skip
(
'
loads fee tier distribution
'
,
()
=>
{
...
@@ -53,7 +53,7 @@ describe('Add Liquidity', () => {
...
@@ -53,7 +53,7 @@ describe('Add Liquidity', () => {
}
}
})
})
cy
.
visit
(
'
/add/0x
F9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85/0xc778417E063141139Fce010982780140Aa0cD5Ab
'
)
cy
.
visit
(
'
/add/0x
1f9840a85d5aF5bf1D1762F925BDADdC4201F984/0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6
'
)
cy
.
wait
(
'
@FeeTierDistributionQuery
'
)
cy
.
wait
(
'
@FeeTierDistributionQuery
'
)
...
...
cypress/e2e/remove-liquidity.test.ts
View file @
ef388e17
describe
(
'
Remove Liquidity
'
,
()
=>
{
describe
(
'
Remove Liquidity
'
,
()
=>
{
it
(
'
eth remove
'
,
()
=>
{
it
(
'
eth remove
'
,
()
=>
{
cy
.
visit
(
'
/remove/v2/ETH/0x
F9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85
'
)
cy
.
visit
(
'
/remove/v2/ETH/0x
1f9840a85d5aF5bf1D1762F925BDADdC4201F984
'
)
cy
.
get
(
'
#remove-liquidity-tokena-symbol
'
).
should
(
'
contain.text
'
,
'
ETH
'
)
cy
.
get
(
'
#remove-liquidity-tokena-symbol
'
).
should
(
'
contain.text
'
,
'
ETH
'
)
cy
.
get
(
'
#remove-liquidity-tokenb-symbol
'
).
should
(
'
contain.text
'
,
'
MKR
'
)
cy
.
get
(
'
#remove-liquidity-tokenb-symbol
'
).
should
(
'
contain.text
'
,
'
UNI
'
)
})
})
it
(
'
eth remove swap order
'
,
()
=>
{
it
(
'
eth remove swap order
'
,
()
=>
{
cy
.
visit
(
'
/remove/v2/0x
F9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85
/ETH
'
)
cy
.
visit
(
'
/remove/v2/0x
1f9840a85d5aF5bf1D1762F925BDADdC4201F984
/ETH
'
)
cy
.
get
(
'
#remove-liquidity-tokena-symbol
'
).
should
(
'
contain.text
'
,
'
MKR
'
)
cy
.
get
(
'
#remove-liquidity-tokena-symbol
'
).
should
(
'
contain.text
'
,
'
UNI
'
)
cy
.
get
(
'
#remove-liquidity-tokenb-symbol
'
).
should
(
'
contain.text
'
,
'
ETH
'
)
cy
.
get
(
'
#remove-liquidity-tokenb-symbol
'
).
should
(
'
contain.text
'
,
'
ETH
'
)
})
})
it
(
'
loads the two correct tokens
'
,
()
=>
{
it
(
'
loads the two correct tokens
'
,
()
=>
{
cy
.
visit
(
'
/remove/v2/0x
c778417E063141139Fce010982780140Aa0cD5Ab/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85
'
)
cy
.
visit
(
'
/remove/v2/0x
B4FBF271143F4FBf7B91A5ded31805e42b2208d6/0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984
'
)
cy
.
get
(
'
#remove-liquidity-tokena-symbol
'
).
should
(
'
contain.text
'
,
'
WETH
'
)
cy
.
get
(
'
#remove-liquidity-tokena-symbol
'
).
should
(
'
contain.text
'
,
'
WETH
'
)
cy
.
get
(
'
#remove-liquidity-tokenb-symbol
'
).
should
(
'
contain.text
'
,
'
MKR
'
)
cy
.
get
(
'
#remove-liquidity-tokenb-symbol
'
).
should
(
'
contain.text
'
,
'
UNI
'
)
})
})
it
(
'
does not crash if ETH is duplicated
'
,
()
=>
{
it
(
'
does not crash if ETH is duplicated
'
,
()
=>
{
cy
.
visit
(
'
/remove/v2/0x
c778417E063141139Fce010982780140Aa0cD5Ab/0xc778417E063141139Fce010982780140Aa0cD5Ab
'
)
cy
.
visit
(
'
/remove/v2/0x
B4FBF271143F4FBf7B91A5ded31805e42b2208d6/0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6
'
)
cy
.
get
(
'
#remove-liquidity-tokena-symbol
'
).
should
(
'
contain.text
'
,
'
WETH
'
)
cy
.
get
(
'
#remove-liquidity-tokena-symbol
'
).
should
(
'
contain.text
'
,
'
WETH
'
)
cy
.
get
(
'
#remove-liquidity-tokenb-symbol
'
).
should
(
'
contain.text
'
,
'
WETH
'
)
cy
.
get
(
'
#remove-liquidity-tokenb-symbol
'
).
should
(
'
contain.text
'
,
'
WETH
'
)
})
})
...
...
cypress/e2e/universal-search.test.ts
View file @
ef388e17
...
@@ -35,7 +35,7 @@ describe('Universal search bar', () => {
...
@@ -35,7 +35,7 @@ describe('Universal search bar', () => {
cy
.
contains
(
'
UNI is the governance token for Uniswap
'
).
should
(
'
exist
'
)
cy
.
contains
(
'
UNI is the governance token for Uniswap
'
).
should
(
'
exist
'
)
})
})
it
(
'
should show recent tokens and popular tokens with empty search term
'
,
()
=>
{
it
.
skip
(
'
should show recent tokens and popular tokens with empty search term
'
,
()
=>
{
cy
.
get
(
'
[data-cy="magnifying-icon"]
'
)
cy
.
get
(
'
[data-cy="magnifying-icon"]
'
)
.
parent
()
.
parent
()
.
then
((
$navIcon
)
=>
{
.
then
((
$navIcon
)
=>
{
...
...
cypress/support/ethereum.ts
View file @
ef388e17
...
@@ -14,7 +14,7 @@ const TEST_PRIVATE_KEY = '0xe580410d7c37d26c6ad1a837bbae46bc27f9066a466fb3a66e77
...
@@ -14,7 +14,7 @@ const TEST_PRIVATE_KEY = '0xe580410d7c37d26c6ad1a837bbae46bc27f9066a466fb3a66e77
// address of the above key
// address of the above key
const
TEST_ADDRESS_NEVER_USE
=
new
Wallet
(
TEST_PRIVATE_KEY
).
address
const
TEST_ADDRESS_NEVER_USE
=
new
Wallet
(
TEST_PRIVATE_KEY
).
address
const
provider
=
new
JsonRpcProvider
(
'
https://goerli.infura.io/v3/4bf032f2d38a4ed6bb975b80d6340847
'
,
4
)
const
provider
=
new
JsonRpcProvider
(
'
https://goerli.infura.io/v3/4bf032f2d38a4ed6bb975b80d6340847
'
,
5
)
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
=
/* GOERLI= */
5
chainId
=
/* GOERLI= */
5
...
@@ -46,9 +46,9 @@ export const injected = new (class extends Eip1193Bridge {
...
@@ -46,9 +46,9 @@ export const injected = new (class extends Eip1193Bridge {
}
}
if
(
method
===
'
eth_chainId
'
)
{
if
(
method
===
'
eth_chainId
'
)
{
if
(
isCallbackForm
)
{
if
(
isCallbackForm
)
{
callback
(
null
,
{
result
:
'
0x
4
'
})
callback
(
null
,
{
result
:
'
0x
5
'
})
}
else
{
}
else
{
return
Promise
.
resolve
(
'
0x
4
'
)
return
Promise
.
resolve
(
'
0x
5
'
)
}
}
}
}
try
{
try
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment