import React from 'react';
import 'jest-styled-components/native';
import { render } from '@testing-library/react-native';
import { OrganismBadgeCard, IBadgeCardProps } from './index';

describe('[Native] OrganismBadgeCard', () => {
  it('Rendered component', () => {
    const props: IBadgeCardProps = {
      img: 'image.png',
      badges: [
        { badgeText: 'Rookie', badgeStatus: 'completed', image: 'https://i.ibb.co/0rW958L/cheers-2.png' },
      ],
    };
    const component = render(<OrganismBadgeCard {...props} />);
    expect(component).toBeTruthy();
  });

  it('Rendered component with img width', () => {
    const props: IBadgeCardProps = {
      img: 'image.png',
      badges: [
        { badgeText: 'Rookie', badgeStatus: 'completed', image: 'https://i.ibb.co/0rW958L/cheers-2.png' },
      ],
      imgWidth: '100%',
    };
    const component = render(<OrganismBadgeCard {...props} />);
    expect(component).toBeTruthy();
  });

  it('Rendered component with img height', () => {
    const props: IBadgeCardProps = {
      img: 'image.png',
      badges: [
        { badgeText: 'Rookie', badgeStatus: 'completed', image: 'https://i.ibb.co/0rW958L/cheers-2.png' },
      ],
      imgHeight: '100%',
    };
    const component = render(<OrganismBadgeCard {...props} />);
    expect(component).toBeTruthy();
  });
});