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 {
|
||||
display: grid;
|
||||
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 { createMemoryHistory, createLocation } from 'history'
|
||||
import Faucet from '.'
|
||||
import { User } from '../../context'
|
||||
import { User, Market } from '../../context'
|
||||
import { userMockConnected } from '../../../__mocks__/user-mock'
|
||||
|
||||
const history = createMemoryHistory()
|
||||
@ -12,6 +12,14 @@ const location = createLocation('/faucet')
|
||||
const setup = () => {
|
||||
const utils = render(
|
||||
<User.Provider value={userMockConnected}>
|
||||
<Market.Provider
|
||||
value={{
|
||||
network: 'pacific',
|
||||
totalAssets: 100,
|
||||
categories: [''],
|
||||
networkMatch: true
|
||||
}}
|
||||
>
|
||||
<MemoryRouter>
|
||||
<Faucet
|
||||
history={history}
|
||||
@ -19,6 +27,7 @@ const setup = () => {
|
||||
match={{ params: '', path: '', url: '', isExact: true }}
|
||||
/>
|
||||
</MemoryRouter>
|
||||
</Market.Provider>
|
||||
</User.Provider>
|
||||
)
|
||||
const button = utils.getByText('Request ETH')
|
||||
@ -49,6 +58,6 @@ describe('Faucet', () => {
|
||||
fireEvent.click(button)
|
||||
expect(userMockConnected.requestFromFaucet).toHaveBeenCalledTimes(1)
|
||||
// check for spinner
|
||||
expect(getByText('Getting Ether...')).toBeInTheDocument()
|
||||
expect(getByText('Getting ETH...')).toBeInTheDocument()
|
||||
})
|
||||
})
|
||||
|
@ -14,7 +14,9 @@ function Faucet() {
|
||||
return (
|
||||
<Route
|
||||
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>
|
||||
<Web3message />
|
||||
|
Loading…
Reference in New Issue
Block a user