Skip to content

Commit 7fbccd6

Browse files
committed
e2e tests
1 parent 34723f7 commit 7fbccd6

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

src/apps/hedgey/shortcuts.e2e.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import hook from './shortcuts'
2+
3+
const POSITION_ADDRESS = '0x2cde9919e81b20b4b33dd562a48a84b54c48f00c'
4+
5+
describe('getShortcutDefinitions', () => {
6+
it('should get the address definitions successfully', async () => {
7+
const shortcuts = await hook.getShortcutDefinitions(
8+
'celo',
9+
'0x2b8441ef13333ffa955c9ea5ab5b3692da95260d',
10+
)
11+
expect(shortcuts.length).toBeGreaterThan(0)
12+
})
13+
14+
describe('.onTrigger', () => {
15+
it('should return a Transaction', async () => {
16+
const shortcuts = await hook.getShortcutDefinitions(
17+
'celo',
18+
'0x2b8441ef13333ffa955c9ea5ab5b3692da95260d',
19+
)
20+
const shortcut = shortcuts[0]
21+
22+
const transactions = await shortcut.onTrigger(
23+
'celo',
24+
'0x2b8441ef13333ffa955c9ea5ab5b3692da95260d',
25+
POSITION_ADDRESS,
26+
)
27+
28+
expect(transactions.length).toEqual(1)
29+
})
30+
})
31+
})

0 commit comments

Comments
 (0)