1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-02 06:07:06 +01:00
metamask-extension/ui/components/component-library/avatar-account/avatar-account.test.js
Nidhi Kumari e72dfad21a
added AvatarAccount component (#15795)
* added AvatarAccount component

* updated avatar account component and README

* updated lint errors

* updated avatar account with types

* updated Jazzicon lint errors

* removed unused imports

* updated type prop and Blockie

* removed unused exports

* updated jazzicon styles

* fixed overflow in jazzicon

* updated avatar account component

* updated avatar account stories with types and size stories

* updated test for avatar account

* updated tests for avatar account

* Adding `TextFieldBase` component (#16043)

* Adding TextInputBase component

* Removing keyup and keydown props, tests and docs

* removing showClear from stories

* removing unneeded css

* simplifying uncontrolled vs controlled to work

* Fortifying maxLength test

* Lint fix for test

* Doc, style and prop updates

* Updating constant names with 'base'

* Adding a background color

* Adding a background color to input

* Adding ast-types to resolutions (#16103)

Co-authored-by: George Marshall <george.marshall@consensys.net>
2022-10-07 21:23:40 +05:30

24 lines
794 B
JavaScript

/* eslint-disable jest/require-top-level-describe */
import { render } from '@testing-library/react';
import React from 'react';
import { AvatarAccount } from './avatar-account';
import 'jest-canvas-mock';
describe('AvatarAccount', () => {
const args = {
address: '0x5CfE73b6021E818B776b421B1c4Db2474086a7e1',
};
it('should render Jazzicon correctly', () => {
const { getByTestId } = render(
<AvatarAccount data-testid="avatar-account" type="Jazzicon" {...args} />,
);
expect(getByTestId('avatar-account')).toBeDefined();
});
it('should render Blockie correctly', () => {
const { getByTestId } = render(
<AvatarAccount data-testid="avatar-account" type="Blockie" {...args} />,
);
expect(getByTestId('avatar-account')).toBeDefined();
});
});