1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 18:00:18 +01:00
metamask-extension/ui/components/multichain/select-action-modal-item/select-action-item.test.js
Nidhi Kumari 6a17d76efc
UX Multichain: Added Select an action Modal (#20559)
* added select-action-modal skeleton

* added select action modal item

* replaced stake link with constant

* added route for open and close of modal

* updated lint errors

* lint fix

* updated tests

* revert unnecessary changes

* fixed lint errors

* added suggestions

* lint fix

* updated test

* nit fix

* updated select action item to use button

* removed unused fragments

* moved onClose command to bottom

* moved select action modal on footer click

* changed isDisabled to disabled

* added hover and updated test

* nit fix
2023-08-29 22:15:30 +05:30

22 lines
627 B
JavaScript

import React from 'react';
import { render } from '@testing-library/react';
import { IconName } from '../../component-library';
import { SelectActionModalItem } from '.';
describe('SelectActionModalItem', () => {
it('should render correctly', () => {
const props = {
showIcon: true,
primaryText: 'Buy',
secondaryText: 'Buy crypto with MetaMask',
actionIcon: IconName.Add,
};
const { container, getByTestId } = render(
<SelectActionModalItem {...props} />,
);
expect(container).toMatchSnapshot();
expect(getByTestId('select-action-modal-item')).toBeDefined();
});
});