import React from 'react';
import { render } from '@testing-library/react-native';
import { OrganismFooter, IFooterProps } from './index';

describe('[Native] Footer', () => {
  it('render component', () => {
    const props: IFooterProps = {
      appsButtons: {
        appstore: { appUrl: '/', showButton: true },
        playstore: { appUrl: '/', showButton: true },
      },
      footerText: 'Esto es una prueba',
      footerLinks: [{ text: 'Text Link', url: 'https://mycooler.com/' }],
      logoTheme: 'light',
    };
    const component = render(<OrganismFooter {...props} />);
    expect(component).toBeTruthy();
  });

  it('render social media icons', () => {
    const props: IFooterProps = {
      appsButtons: {
        appstore: { appUrl: '/', showButton: true },
        playstore: { appUrl: '/', showButton: true },
      },
      footerText: 'Esto es una prueba',
      footerLinks: [{ text: 'Text Link', url: 'https://mycooler.com/' }],
      socialMediaIcons: [
        {
          iconName: 'facebook',
          url: '/',
        },
        {
          iconName: 'twitter',
          url: '/',
        },
        {
          iconName: 'whatsapp',
          url: '/',
        },
      ],
      logoTheme: 'light',
    };
    const component = render(<OrganismFooter {...props} />);
    expect(component).toBeTruthy();
    expect(props.socialMediaIcons).toBeDefined();
  });

  it('render apps links', () => {
    const props: IFooterProps = {
      appsButtons: {
        appstore: { appUrl: '/', showButton: true },
        playstore: { appUrl: '/', showButton: true },
      },
      footerText: 'Esto es una prueba',
      footerLinks: [{ text: 'Text Link', url: 'https://mycooler.com/' }],
      logoTheme: 'light',
    };
    const component = render(<OrganismFooter {...props} />);

    expect(component).toBeTruthy();
    expect(props.appsButtons).toBeDefined();
  });
});
