import React from 'react';
import '@testing-library/jest-dom'
import { render, fireEvent} from "@testing-library/react-native";
import { OrganismsInviteFriend } from './index';

jest.mock('react-native/Libraries/EventEmitter/NativeEventEmitter');

describe('[Native] OrganismsInviteFriend', () => {
    it('Render OrganismsInviteFriend', () => {
        let component = render(
            <OrganismsInviteFriend
            />
        )
    });
    it('Render OrganismsInviteFriend click whatsapp', () => {
        let component = render(
            <OrganismsInviteFriend
            description={'Description'}
            socialList={'whatsapp'}
            message={'message to desciption'}
            link={'www.google.com'}
            />
        )
        const shareButton = component.getByTestId('element');
        fireEvent.press(shareButton);
    });
    it('Render OrganismsInviteFriend click facebook', () => {
        let component = render(
            <OrganismsInviteFriend
            description={'Description'}
            socialList={'facebook'}
            message={'message to desciption'}
            link={'www.google.com'}
            />
        )
        const shareButton = component.getByTestId('element');
        fireEvent.press(shareButton);
    });
    it('Render OrganismsInviteFriend click telegram', () => {
        let component = render(
            <OrganismsInviteFriend
            description={'Description'}
            socialList={'telegram'}
            message={'message to desciption'}
            link={'www.google.com'}
            />
        )
        const shareButton = component.getByTestId('element');
        fireEvent.press(shareButton);
    });
    it('Render OrganismsInviteFriend click twitter', () => {
        let component = render(
            <OrganismsInviteFriend
            iconDescription='beer'
            description={'Description'}
            socialList={'twitter'}
            message={'message to desciption'}
            link={'www.google.com'}
            />
        )
        const shareButton = component.getByTestId('element');
        fireEvent.press(shareButton);
    });

    it('Render OrganismsInviteFriend click share', () => {
        let component = render(
            <OrganismsInviteFriend
            description={'Description'}
            socialList={'share'}
            message={'message to desciption'}
            link={'www.google.com'}
            />
        )
        const shareButton = component.getByTestId('element');
        fireEvent.press(shareButton);
    });
});