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
3277d70e
Unverified
Commit
3277d70e
authored
Jun 30, 2020
by
Moody Salem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix all tests
parent
d1a31fe7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
pool.test.ts
cypress/integration/pool.test.ts
+1
-1
send.test.ts
cypress/integration/send.test.ts
+1
-1
swap.test.ts
cypress/integration/swap.test.ts
+1
-1
commands.js
cypress/support/commands.js
+2
-2
No files found.
cypress/integration/pool.test.ts
View file @
3277d70e
describe
(
'
Pool
'
,
()
=>
{
describe
(
'
Pool
'
,
()
=>
{
beforeEach
(()
=>
cy
.
visit
(
'
/
#/
pool
'
))
beforeEach
(()
=>
cy
.
visit
(
'
/pool
'
))
it
(
'
can search for a pool
'
,
()
=>
{
it
(
'
can search for a pool
'
,
()
=>
{
cy
.
get
(
'
#join-pool-button
'
).
click
()
cy
.
get
(
'
#join-pool-button
'
).
click
()
cy
.
get
(
'
#token-search-input
'
).
type
(
'
DAI
'
,
{
delay
:
200
})
cy
.
get
(
'
#token-search-input
'
).
type
(
'
DAI
'
,
{
delay
:
200
})
...
...
cypress/integration/send.test.ts
View file @
3277d70e
describe
(
'
Send
'
,
()
=>
{
describe
(
'
Send
'
,
()
=>
{
beforeEach
(()
=>
cy
.
visit
(
'
/
#/
send
'
))
beforeEach
(()
=>
cy
.
visit
(
'
/send
'
))
it
(
'
can enter an amount into input
'
,
()
=>
{
it
(
'
can enter an amount into input
'
,
()
=>
{
cy
.
get
(
'
#sending-no-swap-input
'
)
cy
.
get
(
'
#sending-no-swap-input
'
)
...
...
cypress/integration/swap.test.ts
View file @
3277d70e
describe
(
'
Swap
'
,
()
=>
{
describe
(
'
Swap
'
,
()
=>
{
beforeEach
(()
=>
cy
.
visit
(
'
/
#/
swap
'
))
beforeEach
(()
=>
cy
.
visit
(
'
/swap
'
))
it
(
'
can enter an amount into input
'
,
()
=>
{
it
(
'
can enter an amount into input
'
,
()
=>
{
cy
.
get
(
'
#swap-currency-input .token-amount-input
'
)
cy
.
get
(
'
#swap-currency-input .token-amount-input
'
)
.
type
(
'
0.001
'
,
{
delay
:
200
})
.
type
(
'
0.001
'
,
{
delay
:
200
})
...
...
cypress/support/commands.js
View file @
3277d70e
...
@@ -69,13 +69,13 @@ class CustomizedBridge extends _Eip1193Bridge {
...
@@ -69,13 +69,13 @@ class CustomizedBridge extends _Eip1193Bridge {
// sets up the injected provider to be a mock ethereum provider with the given mnemonic/index
// sets up the injected provider to be a mock ethereum provider with the given mnemonic/index
Cypress
.
Commands
.
overwrite
(
'
visit
'
,
(
original
,
url
,
options
)
=>
{
Cypress
.
Commands
.
overwrite
(
'
visit
'
,
(
original
,
url
,
options
)
=>
{
return
original
(
url
,
{
return
original
(
url
.
startsWith
(
'
/
'
)
&&
url
.
length
>
2
&&
!
url
.
startsWith
(
'
/#
'
)
?
`/#
${
url
}
`
:
url
,
{
...
options
,
...
options
,
onBeforeLoad
(
win
)
{
onBeforeLoad
(
win
)
{
options
&&
options
.
onBeforeLoad
&&
options
.
onBeforeLoad
(
win
)
options
&&
options
.
onBeforeLoad
&&
options
.
onBeforeLoad
(
win
)
const
provider
=
new
JsonRpcProvider
(
'
https://rinkeby.infura.io/v3/acb7e55995d04c49bfb52b7141599467
'
,
4
)
const
provider
=
new
JsonRpcProvider
(
'
https://rinkeby.infura.io/v3/acb7e55995d04c49bfb52b7141599467
'
,
4
)
const
signer
=
new
Wallet
(
PRIVATE_KEY_TEST_NEVER_USE
,
provider
)
const
signer
=
new
Wallet
(
PRIVATE_KEY_TEST_NEVER_USE
,
provider
)
win
.
ethereum
=
new
CustomizedBridge
(
signer
,
provider
)
win
.
ethereum
=
new
CustomizedBridge
(
signer
,
provider
)
}
}
,
})
})
})
})
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