notAvailable.spec.tsx 561 B

123456789101112131415161718
  1. import React from 'react';
  2. import {mountWithTheme} from 'sentry-test/enzyme';
  3. import NotAvailable from 'app/components/notAvailable';
  4. describe('NotAvailable', function () {
  5. it('renders', function () {
  6. const wrapper = mountWithTheme(<NotAvailable />);
  7. expect(wrapper.text()).toEqual('\u2014');
  8. });
  9. it('renders with tooltip', function () {
  10. const wrapper = mountWithTheme(<NotAvailable tooltip="Tooltip text" />);
  11. expect(wrapper.text()).toEqual('\u2014');
  12. expect(wrapper.find('Tooltip').prop('title')).toBe('Tooltip text');
  13. });
  14. });