import React from 'react';
import { render } from 'enzyme';

import Notification from '.';

describe('Notification', () => {
  it('displays a Notification', () => {
    const node = render(<Notification />);
    expect(node.hasClass('Notification')).toBe(true);
  });

  it('displays a colorful Notification', () => {
    const node = render(<Notification color="green" />);
    expect(node.hasClass('Notification_green')).toBe(true);
  });

  it('displays a dismiss button', () => {
    const node = render(<Notification dismissible />);
    expect(node.find('.Notification-Button')).toHaveLength(1);
  });

  it('displays an emoji', () => {
    const node = render(<Notification emoji="🦉" />);
    expect(node.find('.Notification-Emoji')).toHaveLength(1);
  });

  it('displays at bottom', () => {
    const node = render(<Notification position="bottom" />);
    expect(node.hasClass('Notification_bottom')).toBe(true);
  });
});
