Skip to content

Commit d04d39a

Browse files
0xAlunara0xAlunara
authored andcommitted
test: wip
1 parent 9eb7f17 commit d04d39a

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { LoanManageSoftLiq } from '@/loan/components/PageLoanManage/LoanManageSoftLiq'
2+
import { ClientWrapper, type Config } from '@cy/support/helpers/ClientWrapper'
3+
import { createTestWagmiConfigFromVNet, forkVirtualTestnet } from '@cy/support/helpers/tenderly'
4+
5+
const privateKey = '0xc9dc976b6701eb9d79c8358317c565cfc6d238a6ecbb0839b352d4f5d71953c9'
6+
7+
const getVirtualNetwork = forkVirtualTestnet((uuid) => ({
8+
vnet_id: 'a967f212-c4a3-4d65-afb6-2e79055f7a6f',
9+
display_name: `crvUSD wstETH Soft Liquidation Fork ${uuid}`,
10+
}))
11+
12+
const TestComponent = ({ config }: { config: Config }) => (
13+
<ClientWrapper config={config} autoConnect={false}>
14+
<LoanManageSoftLiq market={undefined} />
15+
</ClientWrapper>
16+
)
17+
18+
describe('Manage soft liquidation', () => {
19+
it(`should work for loan app`, () => {
20+
const vnet = getVirtualNetwork()
21+
if (!vnet) {
22+
cy.log('Could not fetch virtual testnet')
23+
return
24+
}
25+
26+
const config = createTestWagmiConfigFromVNet({ vnet, privateKey })
27+
cy.mount(<TestComponent config={config} />)
28+
cy.pause()
29+
})
30+
})

0 commit comments

Comments
 (0)