|
|
@ -5,6 +5,7 @@ import { GAS_ESTIMATE_TYPES } from '../../../../../shared/constants/gas'; |
|
|
|
import { renderWithProvider } from '../../../../../test/lib/render-helpers'; |
|
|
|
import { renderWithProvider } from '../../../../../test/lib/render-helpers'; |
|
|
|
import mockEstimates from '../../../../../test/data/mock-estimates.json'; |
|
|
|
import mockEstimates from '../../../../../test/data/mock-estimates.json'; |
|
|
|
import mockState from '../../../../../test/data/mock-state.json'; |
|
|
|
import mockState from '../../../../../test/data/mock-state.json'; |
|
|
|
|
|
|
|
import { MAX_GAS_LIMIT_DEC } from '../../../../pages/send/send.constants'; |
|
|
|
import { GasFeeContextProvider } from '../../../../contexts/gasFee'; |
|
|
|
import { GasFeeContextProvider } from '../../../../contexts/gasFee'; |
|
|
|
import configureStore from '../../../../store/store'; |
|
|
|
import configureStore from '../../../../store/store'; |
|
|
|
|
|
|
|
|
|
|
@ -74,7 +75,7 @@ describe('AdvancedGasFeeGasLimit', () => { |
|
|
|
}); |
|
|
|
}); |
|
|
|
expect( |
|
|
|
expect( |
|
|
|
screen.queryByText( |
|
|
|
screen.queryByText( |
|
|
|
'Gas limit must be greater than 20999 and less than 7920027', |
|
|
|
`Gas limit must be greater than 20999 and less than ${MAX_GAS_LIMIT_DEC}`, |
|
|
|
), |
|
|
|
), |
|
|
|
).toBeInTheDocument(); |
|
|
|
).toBeInTheDocument(); |
|
|
|
fireEvent.change(document.getElementsByTagName('input')[0], { |
|
|
|
fireEvent.change(document.getElementsByTagName('input')[0], { |
|
|
@ -82,7 +83,7 @@ describe('AdvancedGasFeeGasLimit', () => { |
|
|
|
}); |
|
|
|
}); |
|
|
|
expect( |
|
|
|
expect( |
|
|
|
screen.queryByText( |
|
|
|
screen.queryByText( |
|
|
|
'Gas limit must be greater than 20999 and less than 7920027', |
|
|
|
`Gas limit must be greater than 20999 and less than ${MAX_GAS_LIMIT_DEC}`, |
|
|
|
), |
|
|
|
), |
|
|
|
).toBeInTheDocument(); |
|
|
|
).toBeInTheDocument(); |
|
|
|
fireEvent.change(document.getElementsByTagName('input')[0], { |
|
|
|
fireEvent.change(document.getElementsByTagName('input')[0], { |
|
|
@ -90,7 +91,7 @@ describe('AdvancedGasFeeGasLimit', () => { |
|
|
|
}); |
|
|
|
}); |
|
|
|
expect( |
|
|
|
expect( |
|
|
|
screen.queryByText( |
|
|
|
screen.queryByText( |
|
|
|
'Gas limit must be greater than 20999 and less than 7920027', |
|
|
|
`Gas limit must be greater than 20999 and less than ${MAX_GAS_LIMIT_DEC}`, |
|
|
|
), |
|
|
|
), |
|
|
|
).not.toBeInTheDocument(); |
|
|
|
).not.toBeInTheDocument(); |
|
|
|
}); |
|
|
|
}); |
|
|
@ -103,7 +104,7 @@ describe('AdvancedGasFeeGasLimit', () => { |
|
|
|
}); |
|
|
|
}); |
|
|
|
expect( |
|
|
|
expect( |
|
|
|
screen.queryByText( |
|
|
|
screen.queryByText( |
|
|
|
'Gas limit must be greater than 29999 and less than 7920027', |
|
|
|
`Gas limit must be greater than 29999 and less than ${MAX_GAS_LIMIT_DEC}`, |
|
|
|
), |
|
|
|
), |
|
|
|
).toBeInTheDocument(); |
|
|
|
).toBeInTheDocument(); |
|
|
|
}); |
|
|
|
}); |
|
|
|