mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
more dynamic intro text
This commit is contained in:
parent
5b0c3486dd
commit
e007ab2090
@ -3,5 +3,5 @@
|
|||||||
.actions {
|
.actions {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: $spacer / 2;
|
gap: $spacer / 2;
|
||||||
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
|
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ import { render, fireEvent } from '@testing-library/react'
|
|||||||
import { MemoryRouter } from 'react-router'
|
import { MemoryRouter } from 'react-router'
|
||||||
import { createMemoryHistory, createLocation } from 'history'
|
import { createMemoryHistory, createLocation } from 'history'
|
||||||
import Faucet from '.'
|
import Faucet from '.'
|
||||||
import { User } from '../../context'
|
import { User, Market } from '../../context'
|
||||||
import { userMockConnected } from '../../../__mocks__/user-mock'
|
import { userMockConnected } from '../../../__mocks__/user-mock'
|
||||||
|
|
||||||
const history = createMemoryHistory()
|
const history = createMemoryHistory()
|
||||||
@ -12,13 +12,22 @@ const location = createLocation('/faucet')
|
|||||||
const setup = () => {
|
const setup = () => {
|
||||||
const utils = render(
|
const utils = render(
|
||||||
<User.Provider value={userMockConnected}>
|
<User.Provider value={userMockConnected}>
|
||||||
<MemoryRouter>
|
<Market.Provider
|
||||||
<Faucet
|
value={{
|
||||||
history={history}
|
network: 'pacific',
|
||||||
location={location}
|
totalAssets: 100,
|
||||||
match={{ params: '', path: '', url: '', isExact: true }}
|
categories: [''],
|
||||||
/>
|
networkMatch: true
|
||||||
</MemoryRouter>
|
}}
|
||||||
|
>
|
||||||
|
<MemoryRouter>
|
||||||
|
<Faucet
|
||||||
|
history={history}
|
||||||
|
location={location}
|
||||||
|
match={{ params: '', path: '', url: '', isExact: true }}
|
||||||
|
/>
|
||||||
|
</MemoryRouter>
|
||||||
|
</Market.Provider>
|
||||||
</User.Provider>
|
</User.Provider>
|
||||||
)
|
)
|
||||||
const button = utils.getByText('Request ETH')
|
const button = utils.getByText('Request ETH')
|
||||||
@ -49,6 +58,6 @@ describe('Faucet', () => {
|
|||||||
fireEvent.click(button)
|
fireEvent.click(button)
|
||||||
expect(userMockConnected.requestFromFaucet).toHaveBeenCalledTimes(1)
|
expect(userMockConnected.requestFromFaucet).toHaveBeenCalledTimes(1)
|
||||||
// check for spinner
|
// check for spinner
|
||||||
expect(getByText('Getting Ether...')).toBeInTheDocument()
|
expect(getByText('Getting ETH...')).toBeInTheDocument()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -14,7 +14,9 @@ function Faucet() {
|
|||||||
return (
|
return (
|
||||||
<Route
|
<Route
|
||||||
title="Faucet"
|
title="Faucet"
|
||||||
description={`Shower yourself with some Ether for Ocean's ${network} network.`}
|
description={`Shower yourself with some ETH ${
|
||||||
|
showRequestTokens ? 'or OCEAN' : ''
|
||||||
|
} for Ocean's ${network} network.`}
|
||||||
>
|
>
|
||||||
<Content>
|
<Content>
|
||||||
<Web3message />
|
<Web3message />
|
||||||
|
Loading…
Reference in New Issue
Block a user