Skip to content

Commit

Permalink
chore: updated tests after rebasing
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt561 committed Oct 24, 2024
1 parent 58543da commit 86006b4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,24 @@ import {
MOCK_GET_VAULT_RESPONSE,
MOCK_STAKED_ETH_ASSET,
} from '../../__mocks__/mockData';
import { createMockAccountsControllerState } from '../../../../../util/test/accountsControllerTestUtils';
import { backgroundState } from '../../../../../util/test/initial-root-state';

const MOCK_ADDRESS_1 = '0x0';

const MOCK_ACCOUNTS_CONTROLLER_STATE = createMockAccountsControllerState([
MOCK_ADDRESS_1,
]);

const mockInitialState = {
settings: {},
engine: {
backgroundState: {
...backgroundState,
AccountsController: MOCK_ACCOUNTS_CONTROLLER_STATE,
},
},
};

jest.mock('../../../../hooks/useIpfsGateway', () => jest.fn());

Expand Down Expand Up @@ -107,13 +125,15 @@ describe('StakingBalance', () => {
it('render matches snapshot', () => {
const { toJSON } = renderWithProvider(
<StakingBalance asset={MOCK_STAKED_ETH_ASSET} />,
{ state: mockInitialState },
);
expect(toJSON()).toMatchSnapshot();
});

it('redirects to StakeInputView on stake button click', () => {
const { getByText } = renderWithProvider(
<StakingBalance asset={MOCK_STAKED_ETH_ASSET} />,
{ state: mockInitialState },
);

fireEvent.press(getByText(strings('stake.stake_more')));
Expand All @@ -127,6 +147,7 @@ describe('StakingBalance', () => {
it('redirects to UnstakeInputView on unstake button click', () => {
const { getByText } = renderWithProvider(
<StakingBalance asset={MOCK_STAKED_ETH_ASSET} />,
{ state: mockInitialState },
);

fireEvent.press(getByText(strings('stake.unstake')));
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
it.todo('attempts to claim a single exit request');
it.todo('attempts to claim multiple exit requests via multicall');

0 comments on commit 86006b4

Please sign in to comment.