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", () => {
    const component = render(<OrganismsInviteFriend />);
  });
  it("Render OrganismsInviteFriend click whatsapp", () => {
    const 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", () => {
    const 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", () => {
    const 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", () => {
    const 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", () => {
    const component = render(
      <OrganismsInviteFriend
        description={"Description"}
        socialList={"share"}
        message={"message to desciption"}
        link={"www.google.com"}
      />
    );
    const shareButton = component.getByTestId("element");
    fireEvent.press(shareButton);
  });
});
