Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions app/src/components/App.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import {render, screen} from '@testing-library/react'
import '@testing-library/jest-dom'
import App from './App'

jest.mock('metamask-react', () => ({
useMetaMask: () => ({
status: 'unavailable',
chainId: null,
connect: jest.fn(),
}),
}))

test('renders bridge tabs and wallet connection guidance', () => {
render(<App/>)

expect(screen.getByRole('tab', {name: /BGL to WBGL/i})).toBeInTheDocument()
expect(screen.getByRole('tab', {name: /WBGL to BGL/i})).toBeInTheDocument()
expect(screen.getByText(/Please connect wallet/i)).toBeInTheDocument()
expect(screen.getByText(/Please install Metamask/i)).toBeInTheDocument()
})